Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for ParsePemEncodedCertificate (0.46 sec)

  1. 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)
  2. 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