]> Cypherpunks repositories - gostls13.git/commit
crypto/x509: add Admin & User Keychains to FetchPEMRoots on Darwin
authorLee Hinman <hinman@gmail.com>
Tue, 8 Mar 2016 04:31:31 +0000 (22:31 -0600)
committerRuss Cox <rsc@golang.org>
Wed, 18 May 2016 14:26:59 +0000 (14:26 +0000)
commit6cd698d71da92aeb4540c378213ac4a1c6687097
tree0be487e5b4a277542944521c80d00ee6a533d145
parentb30fcbc9f59ca4bf1723eb6743b47fa89b3847a3
crypto/x509: add Admin & User Keychains to FetchPEMRoots on Darwin

in root_cgo_darwin.go only certificates from the System Domain
were being used in FetchPEMRoots.  This patch adds support for
getting certificates from all three domains (System, Admin,
User).  Also it will only read trusted certificates from those
Keychains.  Because it is possible to trust a non Root certificate,
this patch also adds a checks to see if the Subject and Issuer
name are the same.

Fixes #14514

Change-Id: Ia03936d7a61d1e24e99f31c92f9927ae48b2b494
Reviewed-on: https://go-review.googlesource.com/20351
Reviewed-by: Russ Cox <rsc@golang.org>
src/crypto/x509/root_cgo_darwin.go