aboutsummaryrefslogtreecommitdiff
path: root/src/crypto/x509/parser.go
diff options
context:
space:
mode:
authorRoland Shoemaker <roland@golang.org>2022-03-21 17:26:26 -0700
committerDmitri Shuralyov <dmitshur@golang.org>2022-05-04 15:38:55 +0000
commit9511f6deb62d1ef8c023dc4480517f1e4a57e3e7 (patch)
treeb02f9e6ddc2fa17ed2b6117ca524a19eb8657cee /src/crypto/x509/parser.go
parent0fdca725c754dd48a3b84c94d7f147100f751677 (diff)
downloadgo-9511f6deb62d1ef8c023dc4480517f1e4a57e3e7.tar.gz
go-9511f6deb62d1ef8c023dc4480517f1e4a57e3e7.zip
[release-branch.go1.17] crypto/x509: properly handle issuerUniqueID and subjectUniqueID
Updates #51754 Fixes #51858 Change-Id: I3bfa15db3497de9fb82d6391d87fca1ae9ba6543 Reviewed-on: https://go-review.googlesource.com/c/go/+/394297 Trust: Roland Shoemaker <roland@golang.org> Run-TryBot: Roland Shoemaker <roland@golang.org> Auto-Submit: Roland Shoemaker <roland@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Damien Neil <dneil@google.com> (cherry picked from commit 9a53b472b5ed41f9fe79a73f1236ed3f45f8871a) Reviewed-on: https://go-review.googlesource.com/c/go/+/399501
Diffstat (limited to 'src/crypto/x509/parser.go')
-rw-r--r--src/crypto/x509/parser.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/crypto/x509/parser.go b/src/crypto/x509/parser.go
index 9a500a8098c..635e74bd891 100644
--- a/src/crypto/x509/parser.go
+++ b/src/crypto/x509/parser.go
@@ -941,10 +941,10 @@ func parseCertificate(der []byte) (*Certificate, error) {
}
if cert.Version > 1 {
- if !tbs.SkipOptionalASN1(cryptobyte_asn1.Tag(1).Constructed().ContextSpecific()) {
+ if !tbs.SkipOptionalASN1(cryptobyte_asn1.Tag(1).ContextSpecific()) {
return nil, errors.New("x509: malformed issuerUniqueID")
}
- if !tbs.SkipOptionalASN1(cryptobyte_asn1.Tag(2).Constructed().ContextSpecific()) {
+ if !tbs.SkipOptionalASN1(cryptobyte_asn1.Tag(2).ContextSpecific()) {
return nil, errors.New("x509: malformed subjectUniqueID")
}
if cert.Version == 3 {