Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for ParsePemEncodedCertificate (0.41 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
Back to top