Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 62 for certRoot (0.17 sec)

  1. src/cmd/go/internal/vcweb/vcstest/vcstest.go

    	}
    
    	pemBytes, err := os.ReadFile(certFile)
    	if err != nil {
    		return nil, err
    	}
    
    	certpool := x509.NewCertPool()
    	if !certpool.AppendCertsFromPEM(pemBytes) {
    		return nil, fmt.Errorf("no certificates found in %s", certFile)
    	}
    	client.Transport.(*http.Transport).TLSClientConfig = &tls.Config{
    		RootCAs: certpool,
    	}
    
    	return client, nil
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 25 13:44:48 UTC 2022
    - 3.8K bytes
    - Viewed (0)
  2. pkg/test/framework/components/istio/ca.go

    func newCitadelClient(endpoint string, rootCert []byte) (pb.IstioCertificateServiceClient, error) {
    	certPool := x509.NewCertPool()
    	ok := certPool.AppendCertsFromPEM(rootCert)
    	if !ok {
    		return nil, fmt.Errorf("failed to append certificates")
    	}
    	config := tls.Config{
    		RootCAs:            certPool,
    		InsecureSkipVerify: true, // nolint: gosec // test only code
    	}
    	transportCreds := credentials.NewTLS(&config)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Mar 27 16:59:05 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  3. pkg/spiffe/spiffe.go

    type PeerCertVerifier struct {
    	generalCertPool *x509.CertPool
    	certPools       map[string]*x509.CertPool
    }
    
    // NewPeerCertVerifier returns a new PeerCertVerifier.
    func NewPeerCertVerifier() *PeerCertVerifier {
    	return &PeerCertVerifier{
    		generalCertPool: x509.NewCertPool(),
    		certPools:       make(map[string]*x509.CertPool),
    	}
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 21:07:03 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  4. src/crypto/x509/root_plan9.go

    var certFiles = []string{
    	"/sys/lib/tls/ca.pem",
    }
    
    func (c *Certificate) systemVerify(opts *VerifyOptions) (chains [][]*Certificate, err error) {
    	return nil, nil
    }
    
    func loadSystemRoots() (*CertPool, error) {
    	roots := NewCertPool()
    	var bestErr error
    	for _, file := range certFiles {
    		data, err := os.ReadFile(file)
    		if err == nil {
    			roots.AppendCertsFromPEM(data)
    			return roots, nil
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 28 18:17:57 UTC 2021
    - 828 bytes
    - Viewed (0)
  5. src/crypto/x509/root_darwin.go

    	data, err := macOS.SecCertificateCopyData(cert)
    	if err != nil {
    		return nil, err
    	}
    	return ParseCertificate(data)
    }
    
    func loadSystemRoots() (*CertPool, error) {
    	return &CertPool{systemPool: true}, nil
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 01 00:36:38 UTC 2023
    - 3.5K bytes
    - Viewed (0)
  6. src/crypto/tls/generate_cert.go

    		log.Fatalf("Failed to create certificate: %v", err)
    	}
    
    	certOut, err := os.Create("cert.pem")
    	if err != nil {
    		log.Fatalf("Failed to open cert.pem for writing: %v", err)
    	}
    	if err := pem.Encode(certOut, &pem.Block{Type: "CERTIFICATE", Bytes: derBytes}); err != nil {
    		log.Fatalf("Failed to write data to cert.pem: %v", err)
    	}
    	if err := certOut.Close(); err != nil {
    		log.Fatalf("Error closing cert.pem: %v", err)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 08 15:22:02 UTC 2022
    - 4.8K bytes
    - Viewed (0)
  7. src/crypto/x509/root_windows.go

    	"errors"
    	"strings"
    	"syscall"
    	"unsafe"
    )
    
    func loadSystemRoots() (*CertPool, error) {
    	return &CertPool{systemPool: true}, nil
    }
    
    // Creates a new *syscall.CertContext representing the leaf certificate in an in-memory
    // certificate store containing itself and all of the intermediate certificates specified
    // in the opts.Intermediates CertPool.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 09 19:41:40 UTC 2023
    - 8.7K bytes
    - Viewed (0)
  8. istioctl/pkg/kubeinject/kubeinject.go

    	var address string
    	if cc.URL != nil {
    		address = *cc.URL
    	}
    	var certPool *x509.CertPool
    	if len(cc.CABundle) > 0 {
    		certPool = x509.NewCertPool()
    		certPool.AppendCertsFromPEM(cc.CABundle)
    	} else {
    		var err error
    		certPool, err = x509.SystemCertPool()
    		if err != nil {
    			return nil, err
    		}
    	}
    	tlsClientConfig := &tls.Config{RootCAs: certPool, MinVersion: tls.VersionTLS12}
    	client := http.Client{
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Mar 29 02:29:02 UTC 2024
    - 21.6K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/server/egressselector/egress_selector.go

    	if err != nil {
    		return nil, fmt.Errorf("failed to read key pair %s & %s, got %v", clientCert, clientKey, err)
    	}
    	certPool := x509.NewCertPool()
    	if caCert != "" {
    		certBytes, err := os.ReadFile(caCert)
    		if err != nil {
    			return nil, fmt.Errorf("failed to read cert file %s, got %v", caCert, err)
    		}
    		ok := certPool.AppendCertsFromPEM(certBytes)
    		if !ok {
    			return nil, fmt.Errorf("failed to append CA cert to the cert pool")
    		}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jun 29 15:48:39 UTC 2023
    - 12.5K bytes
    - Viewed (0)
  10. pilot/pkg/trustbundle/trustbundle.go

    	endpointUpdateChan chan struct{}
    	remoteCaCertPool   *x509.CertPool
    	meshConfig         mesh.Watcher
    }
    
    var (
    	trustBundleLog = log.RegisterScope("trustBundle", "Workload mTLS trust bundle logs")
    	remoteTimeout  = 10 * time.Second
    )
    
    // NewTrustBundle returns a new trustbundle
    func NewTrustBundle(remoteCaCertPool *x509.CertPool, meshConfig mesh.Watcher) *TrustBundle {
    	var err error
    	tb := &TrustBundle{
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 21:07:03 UTC 2024
    - 7.8K bytes
    - Viewed (0)
Back to top