Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for AddCert (0.14 sec)

  1. 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)
  2. 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)
  3. 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)
  4. src/crypto/tls/boring_test.go

    				t.Errorf("%s: BAD accept", desc)
    			}
    		}
    	}
    
    	// Run simple basic test with known answers before proceeding to
    	// exhaustive test with computed answers.
    	r1pool := x509.NewCertPool()
    	r1pool.AddCert(R1.cert)
    	testServerCert(t, "basic", r1pool, L2_I.key, [][]byte{L2_I.der, I_R1.der}, true)
    	testClientCert(t, "basic (client cert)", r1pool, L2_I.key, [][]byte{L2_I.der, I_R1.der}, true)
    	fipstls.Force()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:45:37 UTC 2024
    - 19.4K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiserver/pkg/server/dynamiccertificates/tlsconfig.go

    			}
    
    			newClientCAPool.AddCert(cert)
    		}
    
    		newTLSConfigCopy.ClientCAs = newClientCAPool
    	}
    
    	if len(newContent.servingCert.cert) > 0 && len(newContent.servingCert.key) > 0 {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/authentication/request/x509/x509_test.go

    PKJQCs0CM0zkesktuLi/gFpuB0nEwyOgLg==
    -----END CERTIFICATE-----`
    )
    
    func TestX509(t *testing.T) {
    	multilevelOpts := DefaultVerifyOptions()
    	multilevelOpts.Roots = x509.NewCertPool()
    	multilevelOpts.Roots.AddCert(getCertsFromFile(t, "root")[0])
    
    	testCases := map[string]struct {
    		Insecure bool
    		Certs    []*x509.Certificate
    
    		Opts x509.VerifyOptions
    		User UserConversion
    
    		ExpectUserName string
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 02 23:23:03 UTC 2024
    - 36.9K bytes
    - Viewed (0)
  7. pkg/spiffe/spiffe_test.go

    			h.statusCode = c.statusCode
    
    			caCertPool, err := x509.SystemCertPool()
    			if err != nil {
    				t.Fatalf("failed to get SystemCertPool: %v", err)
    			}
    			for _, cert := range c.extraCerts {
    				caCertPool.AddCert(cert)
    			}
    
    			// This is the system-under-test.
    			rootCertMap, err := RetrieveSpiffeBundleRootCerts(c.in, caCertPool, time.Millisecond*50)
    
    			if c.errContains != "" {
    				if err == nil {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 21:07:03 UTC 2024
    - 18.1K bytes
    - Viewed (0)
  8. src/crypto/tls/bogo_shim_test.go

    			log.Fatalf("load trust-cert err: %s", err)
    		}
    		block, _ := pem.Decode(certFile)
    		cert, err := x509.ParseCertificate(block.Bytes)
    		if err != nil {
    			log.Fatalf("parse trust-cert err: %s", err)
    		}
    		pool.AddCert(cert)
    		cfg.RootCAs = pool
    	}
    
    	if *requireAnyClientCertificate {
    		cfg.ClientAuth = RequireAnyClientCert
    	}
    	if *verifyPeer {
    		cfg.ClientAuth = VerifyClientCertIfGiven
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 11 17:25:39 UTC 2024
    - 12.6K bytes
    - Viewed (0)
  9. cmd/kubeadm/app/util/pkiutil/pki_helpers.go

    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)
  10. staging/src/k8s.io/apiserver/pkg/server/options/serving_test.go

    					preparedServerErrors <- err
    				}
    			}()
    
    			// load ca certificates into a pool
    			roots := x509.NewCertPool()
    			for _, caCert := range caCerts {
    				roots.AddCert(caCert)
    			}
    
    			<-startedCh
    
    			// try to dial
    			addr := fmt.Sprintf("localhost:%d", secureOptions.BindPort)
    			t.Logf("Dialing %s as %q", addr, test.ServerName)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 09 15:52:39 UTC 2024
    - 13.8K bytes
    - Viewed (0)
Back to top