- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for ParsePemEncodedCertificate (0.47 sec)
-
security/pkg/pki/ca/ca_test.go
keyPEM, append(certPEM, certChainBytes...), rootCertBytes, &tc.verifyFields); err != nil { t.Errorf("%s: VerifyCertificate error: %v", id, err) } cert, err := util.ParsePemEncodedCertificate(certPEM) if err != nil { t.Errorf("%s: ParsePemEncodedCertificate error: %v", id, err) } if ttl := cert.NotAfter.Sub(cert.NotBefore) - util.ClockSkewGracePeriod; ttl != tc.requestedTTL {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Oct 31 08:51:27 UTC 2023 - 29.1K bytes - Viewed (0) -
security/pkg/pki/util/keycertbundle.go
b.rootCertBytes = copyBytes(rootCertBytes) // cert and privKey are always reset to point to new addresses. This avoids modifying the pointed structs that // could be still used outside of the class. b.cert, _ = ParsePemEncodedCertificate(certBytes) privKey, _ := ParsePemEncodedKey(privKeyBytes) b.privKey = &privKey b.mutex.Unlock() } // CertOptions returns the certificate config based on currently stored cert.
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Sun Jan 21 06:07:50 UTC 2024 - 10.5K bytes - Viewed (0) -
security/pkg/pki/util/generate_cert_test.go
t.Fatal(err) } if VerifyCertificate(ecCaPrivPem, ecCaCertPem, ecCaCertPem, fields) != nil { t.Fatal(err) } rsaCaCert, err := ParsePemEncodedCertificate(rsaCaCertPem) if err != nil { t.Fatal(err) } ecCaCert, err := ParsePemEncodedCertificate(ecCaCertPem) if err != nil { t.Fatal(err) } rsaCaPriv, err := ParsePemEncodedKey(rsaCaPrivPem) if err != nil { t.Fatal(err) }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Nov 06 12:48:53 UTC 2023 - 29.4K bytes - Viewed (0) -
security/pkg/pki/ca/selfsignedcarootcertrotator_test.go
if oldKeyLen != newKeyLen { t.Errorf("Public key size should not change, (got %d) vs (expected %d)", newKeyLen, oldKeyLen) } oldRootCert, _ := util.ParsePemEncodedCertificate(oldCertItem.caSecret.Data[CACertFile]) newRootCert, _ := util.ParsePemEncodedCertificate(newCertItem.caSecret.Data[CACertFile]) if oldRootCert.Subject.String() != newRootCert.Subject.String() { t.Errorf("certificate Subject does not match (old: %s) vs (new: %s)",
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed Oct 11 23:33:41 UTC 2023 - 14.1K bytes - Viewed (0) -
security/pkg/pki/util/generate_cert.go
// genCertTemplateFromOptions(), and only called by a self-signed Citadel. func GetCertOptionsFromExistingCert(certBytes []byte) (opts CertOptions, err error) { cert, certErr := ParsePemEncodedCertificate(certBytes) if certErr != nil { return opts, certErr } orgs := cert.Subject.Organization if len(orgs) > 0 { opts.Org = orgs[0] }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed Aug 02 14:34:38 UTC 2023 - 14.2K bytes - Viewed (0) -
security/pkg/pki/util/crypto_test.go
pem: certRSA, }, "Parse ECDSA certificate": { publicKeyAlgo: x509.ECDSA, pem: certECDSA, }, } for id, c := range testCases { cert, err := ParsePemEncodedCertificate([]byte(c.pem)) if c.errMsg != "" { if err == nil { t.Errorf("%s: no error is returned", id) } else if c.errMsg != err.Error() {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Jun 04 13:00:07 UTC 2024 - 14.6K bytes - Viewed (0) -
security/pkg/pki/util/keycertbundle_test.go
IsSelfSigned: true, TTL: time.Hour, RSAKeySize: 2048, }) if err != nil { t.Errorf("failed to gen root cert for Citadel self signed cert %v", err) } rootCert, err := ParsePemEncodedCertificate(rootCertBytes) if err != nil { t.Errorf("failed to parsing pem for root cert %v", err) } rootKey, err := ParsePemEncodedKey(rootKeyBytes) if err != nil {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Sun Jan 21 06:07:50 UTC 2024 - 15.8K bytes - Viewed (0) -
pilot/pkg/bootstrap/server_test.go
}, retry.Timeout(10*time.Second)) close(stop) if err != nil { t.Fatalf("expect certRotated is %v while actual certRotated is %v", tt.certRotated, certRotated) } cert, certErr := util.ParsePemEncodedCertificate(rotatedCertBytes) if certErr != nil { t.Fatalf("rotated cert is not valid") } currTime := time.Now() timeToExpire := cert.NotAfter.Sub(currTime) if timeToExpire < 0 {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Jun 13 17:48:28 UTC 2024 - 23.1K bytes - Viewed (0)