From b855a161d46f208e57f19c87e01140cc77865422 Mon Sep 17 00:00:00 2001 From: Techassi Date: Mon, 6 May 2024 09:33:50 +0200 Subject: [PATCH] Use fmt.Errorf, adjust error message --- src/crypto/x509/parser.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crypto/x509/parser.go b/src/crypto/x509/parser.go index 02714a1e53..800cc6620c 100644 --- a/src/crypto/x509/parser.go +++ b/src/crypto/x509/parser.go @@ -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)