Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for pathForCert (0.39 sec)

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

    }
    
    // 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 {
    	return filepath.Join(pkiPath, fmt.Sprintf("%s.crt", name))
    }
    
    func pathForKey(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/util/pkiutil/pki_helpers_test.go

    	}
    	expectedPath = filepath.FromSlash("/foo/bar.key")
    	if keyPath != expectedPath {
    		t.Errorf("unexpected key path: %s", keyPath)
    	}
    }
    
    func TestPathForCert(t *testing.T) {
    	crtPath := pathForCert("/foo", "bar")
    	expectedPath := filepath.FromSlash("/foo/bar.crt")
    	if crtPath != expectedPath {
    		t.Errorf("unexpected certificate path: %s", crtPath)
    	}
    }
    
    func TestPathForKey(t *testing.T) {
    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