]> Cypherpunks repositories - gostls13.git/commit
crypto/x509: fix and cleanup loadSystemRoots on macOS
authorFilippo Valsorda <filippo@golang.org>
Tue, 21 May 2019 19:00:50 +0000 (15:00 -0400)
committerFilippo Valsorda <filippo@golang.org>
Wed, 22 May 2019 16:20:11 +0000 (16:20 +0000)
commit2326a668781a664707f5775d896879668ab378e8
treecf08128baa4424cee1995ad2272452b18b48162d
parenta3d4655c2435e3777c45f09650539b943bab1c66
crypto/x509: fix and cleanup loadSystemRoots on macOS

Note how untrustedData is never NULL, so loadSystemRoots was checking
the wrong thing.

Also, renamed the C function to CopyPEMRoots to follow the
CoreFoundation naming convention on ownership.

Finally, redirect all debug output to standard error.

Change-Id: Ie80abefadf8974a75c0646aa02fcfcebcbe3bde8
Reviewed-on: https://go-review.googlesource.com/c/go/+/178538
Reviewed-by: Adam Langley <agl@golang.org>
src/crypto/x509/root_cgo_darwin.go
src/crypto/x509/root_darwin_test.go