diff --git a/types/types.go b/types/types.go index a3dd62078..99393afb5 100644 --- a/types/types.go +++ b/types/types.go @@ -528,7 +528,9 @@ func (clientTLS *ClientTLS) CreateTLSConfig() (*tls.Config, error) { } else { ca = []byte(clientTLS.CA) } - caPool.AppendCertsFromPEM(ca) + if !caPool.AppendCertsFromPEM(ca) { + return nil, fmt.Errorf("failed to parse CA") + } if clientTLS.CAOptional { clientAuth = tls.VerifyClientCertIfGiven } else {