tls: Better error message when certificate curve is not supported (#13462)

This commit is contained in:
Anis Elleuch 2021-10-18 17:32:16 +01:00 committed by GitHub
parent 25b5904b84
commit d86513cbba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -56,7 +56,7 @@ func ParsePublicCertFile(certFile string) (x509Certs []*x509.Certificate, err er
var x509Cert *x509.Certificate
if x509Cert, err = x509.ParseCertificate(pemBlock.Bytes); err != nil {
return nil, ErrSSLUnexpectedData(err)
return nil, ErrSSLUnexpectedData(nil).Msg("Failed to parse `%s`: %s", certFile, err.Error())
}
x509Certs = append(x509Certs, x509Cert)