]> Cypherpunks.ru repositories - gostls13.git/commit
crypto/x509: use SAN when comparing certs during path building
authorRoland Shoemaker <roland@golang.org>
Tue, 19 Apr 2022 19:05:10 +0000 (12:05 -0700)
committerRoland Shoemaker <roland@golang.org>
Thu, 21 Apr 2022 16:18:44 +0000 (16:18 +0000)
commitb941a10e384e6772792bc9e05e7ebe58e98bc20e
tree3a717a092e2940dafd73257fbe46ac20e1eaa4a6
parent1715a86721164bee98d95b16c78529cdd7dacc9c
crypto/x509: use SAN when comparing certs during path building

Per RFC 4158 Section 2.4.2, when we are discarding candidate
certificates during path building, use the SANs as well as subject and
public key when checking whether a certificate is already present in
the built path. This supports the case where a certificate in the chain
(typically a leaf) has the exact same subject and public key as another
certificate in the chain (typically its parent) but has SANs which don't
match.

Change-Id: I212c234e94a1f6afbe9691e4a3ba257461db3a7e
Reviewed-on: https://go-review.googlesource.com/c/go/+/401115
Reviewed-by: Roland Shoemaker <roland@golang.org>
Run-TryBot: Roland Shoemaker <roland@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Damien Neil <dneil@google.com>
src/crypto/x509/verify.go
src/crypto/x509/verify_test.go