Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 53 for certPools (0.27 sec)

  1. pkg/spiffe/spiffe.go

    func (v *PeerCertVerifier) GetGeneralCertPool() *x509.CertPool {
    	return v.generalCertPool
    }
    
    // AddMapping adds a new trust domain to certificates mapping to the certPools map.
    func (v *PeerCertVerifier) AddMapping(trustDomain string, certs []*x509.Certificate) {
    	if v.certPools[trustDomain] == nil {
    		v.certPools[trustDomain] = x509.NewCertPool()
    	}
    	for _, cert := range certs {
    		v.certPools[trustDomain].AddCert(cert)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 21:07:03 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  2. src/crypto/x509/root_unix_test.go

    	for _, certPEM := range rootPEMs {
    		wantPool.AppendCertsFromPEM([]byte(certPEM))
    	}
    	strCertPool := func(p *CertPool) string {
    		return string(bytes.Join(p.Subjects(), []byte("\n")))
    	}
    
    	if !certPoolEqual(gotPool, wantPool) {
    		g, w := strCertPool(gotPool), strCertPool(wantPool)
    		t.Fatalf("Mismatched certPools\nGot:\n%s\n\nWant:\n%s", g, w)
    	}
    }
    
    func TestReadUniqueDirectoryEntries(t *testing.T) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 01 00:36:38 UTC 2023
    - 6.1K bytes
    - Viewed (0)
  3. src/crypto/x509/cert_pool.go

    	getCert func() (*Certificate, error)
    }
    
    // NewCertPool returns a new, empty CertPool.
    func NewCertPool() *CertPool {
    	return &CertPool{
    		byName:  make(map[string][]int),
    		haveSum: make(map[sum224]bool),
    	}
    }
    
    // len returns the number of certs in the set.
    // A nil set is a valid empty set.
    func (s *CertPool) len() int {
    	if s == nil {
    		return 0
    	}
    	return len(s.lazyCerts)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 09 19:41:40 UTC 2023
    - 8.9K bytes
    - Viewed (0)
  4. pilot/pkg/grpc/tls.go

    }
    
    func getRootCertificate(rootCertFile string) (*x509.CertPool, error) {
    	var certPool *x509.CertPool
    	var rootCert []byte
    	var err error
    
    	if rootCertFile != "" {
    		rootCert, err = os.ReadFile(rootCertFile)
    		if err != nil {
    			return nil, err
    		}
    
    		certPool = x509.NewCertPool()
    		ok := certPool.AppendCertsFromPEM(rootCert)
    		if !ok {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Mar 28 22:11:02 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  5. pkg/test/echo/client.go

    		if err != nil {
    			return nil, err
    		}
    
    		var certPool *x509.CertPool
    		certPool, err = x509.SystemCertPool()
    		if err != nil {
    			return nil, fmt.Errorf("failed to fetch Cert from SystemCertPool: %v", err)
    		}
    
    		if tlsSettings.RootCert != "" && !certPool.AppendCertsFromPEM([]byte(tlsSettings.RootCert)) {
    			return nil, fmt.Errorf("failed to create cert pool")
    		}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Nov 14 20:23:34 UTC 2022
    - 4.1K bytes
    - Viewed (0)
  6. src/crypto/x509/root.go

    // See go.dev/issue/67401.
    //
    //go:linkname systemRoots
    var (
    	once           sync.Once
    	systemRootsMu  sync.RWMutex
    	systemRoots    *CertPool
    	systemRootsErr error
    	fallbacksSet   bool
    )
    
    func systemRootsPool() *CertPool {
    	once.Do(initSystemRoots)
    	systemRootsMu.RLock()
    	defer systemRootsMu.RUnlock()
    	return systemRoots
    }
    
    func initSystemRoots() {
    	systemRootsMu.Lock()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  7. src/net/http/alpn_test.go

    		}
    	}
    
    	// 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{
    			Transport: tr,
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 20 18:41:18 UTC 2020
    - 3K bytes
    - Viewed (0)
  8. internal/config/dns/operator_dns.go

    	return func(args *OperatorDNS) {
    		args.username = username
    		args.password = password
    	}
    }
    
    // RootCAs - add custom trust certs pool
    func RootCAs(certPool *x509.CertPool) OperatorOption {
    	return func(args *OperatorDNS) {
    		args.rootCAs = certPool
    	}
    }
    
    // NewOperatorDNS - initialize a new K8S Operator DNS set/unset values.
    func NewOperatorDNS(endpoint string, setters ...OperatorOption) (Store, error) {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Mar 06 16:56:10 UTC 2023
    - 6.6K bytes
    - Viewed (0)
  9. pkg/test/echo/server/forwarder/config.go

    	}
    	if r.InsecureSkipVerify || r.CaCert == "" {
    		tlsConfig.InsecureSkipVerify = true
    	} else if r.CaCert != "" {
    		certPool := x509.NewCertPool()
    		if !certPool.AppendCertsFromPEM([]byte(r.CaCert)) {
    			return nil, fmt.Errorf("failed to create cert pool")
    		}
    		tlsConfig.RootCAs = certPool
    	}
    
    	setALPNForHTTP := func() {
    		if r.Alpn == nil {
    			switch {
    			case r.Http3:
    				// Do nothing.
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sun Oct 08 09:39:20 UTC 2023
    - 9.8K bytes
    - Viewed (0)
  10. src/crypto/x509/cert_pool_test.go

    	}
    	populatedSystem.AddCert(tc)
    	populatedSystemAlt, err := SystemCertPool()
    	if err != nil {
    		t.Fatal(err)
    	}
    	populatedSystemAlt.AddCert(otherTC)
    	tests := []struct {
    		name  string
    		a     *CertPool
    		b     *CertPool
    		equal bool
    	}{
    		{
    			name:  "two empty pools",
    			a:     emptyPool,
    			b:     emptyPool,
    			equal: true,
    		},
    		{
    			name:  "one empty pool, one populated pool",
    			a:     emptyPool,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 13 18:06:43 UTC 2022
    - 2.3K bytes
    - Viewed (0)
Back to top