mirror of
https://github.com/emmansun/gmsm.git
synced 2025-04-26 20:26:19 +08:00
crypto/x509: properly handle issuerUniqueID and subjectUniqueID
This commit is contained in:
parent
bd9ba93ffe
commit
d35a314b7a
@ -939,10 +939,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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user