go/src/crypto
Nathaniel Caza e7f95b3cca crypto/x509: load all trusted certs on darwin (cgo)
The current implementation ignores certs wherein the
Subject does not match the Issuer. An example of where
this causes issue is an enterprise environment with
intermediate CAs. In this case, the issuer is separate
(and may be loaded) but the intermediate is ignored.
A TLS handshake that does not include the intermediate
cert would then fail with an untrusted error in Go.

On other platforms (darwin-nocgo included), all trusted
certs are loaded and accepted reguardless of
Subject/Issuer names.

This change removes the Subject/Issuer name-matching
restriction of certificates when trustAsRoot is set,
allowing all trusted certs to be loaded on darwin (cgo).

Refs #16532

Change-Id: I451e929588f8911892be6bdc2143d0799363c5f8
Reviewed-on: https://go-review.googlesource.com/36942
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-12-13 19:27:15 +00:00
..
aes crypto/aes: use s390x KMA instruction for AES-GCM if available 2017-11-06 07:58:37 +00:00
cipher crypto/cipher: use raw bytes for keys in docs 2017-11-16 00:40:00 +00:00
des crypto: revise wording about cryptographically broken algorithms 2017-05-04 12:31:18 +00:00
dsa all: fix article typos 2017-09-15 02:39:16 +00:00
ecdsa crypto/elliptic: reduce allocations on amd64 2017-11-30 21:01:10 +00:00
elliptic crypto/elliptic: reduce allocations on amd64 2017-11-30 21:01:10 +00:00
hmac crypto, hash: document marshal/unmarshal implementation 2017-11-15 00:06:24 +00:00
internal/cipherhw crypto/{cipher,tls,internal/cryptohw}: prioritise AES-GCM when hardware support is present. 2016-11-07 20:01:18 +00:00
md5 hash: add MarshalBinary/UnmarshalBinary round trip + golden test for all implementations 2017-12-06 07:45:46 +00:00
rand crypto/rand: batch large calls to linux getrandom 2017-08-09 19:29:14 +00:00
rc4 crypto/cipher, crypto/rc4: make overlap rules wording consistent 2017-10-31 22:36:43 +00:00
rsa crypto/{ecdsa,rsa}: rename argument to PrivateKey.Sign. 2017-10-29 19:45:11 +00:00
sha1 hash: add MarshalBinary/UnmarshalBinary round trip + golden test for all implementations 2017-12-06 07:45:46 +00:00
sha256 hash: add MarshalBinary/UnmarshalBinary round trip + golden test for all implementations 2017-12-06 07:45:46 +00:00
sha512 hash: add MarshalBinary/UnmarshalBinary round trip + golden test for all implementations 2017-12-06 07:45:46 +00:00
subtle crypto/subtle: simplify and speed up constant-time primitives 2017-11-10 03:47:57 +00:00
tls crypto/tls: limit number of consecutive warning alerts 2017-11-08 23:18:52 +00:00
x509 crypto/x509: load all trusted certs on darwin (cgo) 2017-12-13 19:27:15 +00:00
crypto.go crypto: add BLAKE2b and BLAKE2s hash constants 2017-03-01 19:26:16 +00:00
issue21104_test.go crypto/{aes,cipher,rc4}: fix out of bounds write in stream ciphers 2017-08-09 04:17:51 +00:00