decodeBase64DERCert base64-decodes, then DER-decodes, certStr.
(certStr string)
| 918 | |
| 919 | // decodeBase64DERCert base64-decodes, then DER-decodes, certStr. |
| 920 | func decodeBase64DERCert(certStr string) (*x509.Certificate, error) { |
| 921 | derBytes, err := base64.StdEncoding.DecodeString(certStr) |
| 922 | if err != nil { |
| 923 | return nil, err |
| 924 | } |
| 925 | return x509.ParseCertificate(derBytes) |
| 926 | } |
| 927 | |
| 928 | // setDefaultTLSParams sets the default TLS cipher suites, protocol versions, |
| 929 | // and server preferences of cfg if they are not already set; it does not |
no outgoing calls
no test coverage detected