mirror of
https://github.com/golang/go
synced 2024-11-15 03:10:22 -07:00
Use fmt.Errorf, adjust error message
This commit is contained in:
parent
0ed2f97fbd
commit
b855a161d4
@ -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 extension %s", oidStr)
|
||||
return nil, fmt.Errorf("x509: certificate contains duplicate extension with OID %q", oidStr)
|
||||
}
|
||||
seenExts[oidStr] = true
|
||||
cert.Extensions = append(cert.Extensions, ext)
|
||||
|
Loading…
Reference in New Issue
Block a user