Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for SetFromFilesAndNotify (0.3 sec)

  1. pilot/pkg/keycertbundle/watcher.go

    		w.bundle.CABundle = caBundle
    	}
    	for _, ch := range w.watchers {
    		select {
    		case ch <- struct{}{}:
    		default:
    		}
    	}
    }
    
    // SetFromFilesAndNotify sets the key cert and root cert from files and notify the watchers.
    func (w *Watcher) SetFromFilesAndNotify(keyFile, certFile, rootCert string) error {
    	cert, err := os.ReadFile(certFile)
    	if err != nil {
    		return err
    	}
    	key, err := os.ReadFile(keyFile)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jun 05 14:00:18 UTC 2023
    - 2.6K bytes
    - Viewed (0)
  2. pilot/pkg/keycertbundle/watcher_test.go

    	caFile := path.Join(tmpDir, "ca.pem")
    
    	os.WriteFile(keyFile, key, os.ModePerm)
    	os.WriteFile(certFile, cert, os.ModePerm)
    	os.WriteFile(caFile, ca, os.ModePerm)
    
    	// 2. set key cert bundle
    	watcher.SetFromFilesAndNotify(keyFile, certFile, caFile)
    	select {
    	case <-watch1:
    		keyCertBundle := watcher.GetKeyCertBundle()
    		if !bytes.Equal(keyCertBundle.KeyPem, key) || !bytes.Equal(keyCertBundle.CertPem, cert) ||
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Jan 28 17:46:00 UTC 2022
    - 3.1K bytes
    - Viewed (0)
  3. pilot/pkg/bootstrap/certcontroller.go

    // when /var/run/secrets/istiod/tls is used. Not to be confused with the /etc/cacerts path.
    func (s *Server) initFileCertificateWatches(tlsOptions TLSOptions) error {
    	if err := s.istiodCertBundleWatcher.SetFromFilesAndNotify(tlsOptions.KeyFile, tlsOptions.CertFile, tlsOptions.CaCertFile); err != nil {
    		return fmt.Errorf("set keyCertBundle failed: %v", err)
    	}
    	// TODO: Setup watcher for root and restart server if it changes.
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jun 13 17:48:28 UTC 2024
    - 11.3K bytes
    - Viewed (0)
Back to top