Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 32 for AddCert (0.1 sec)

  1. src/crypto/x509/cert_pool_test.go

    	emptyPool := NewCertPool()
    	nonSystemPopulated := NewCertPool()
    	nonSystemPopulated.AddCert(tc)
    	nonSystemPopulatedAlt := NewCertPool()
    	nonSystemPopulatedAlt.AddCert(otherTC)
    	emptySystem, err := SystemCertPool()
    	if err != nil {
    		t.Fatal(err)
    	}
    	populatedSystem, err := SystemCertPool()
    	if err != nil {
    		t.Fatal(err)
    	}
    	populatedSystem.AddCert(tc)
    	populatedSystemAlt, err := SystemCertPool()
    	if err != nil {
    		t.Fatal(err)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 13 18:06:43 UTC 2022
    - 2.3K bytes
    - Viewed (0)
  2. src/crypto/x509/cert_pool.go

    	// lazily parsing/decompressing it as needed.
    	lazyCerts []lazyCert
    
    	// haveSum maps from sum224(cert.Raw) to true. It's used only
    	// for AddCert duplicate detection, to avoid CertPool.contains
    	// calls in the AddCert path (because the contains method can
    	// call getCert and otherwise negate savings from lazy getCert
    	// funcs).
    	haveSum map[sum224]bool
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 09 19:41:40 UTC 2023
    - 8.9K bytes
    - Viewed (0)
  3. cmd/kubeadm/app/phases/certs/renewal/filerenewer_test.go

    		},
    	}
    
    	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,
    		KeyUsages: []x509.ExtKeyUsage{x509.ExtKeyUsageClientAuth},
    	})
    	if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Sep 28 04:36:54 UTC 2022
    - 1.5K bytes
    - Viewed (0)
  4. src/crypto/tls/example_test.go

    			opts := x509.VerifyOptions{
    				DNSName:       cs.ServerName,
    				Intermediates: x509.NewCertPool(),
    			}
    			for _, cert := range cs.PeerCertificates[1:] {
    				opts.Intermediates.AddCert(cert)
    			}
    			_, err := cs.PeerCertificates[0].Verify(opts)
    			return err
    		},
    	}
    
    	// Server side configuration.
    	_ = &tls.Config{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 27 18:23:49 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  5. src/crypto/x509/root_test.go

    			fallbacksSet = false
    			systemRoots = tc.systemRoots
    			if systemRoots != nil {
    				systemRoots.systemPool = tc.systemPool
    			}
    			for _, c := range tc.poolContent {
    				systemRoots.AddCert(c)
    			}
    			if tc.forceFallback {
    				t.Setenv("GODEBUG", "x509usefallbackroots=1")
    			} else {
    				t.Setenv("GODEBUG", "x509usefallbackroots=0")
    			}
    
    			fallbackPool := NewCertPool()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 18 23:57:10 UTC 2022
    - 2.6K bytes
    - Viewed (0)
  6. pkg/spiffe/spiffe.go

    	if v.certPools[trustDomain] == nil {
    		v.certPools[trustDomain] = x509.NewCertPool()
    	}
    	for _, cert := range certs {
    		v.certPools[trustDomain].AddCert(cert)
    		v.generalCertPool.AddCert(cert)
    	}
    	spiffeLog.Infof("Added %d certs to trust domain %s in peer cert verifier", len(certs), trustDomain)
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 21:07:03 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  7. src/net/http/alpn_test.go

    			t.Errorf("plain request = %q; want %q", body, want)
    		}
    	}
    
    	// Request to an advertised but unhandled NPN protocol.
    	// Server will hang up.
    	{
    		certPool := x509.NewCertPool()
    		certPool.AddCert(ts.Certificate())
    		tr := &Transport{
    			TLSClientConfig: &tls.Config{
    				RootCAs:    certPool,
    				NextProtos: []string{"unhandled-proto"},
    			},
    		}
    		defer tr.CloseIdleConnections()
    		c := &Client{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 20 18:41:18 UTC 2020
    - 3K bytes
    - Viewed (0)
  8. src/crypto/x509/verify_test.go

    	parent, parentKey, err := generateCert("Root CA", true, nil, nil)
    	if err != nil {
    		t.Fatal(err)
    	}
    	roots.AddCert(parent)
    
    	for i := 1; i < 100; i++ {
    		parent, parentKey, err = generateCert("Intermediate CA", true, parent, parentKey)
    		if err != nil {
    			t.Fatal(err)
    		}
    		intermediates.AddCert(parent)
    	}
    
    	leaf, _, err := generateCert("Leaf", false, parent, parentKey)
    	if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 110.2K bytes
    - Viewed (0)
  9. pilot/pkg/trustbundle/trustbundle_test.go

    		w.WriteHeader(http.StatusOK)
    		_, _ = w.Write([]byte(validSpiffeX509Bundle))
    	})
    
    	server1 := httptest.NewTLSServer(validHandler)
    	caCertPool.AddCert(server1.Certificate())
    	defer server1.Close()
    
    	server2 := httptest.NewTLSServer(validHandler)
    	caCertPool.AddCert(server2.Certificate())
    	defer server2.Close()
    
    	tb := NewTrustBundle(caCertPool, mesh.NewFixedWatcher(&meshconfig.MeshConfig{TrustDomain: "cluster.local"}))
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 21:07:03 UTC 2024
    - 13.1K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/authentication/request/x509/x509.go

    	}
    	if optsCopy.Intermediates == nil && len(req.TLS.PeerCertificates) > 1 {
    		optsCopy.Intermediates = x509.NewCertPool()
    		for _, intermediate := range req.TLS.PeerCertificates[1:] {
    			optsCopy.Intermediates.AddCert(intermediate)
    		}
    	}
    
    	/*
    			kubernetes mutual (2-way) x509 between client and apiserver:
    
    				1. apiserver sending its apiserver certificate along with its publickey to client
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Aug 18 01:31:22 UTC 2023
    - 10.3K bytes
    - Viewed (0)
Back to top