FindDefaultOriginCertPath returns the first path that contains a cert.pem file. If none of the DefaultConfigSearchDirectories contains a cert.pem file, return empty string
()
| 46 | // FindDefaultOriginCertPath returns the first path that contains a cert.pem file. If none of the |
| 47 | // DefaultConfigSearchDirectories contains a cert.pem file, return empty string |
| 48 | func FindDefaultOriginCertPath() string { |
| 49 | for _, defaultConfigDir := range config.DefaultConfigSearchDirectories() { |
| 50 | originCertPath, _ := homedir.Expand(filepath.Join(defaultConfigDir, DefaultCredentialFile)) |
| 51 | if ok := fileExists(originCertPath); ok { |
| 52 | return originCertPath |
| 53 | } |
| 54 | } |
| 55 | return "" |
| 56 | } |
| 57 | |
| 58 | func DecodeOriginCert(blocks []byte) (*OriginCert, error) { |
| 59 | return decodeOriginCert(blocks) |
no test coverage detected