You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{selfSignedWithCommonName, "x509: certificate signed by unknown authority (possibly because of \"empty\" while trying to verify candidate authority certificate \"test\")"},
1488
-
{selfSignedNoCommonNameWithOrgName, "x509: certificate signed by unknown authority (possibly because of \"empty\" while trying to verify candidate authority certificate \"ca\")"},
1489
-
{selfSignedNoCommonNameNoOrgName, "x509: certificate signed by unknown authority (possibly because of \"empty\" while trying to verify candidate authority certificate \"serial:0\")"},
1488
+
{"self-signed, cn", selfSignedWithCommonName, "x509: certificate signed by unknown authority (possibly because of \"empty\" while trying to verify candidate authority certificate \"test\")"},
1489
+
{"self-signed, no cn, org", selfSignedNoCommonNameWithOrgName, "x509: certificate signed by unknown authority (possibly because of \"empty\" while trying to verify candidate authority certificate \"ca\")"},
1490
+
{"self-signed, no cn, no org", selfSignedNoCommonNameNoOrgName, "x509: certificate signed by unknown authority (possibly because of \"empty\" while trying to verify candidate authority certificate \"serial:0\")"},
1490
1491
}
1491
1492
1492
1493
funcTestUnknownAuthorityError(t*testing.T) {
1493
1494
fori, tt:=rangeunknownAuthorityErrorTests {
1494
-
der, _:=pem.Decode([]byte(tt.cert))
1495
-
ifder==nil {
1496
-
t.Errorf("#%d: Unable to decode PEM block", i)
1497
-
}
1498
-
c, err:=ParseCertificate(der.Bytes)
1499
-
iferr!=nil {
1500
-
t.Errorf("#%d: Unable to parse certificate -> %v", i, err)
0 commit comments