- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for ExtractSANExtension (0.28 sec)
-
security/pkg/pki/util/san.go
} ids = append(ids, Identity{Type: identityTypeMap[rawValue.Tag], Value: rawValue.Bytes}) } return ids, nil } // ExtractSANExtension extracts the "Subject Alternative Name" externsion from // the given PKIX extension set. func ExtractSANExtension(exts []pkix.Extension) *pkix.Extension { for _, ext := range exts { if ext.Id.Equal(oidSubjectAlternativeName) {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri Oct 14 06:50:22 UTC 2022 - 6K bytes - Viewed (0) -
security/pkg/pki/util/san_test.go
{Id: asn1.ObjectIdentifier{2, 5, 29, 17}}, {Id: asn1.ObjectIdentifier{3, 2, 1}}, }, found: true, }, } for id, tc := range testCases { found := ExtractSANExtension(tc.exts) != nil if found != tc.found { t.Errorf("Case %q: expect `found` to be %t but got %t", id, tc.found, found) } } } func TestExtractIDs(t *testing.T) { id := "test.id"
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Feb 12 17:36:33 UTC 2024 - 6.5K bytes - Viewed (0) -
security/pkg/pki/ca/ca_test.go
if ttl := cert.NotAfter.Sub(cert.NotBefore) - util.ClockSkewGracePeriod; ttl != tc.requestedTTL { t.Errorf("%s: Unexpected certificate TTL (expecting %v, actual %v)", id, tc.requestedTTL, ttl) } san := util.ExtractSANExtension(cert.Extensions) if san == nil { t.Errorf("%s: No SAN extension is found in the certificate", id) } expected, err := util.BuildSubjectAltNameExtension(subjectID) if err != nil {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Oct 31 08:51:27 UTC 2023 - 29.1K bytes - Viewed (0)