]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.11] crypto/x509: fix root CA extraction on macOS (cgo path)
authorFilippo Valsorda <hi@filippo.io>
Mon, 6 Aug 2018 19:41:34 +0000 (15:41 -0400)
committerFilippo Valsorda <filippo@golang.org>
Fri, 22 Feb 2019 16:50:16 +0000 (16:50 +0000)
commit688dc859ea9cd09851c5e9157cfeba5e84c87a55
treeccb7e49de080f92cd9f424213794f4296f6f99ee
parent4ae9e7f1667d0a7df157b47d9d2d1f4a3c67849d
[release-branch.go1.11] crypto/x509: fix root CA extraction on macOS (cgo path)

The cgo path was not taking policies into account, using the last
security setting in the array whatever it was. Also, it was not aware of
the defaults for empty security settings, and for security settings
without a result type. Finally, certificates restricted to a hostname
were considered roots.

The API docs for this code are partial and not very clear, so this is a
best effort, really.

Updates #24652
Updates #26039

Change-Id: I8fa2fe4706f44f3d963b32e0615d149e997b537d
Reviewed-on: https://go-review.googlesource.com/c/128056
Run-TryBot: Filippo Valsorda <filippo@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Adam Langley <agl@google.com>
Reviewed-by: Adam Langley <agl@golang.org>
(cherry picked from commit f6be1cf109a2be59b96d1fa913adfa1fbc628579)
Reviewed-on: https://go-review.googlesource.com/c/162860
Reviewed-by: Andrew Bonventre <andybons@golang.org>
src/crypto/x509/root_cgo_darwin.go
src/crypto/x509/root_darwin.go