mirror of
https://github.com/golang/go
synced 2024-11-15 03:20:31 -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()
|
oidStr := ext.Id.String()
|
||||||
if seenExts[oidStr] {
|
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
|
seenExts[oidStr] = true
|
||||||
cert.Extensions = append(cert.Extensions, ext)
|
cert.Extensions = append(cert.Extensions, ext)
|
||||||
|
Loading…
Reference in New Issue
Block a user