mirror of
https://github.com/traefik/traefik.git
synced 2025-09-25 15:51:15 +02:00
Return an error if kv store CA cert is invalid
This commit is contained in:
parent
8d8e509fe6
commit
61e1836472
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user