crypto/x509: load all trusted certs on darwin (cgo)
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 <ae9783c0b0efc69cd85ab025ddd17aa44cdc4aa5@golang.org>
TryBot-Result: Gobot Gobot <66cb808b70d30c07676d5e946fee83fd561249e5@golang.org>
Reviewed-by: Brad Fitzpatrick <ae9783c0b0efc69cd85ab025ddd17aa44cdc4aa5@golang.org>

codestation/go,akutz/go,cloudflare/go,CAFxX/go,codestation/go,nawawi/go,nawawi/go,golang/go,akutz/go,CAFxX/go,CAFxX/go,josharian/go,josharian/go,CAFxX/go,codestation/go,codestation/go,cloudflare/go,josharian/go,josharian/go,Cofyc/go,CAFxX/go,cloudflare/go,nawawi/go,christopher-henderson/Go,akutz/go,nawawi/go,codestation/go,golang/go,akutz/go,Cofyc/go,golang/go,nawawi/go,golang/go,nawawi/go,akutz/go,josharian/go,Cofyc/go,cloudflare/go,codestation/go,golang/go,Cofyc/go,cloudflare/go,Cofyc/go,golang/go,CAFxX/go,akutz/go,josharian/go,nawawi/go,akutz/go,cloudflare/go,cloudflare/go,codestation/go,CAFxX/go,akutz/go,golang/go,josharian/go,nawawi/go,Cofyc/go,Cofyc/go,josharian/go,golang/go,cloudflare/go,Cofyc/go,CAFxX/go,codestation/go