- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for TryLoadCertAndKeyFromDisk (0.3 sec)
-
cmd/kubeadm/app/cmd/kubeconfig_test.go
// Adds a pki folder with a ca cert to the temp folder pkidir := testutil.SetupPkiDirWithCertificateAuthority(t, tmpdir) // Retrieves ca cert for assertions caCert, _, err := pkiutil.TryLoadCertAndKeyFromDisk(pkidir, kubeadmconstants.CACertAndKeyBaseName) if err != nil { t.Fatalf("couldn't retrieve ca cert: %v", err) } var tests = []struct { name string command string
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 01 16:01:49 UTC 2024 - 5.5K bytes - Viewed (0) -
cmd/kubeadm/app/phases/kubeconfig/kubeconfig.go
// NB. this method holds the information about how kubeadm creates kubeconfig files. func getKubeConfigSpecs(cfg *kubeadmapi.InitConfiguration) (map[string]*kubeConfigSpec, error) { caCert, caKey, err := pkiutil.TryLoadCertAndKeyFromDisk(cfg.CertificatesDir, kubeadmconstants.CACertAndKeyBaseName) if os.IsNotExist(errors.Cause(err)) { return nil, errors.Wrap(err, "the CA files do not exist, please run `kubeadm init phase certs ca` to generate it") }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Jun 07 17:04:18 UTC 2024 - 27K bytes - Viewed (0) -
cmd/kubeadm/app/util/pkiutil/pki_helpers.go
_, csrErr := os.Stat(csrPath) _, keyErr := os.Stat(keyPath) return !(os.IsNotExist(csrErr) && os.IsNotExist(keyErr)) } // TryLoadCertAndKeyFromDisk tries to load a cert and a key from the disk and validates that they are valid func TryLoadCertAndKeyFromDisk(pkiPath, name string) (*x509.Certificate, crypto.Signer, error) { cert, err := TryLoadCertFromDisk(pkiPath, name) if err != nil {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 01 16:01:49 UTC 2024 - 25.5K bytes - Viewed (0) -
cmd/kubeadm/app/phases/kubeconfig/kubeconfig_test.go
// Adds a pki folder with a ca cert to the temp folder pkidir := testutil.SetupPkiDirWithCertificateAuthority(t, tmpdir) // Retrieves ca cert for assertions caCert, _, err := pkiutil.TryLoadCertAndKeyFromDisk(pkidir, kubeadmconstants.CACertAndKeyBaseName) if err != nil { t.Fatalf("couldn't retrieve ca cert: %v", err) } // Creates an InitConfiguration pointing to the pkidir folder
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Jun 07 17:04:18 UTC 2024 - 39.5K bytes - Viewed (0)