From d86513cbba93ced220439e0efeec60be1fe481f9 Mon Sep 17 00:00:00 2001 From: Anis Elleuch Date: Mon, 18 Oct 2021 17:32:16 +0100 Subject: [PATCH] tls: Better error message when certificate curve is not supported (#13462) --- internal/config/certs.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/config/certs.go b/internal/config/certs.go index ec7e35683..5903fcc09 100644 --- a/internal/config/certs.go +++ b/internal/config/certs.go @@ -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)