- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for keyCertificateExist (0.3 sec)
-
security/pkg/nodeagent/cache/secretcache.go
return false } return true } // If there is an existing private key and certificate under a well known path, return true. // Otherwise, return false. func (sc *SecretManagerClient) keyCertificateExist(certPath, keyPath string) bool { b, err := os.ReadFile(certPath) if err != nil || len(b) == 0 { return false } b, err = os.ReadFile(keyPath) if err != nil || len(b) == 0 { return false }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Mar 04 08:29:46 UTC 2024 - 28.2K bytes - Viewed (0) -
security/pkg/nodeagent/cache/secretcache_test.go
keyPath: "./testdata/cert-chain.pem", expectResult: true, }, } sc := createCache(t, nil, func(resourceName string) {}, security.Options{}) for _, tc := range testCases { ret := sc.keyCertificateExist(tc.certPath, tc.keyPath) if tc.expectResult != ret { t.Errorf("unexpected result is returned!") } } } func setupTestDir(t *testing.T, sc *SecretManagerClient) { dir := t.TempDir()
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu May 16 22:12:28 UTC 2024 - 23.9K bytes - Viewed (0)