Skip to content

Commit

Permalink
x509: include OID in duplicate extension error message
Browse files Browse the repository at this point in the history
  • Loading branch information
emmansun committed May 8, 2024
1 parent 580f71f commit 57318ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion smx509/parser.go
Expand Up @@ -1000,7 +1000,7 @@ func parseCertificate(der []byte) (*Certificate, error) {
}
oidStr := ext.Id.String()
if seenExts[oidStr] {
return nil, errors.New("x509: certificate contains duplicate extensions")
return nil, fmt.Errorf("x509: certificate contains duplicate extension with OID %q", oidStr)
}
seenExts[oidStr] = true
cert.Extensions = append(cert.Extensions, ext)
Expand Down

0 comments on commit 57318ea

Please sign in to comment.