]> Cypherpunks repositories - gostls13.git/commit
crypto/x509: fix root CA extraction on macOS (no-cgo path)
authorFilippo Valsorda <hi@filippo.io>
Mon, 6 Aug 2018 22:38:18 +0000 (18:38 -0400)
committerFilippo Valsorda <filippo@golang.org>
Wed, 5 Dec 2018 22:53:43 +0000 (22:53 +0000)
commitaa2415807781ba84bf917c62cb983dc1a44f2ad1
treea81ace3a5bb55cd8ba658f0aaf71f53b0e6672e2
parentf6be1cf109a2be59b96d1fa913adfa1fbc628579
crypto/x509: fix root CA extraction on macOS (no-cgo path)

Certificates without any trust settings might still be in the keychain
(for example if they used to have some, or if they are intermediates for
offline verification), but they are not to be trusted. The only ones we
can trust unconditionally are the ones in the system roots store.

Moreover, the verify-cert invocation was not specifying the ssl policy,
defaulting instead to the basic one. We have no way of communicating
different usages in a CertPool, so stick to the WebPKI use-case as the
primary one for crypto/x509.

Updates #24652

Change-Id: Ife8b3d2f4026daa1223aa81fac44aeeb4f96528a
Reviewed-on: https://go-review.googlesource.com/c/128116
Reviewed-by: Adam Langley <agl@google.com>
Reviewed-by: Adam Langley <agl@golang.org>
src/crypto/x509/root_darwin.go