Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 425 for x509 (0.04 sec)

  1. cmd/kubeadm/app/phases/certs/renewal/filerenewer_test.go

    				DNSNames: []string{"test-domain.space"},
    			},
    			Usages: []x509.ExtKeyUsage{x509.ExtKeyUsageClientAuth},
    		},
    	}
    
    	cert, _, err := fr.Renew(certCfg)
    	if err != nil {
    		t.Fatalf("unexpected error renewing cert: %v", err)
    	}
    
    	// verify the renewed certificate
    	pool := x509.NewCertPool()
    	pool.AddCert(testCACert)
    
    	_, err = cert.Verify(x509.VerifyOptions{
    		DNSName:   "test-domain.space",
    		Roots:     pool,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Sep 28 04:36:54 UTC 2022
    - 1.5K bytes
    - Viewed (0)
  2. cmd/kubeadm/app/util/pkiutil/pki_helpers.go

    // intermediate CAs back to the root CA
    func VerifyCertChain(cert *x509.Certificate, intermediates []*x509.Certificate, root *x509.Certificate) error {
    	rootPool := x509.NewCertPool()
    	rootPool.AddCert(root)
    
    	intermediatePool := x509.NewCertPool()
    	for _, c := range intermediates {
    		intermediatePool.AddCert(c)
    	}
    
    	verifyOptions := x509.VerifyOptions{
    		Roots:         rootPool,
    		Intermediates: intermediatePool,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 01 16:01:49 UTC 2024
    - 25.5K bytes
    - Viewed (0)
  3. src/crypto/x509/x509_test_import.go

    	rsaPriv, err := x509.ParsePKCS1PrivateKey(block.Bytes)
    	if err != nil {
    		panic("Failed to parse private key: " + err.Error())
    	}
    
    	template := x509.Certificate{
    		SerialNumber: big.NewInt(1),
    		Subject: pkix.Name{
    			CommonName:   "test",
    			Organization: []string{"Σ Acme Co"},
    		},
    		NotBefore: time.Unix(1000, 0),
    		NotAfter:  time.Unix(100000, 0),
    		KeyUsage:  x509.KeyUsageCertSign,
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 28 18:17:57 UTC 2021
    - 1.7K bytes
    - Viewed (0)
  4. tests/integration/security/util/secret/secret.go

    			return fmt.Errorf("%v does not exist in the data section", key)
    		}
    	}
    
    	verifyFields := &util.VerifyFields{
    		ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageClientAuth, x509.ExtKeyUsageServerAuth},
    		KeyUsage:    x509.KeyUsageDigitalSignature | x509.KeyUsageKeyEncipherment,
    		IsCA:        false,
    		Host:        expectedID,
    	}
    
    	if err := util.VerifyCertificate(secret.Data[ca.PrivateKeyFile],
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon May 22 04:04:14 UTC 2023
    - 2.3K bytes
    - Viewed (0)
  5. cmd/kubeadm/app/util/certs/util.go

    func CreateTestCert(t *testing.T, caCert *x509.Certificate, caKey crypto.Signer, altNames certutil.AltNames) (*x509.Certificate, crypto.Signer, *pkiutil.CertConfig) {
    	config := &pkiutil.CertConfig{
    		Config: certutil.Config{
    			CommonName: "testCert",
    			Usages:     []x509.ExtKeyUsage{x509.ExtKeyUsageAny},
    			AltNames:   altNames,
    		},
    	}
    	cert, key, err := pkiutil.NewCertAndKey(caCert, caKey, config)
    	if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 01 16:01:49 UTC 2024
    - 9.1K bytes
    - Viewed (0)
  6. security/pkg/pki/util/crypto.go

    	cb, _ := pem.Decode(certBytes)
    	if cb == nil {
    		return nil, fmt.Errorf("invalid PEM encoded certificate")
    	}
    
    	cert, err := x509.ParseCertificate(cb.Bytes)
    	if err != nil {
    		return nil, fmt.Errorf("failed to parse X.509 certificate")
    	}
    
    	return cert, nil
    }
    
    // ParsePemEncodedCertificateChain constructs a slice of `x509.Certificate` and `rootCertBytes`
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Jun 04 13:00:07 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/pkg/util/x509metrics/server_cert_deprecations.go

    func (c *missingSANChecker) CheckRoundTripError(err error) bool {
    	if err != nil && errors.As(err, &x509.HostnameError{}) && strings.Contains(err.Error(), "x509: certificate relies on legacy Common Name field") {
    		// increase the count of registered failures due to Go 1.15 x509 cert Common Name deprecation
    		return true
    	}
    
    	return false
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jul 26 17:14:05 UTC 2022
    - 7.3K bytes
    - Viewed (0)
  8. src/crypto/tls/cache.go

    package tls
    
    import (
    	"crypto/x509"
    	"runtime"
    	"sync"
    	"sync/atomic"
    )
    
    type cacheEntry struct {
    	refs atomic.Int64
    	cert *x509.Certificate
    }
    
    // certCache implements an intern table for reference counted x509.Certificates,
    // implemented in a similar fashion to BoringSSL's CRYPTO_BUFFER_POOL. This
    // allows for a single x509.Certificate to be kept in memory and referenced from
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 24 23:56:41 UTC 2023
    - 3.4K bytes
    - Viewed (0)
  9. pkg/controller/certificates/authority/authority.go

    	RawKey []byte
    
    	Certificate *x509.Certificate
    	PrivateKey  crypto.Signer
    }
    
    // Sign signs a certificate request, applying a SigningPolicy and returns a DER
    // encoded x509 certificate.
    func (ca *CertificateAuthority) Sign(crDER []byte, policy SigningPolicy) ([]byte, error) {
    	cr, err := x509.ParseCertificateRequest(crDER)
    	if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 23 19:36:11 UTC 2021
    - 2.5K bytes
    - Viewed (0)
  10. src/crypto/x509/hybrid_pool_test.go

    		t.Fatalf("failed to generate test key: %s", err)
    	}
    	rootDER, err := x509.CreateCertificate(rand.Reader, rootTmpl, rootTmpl, k.Public(), k)
    	if err != nil {
    		t.Fatalf("failed to create test cert: %s", err)
    	}
    	root, err := x509.ParseCertificate(rootDER)
    	if err != nil {
    		t.Fatalf("failed to parse test cert: %s", err)
    	}
    
    	pool, err := x509.SystemCertPool()
    	if err != nil {
    		t.Fatalf("SystemCertPool failed: %s", err)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 20:48:11 UTC 2024
    - 3.7K bytes
    - Viewed (0)
Back to top