go/src/crypto
Filippo Valsorda 70e3b1df4a crypto/tls: don't modify Config.Certificates in BuildNameToCertificate
The Config does not own the memory pointed to by the Certificate slice.
Instead, opportunistically use Certificate.Leaf and let the application
set it if it desires the performance gain.

This is a partial rollback of CL 107627. See the linked issue for the
full explanation.

Fixes #28744

Change-Id: I33ce9e6712e3f87939d9d0932a06d24e48ba4567
Reviewed-on: https://go-review.googlesource.com/c/149098
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-11-12 23:25:21 +00:00
..
aes crypto/aes: remove redundant nil check around loop 2018-10-17 01:28:58 +00:00
cipher crypto/cipher: add VSX implementation of xorBytes for ppc64x 2018-11-01 15:56:48 +00:00
des crypto: panic on illegal input and output overlap 2018-06-19 21:06:50 +00:00
dsa crypto: randomly read an extra byte of randomness in some places. 2018-06-07 15:09:25 +00:00
ecdsa crypto/ecdsa: add a package level example 2018-08-02 22:14:25 +00:00
elliptic crypto/elliptic: implement P256 for arm64 2018-07-19 18:40:51 +00:00
hmac all: update comment URLs from HTTP to HTTPS, where possible 2018-06-01 21:52:00 +00:00
internal crypto: panic on illegal input and output overlap 2018-06-19 21:06:50 +00:00
md5 crypto/md5: fix md5block asm to work on big endian ppc64 2018-11-09 15:54:21 +00:00
rand crypto: add AIX operating system 2018-10-10 14:55:17 +00:00
rc4 crypto/rc4: remove assembler implementations 2018-08-21 19:49:06 +00:00
rsa all: use strings.ReplaceAll and bytes.ReplaceAll where applicable 2018-09-26 22:14:25 +00:00
sha1 all: this big patch remove whitespace from assembly files 2018-10-03 15:28:51 +00:00
sha256 all: use internal/cpu feature variables directly 2018-08-20 14:47:07 +00:00
sha512 crypto, internal/cpu: fix s390x AES feature detection and update SHA implementations 2018-06-11 11:41:31 +00:00
subtle crypto/subtle: simplify and speed up constant-time primitives 2017-11-10 03:47:57 +00:00
tls crypto/tls: don't modify Config.Certificates in BuildNameToCertificate 2018-11-12 23:25:21 +00:00
x509 all: use "reports whether" consistently in the few places that didn't 2018-11-02 22:47:58 +00:00
crypto.go
issue21104_test.go crypto/{aes,cipher,rc4}: fix out of bounds write in stream ciphers 2017-08-09 04:17:51 +00:00