Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for NewVerifiedKeyCertBundleFromFile (0.46 sec)

  1. security/pkg/nodeagent/caclient/providers/mock/mockcaclient.go

    	cl := CAClient{
    		SignInvokeCount: 0,
    		certLifetime:    certLifetime,
    		mockTrustAnchor: mockTrustAnchor,
    	}
    	bundle, err := util.NewVerifiedKeyCertBundleFromFile(caCertPath, caKeyPath, certChainPath, rootCertPath)
    	if err != nil {
    		return nil, fmt.Errorf("mock ca client creation error: %v", err)
    	}
    	cl.bundle = bundle
    
    	atomic.StoreUint64(&cl.SignInvokeCount, 0)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 16 22:12:28 UTC 2024
    - 3K bytes
    - Viewed (0)
  2. security/pkg/pki/util/keycertbundle.go

    		return nil, err
    	}
    	return bundle, nil
    }
    
    // NewVerifiedKeyCertBundleFromFile returns a new KeyCertBundle, or error if the provided certs failed the
    // verification.
    func NewVerifiedKeyCertBundleFromFile(certFile string, privKeyFile string, certChainFiles []string, rootCertFile string) (
    	*KeyCertBundle, error,
    ) {
    	certBytes, err := os.ReadFile(certFile)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sun Jan 21 06:07:50 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  3. tests/fuzz/pki_fuzzer.go

    	rootCertFileBytes, err := f.GetBytes()
    	if err != nil {
    		return 0
    	}
    	_, err = rootCertFile.Write(rootCertFileBytes)
    	if err != nil {
    		return 0
    	}
    	bundle, err := util.NewVerifiedKeyCertBundleFromFile("certfile", "privKeyFile", []string{"certChainFile"}, "rootCertFile")
    	if err != nil {
    		return 0
    	}
    	_, err = bundle.CertOptions()
    	if err == nil {
    		panic("Ran successfully")
    	}
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jun 05 14:00:25 UTC 2023
    - 5.2K bytes
    - Viewed (0)
  4. security/pkg/pki/util/keycertbundle_test.go

    				Org:      "Juju org",
    				IsCA:     false,
    				ECSigAlg: EcdsaSigAlg,
    			},
    			expectedErr: "",
    		},
    	}
    	for id, tc := range testCases {
    		k, err := NewVerifiedKeyCertBundleFromFile(tc.caCertFile, tc.caKeyFile, tc.certChainFile, tc.rootCertFile)
    		if err != nil {
    			t.Fatalf("%s: Unexpected error: %v", id, err)
    		}
    		opts, err := k.CertOptions()
    		if err != nil {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sun Jan 21 06:07:50 UTC 2024
    - 15.8K bytes
    - Viewed (0)
  5. security/pkg/pki/ca/ca.go

    	caOpts = &IstioCAOptions{
    		CAType:         pluggedCertCA,
    		DefaultCertTTL: defaultCertTTL,
    		MaxCertTTL:     maxCertTTL,
    		CARSAKeySize:   caRSAKeySize,
    	}
    
    	if caOpts.KeyCertBundle, err = util.NewVerifiedKeyCertBundleFromFile(
    		fileBundle.SigningCertFile, fileBundle.SigningKeyFile, fileBundle.CertChainFiles, fileBundle.RootCertFile); err != nil {
    		return nil, fmt.Errorf("failed to create CA KeyCertBundle (%v)", err)
    	}
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Nov 30 19:33:26 UTC 2023
    - 17.2K bytes
    - Viewed (0)
  6. security/pkg/pki/util/generate_cert_test.go

    				}
    			}
    		})
    	}
    }
    
    func TestGenCertFromCSR(t *testing.T) {
    	keyFile := "../testdata/key.pem"
    	certFile := "../testdata/cert.pem"
    	keycert, err := NewVerifiedKeyCertBundleFromFile(certFile, keyFile, nil, certFile)
    	if err != nil {
    		t.Errorf("Failed to load CA key and cert from files: %s, %s", keyFile, certFile)
    	}
    	signingCert, signingKey, _, _ := keycert.GetAll()
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Nov 06 12:48:53 UTC 2023
    - 29.4K bytes
    - Viewed (0)
Back to top