MCPcopy
hub / github.com/caddyserver/caddy / decodeBase64DERCert

Function decodeBase64DERCert

admin.go:1410–1416  ·  view source on GitHub ↗

decodeBase64DERCert base64-decodes, then DER-decodes, certStr.

(certStr string)

Source from the content-addressed store, hash-verified

1408
1409// decodeBase64DERCert base64-decodes, then DER-decodes, certStr.
1410func decodeBase64DERCert(certStr string) (*x509.Certificate, error) {
1411 derBytes, err := base64.StdEncoding.DecodeString(certStr)
1412 if err != nil {
1413 return nil, err
1414 }
1415 return x509.ParseCertificate(derBytes)
1416}
1417
1418type loggableURLArray []*url.URL
1419

Callers 1

replaceRemoteAdminServerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected