mirror of
https://github.com/traefik/traefik.git
synced 2025-09-26 00:01: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 {
|
} else {
|
||||||
ca = []byte(clientTLS.CA)
|
ca = []byte(clientTLS.CA)
|
||||||
}
|
}
|
||||||
caPool.AppendCertsFromPEM(ca)
|
if !caPool.AppendCertsFromPEM(ca) {
|
||||||
|
return nil, fmt.Errorf("failed to parse CA")
|
||||||
|
}
|
||||||
if clientTLS.CAOptional {
|
if clientTLS.CAOptional {
|
||||||
clientAuth = tls.VerifyClientCertIfGiven
|
clientAuth = tls.VerifyClientCertIfGiven
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user