Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for systemRootsPool (0.23 sec)

  1. src/crypto/x509/root_test.go

    		}
    	}()
    	SetFallbackRoots(nil)
    	SetFallbackRoots(nil)
    }
    
    func TestFallback(t *testing.T) {
    	// call systemRootsPool so that the sync.Once is triggered, and we can
    	// manipulate systemRoots without worrying about our working being overwritten
    	systemRootsPool()
    	if systemRoots != nil {
    		originalSystemRoots := *systemRoots
    		defer func() { systemRoots = &originalSystemRoots }()
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 18 23:57:10 UTC 2022
    - 2.6K bytes
    - Viewed (0)
  2. 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()
    	defer systemRootsMu.Unlock()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  3. src/crypto/x509/cert_pool.go

    // any other pool returned by SystemCertPool.
    //
    // New changes in the system cert pool might not be reflected in subsequent calls.
    func SystemCertPool() (*CertPool, error) {
    	if sysRoots := systemRootsPool(); sysRoots != nil {
    		return sysRoots.Clone(), nil
    	}
    
    	return loadSystemRoots()
    }
    
    type potentialParent struct {
    	cert       *Certificate
    	constraint func([]*Certificate) error
    }
    
    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. src/crypto/x509/verify.go

    		// Don't use the system verifier if the system pool was replaced with a non-system pool,
    		// i.e. if SetFallbackRoots was called with x509usefallbackroots=1.
    		systemPool := systemRootsPool()
    		if opts.Roots == nil && (systemPool == nil || systemPool.systemPool) {
    			return c.systemVerify(&opts)
    		}
    		if opts.Roots != nil && opts.Roots.systemPool {
    			platformChains, err := c.systemVerify(&opts)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 22:58:39 UTC 2024
    - 35.7K bytes
    - Viewed (0)
  5. src/crypto/x509/verify_test.go

    		t.Skip("Windows and darwin do not use (or support) systemRoots")
    	}
    
    	defer func(oldSystemRoots *CertPool) { systemRoots = oldSystemRoots }(systemRootsPool())
    
    	opts := VerifyOptions{
    		Intermediates: NewCertPool(),
    		DNSName:       "www.google.com",
    		CurrentTime:   time.Unix(1677615892, 0),
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 110.2K bytes
    - Viewed (0)
Back to top