MCPcopy Index your code
hub / github.com/ContainerSSH/ContainerSSH / loadPEM

Function loadPEM

config/http.go:539–545  ·  view source on GitHub ↗
(spec string)

Source from the content-addressed store, hash-verified

537}
538
539func loadPEM(spec string) ([]byte, error) {
540 if !strings.HasPrefix(strings.TrimSpace(spec), "-----") {
541 // We are deliberately reading a file here.
542 return os.ReadFile(spec) //nolint:gosec
543 }
544 return []byte(spec), nil
545}

Callers 3

validateClientCertMethod · 0.85
validateCACertMethod · 0.85
ValidateWithCertsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected