Skip to content

Commit

Permalink
crypto/x509: Include OID in duplicate extension error message
Browse files Browse the repository at this point in the history
  • Loading branch information
Techassi committed May 3, 2024
1 parent 44b54b9 commit 0ed2f97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/crypto/x509/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -964,7 +964,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, errors.New("x509: certificate contains duplicate extension %s", oidStr)
}
seenExts[oidStr] = true
cert.Extensions = append(cert.Extensions, ext)
Expand Down

0 comments on commit 0ed2f97

Please sign in to comment.