Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for PathsForCertAndKey (0.26 sec)

  1. cmd/kubeadm/app/util/pkiutil/pki_helpers.go

    	if err != nil {
    		return nil, errors.Wrapf(err, "could not load the CSR %s", csrPath)
    	}
    
    	return csr, nil
    }
    
    // PathsForCertAndKey returns the paths for the certificate and key given the path and basename.
    func PathsForCertAndKey(pkiPath, name string) (string, string) {
    	return pathForCert(pkiPath, name), pathForKey(pkiPath, name)
    }
    
    func pathForCert(pkiPath, name string) string {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 01 16:01:49 UTC 2024
    - 25.5K bytes
    - Viewed (0)
  2. cmd/kubeadm/app/cmd/certs_test.go

    		})
    		return client, nil
    	}
    
    	// Select a certificate used to simulate a missing certificate file
    	brokenCertName := kubeadmconstants.APIServerCertAndKeyBaseName
    	brokenCertPath, _ := pkiutil.PathsForCertAndKey(cfg.CertificatesDir, brokenCertName)
    
    	type testCase struct {
    		name           string
    		config         string
    		output         string
    		brokenCertName string
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Feb 21 13:26:12 UTC 2024
    - 20.1K bytes
    - Viewed (0)
  3. cmd/kubeadm/app/util/pkiutil/pki_helpers_test.go

    					rt.expected,
    					(actual == nil),
    				)
    			}
    		})
    	}
    }
    
    func TestPathsForCertAndKey(t *testing.T) {
    	crtPath, keyPath := PathsForCertAndKey("/foo", "bar")
    	expectedPath := filepath.FromSlash("/foo/bar.crt")
    	if crtPath != expectedPath {
    		t.Errorf("unexpected certificate path: %s", crtPath)
    	}
    	expectedPath = filepath.FromSlash("/foo/bar.key")
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jan 31 21:49:21 UTC 2024
    - 22.5K bytes
    - Viewed (0)
Back to top