mirror of https://github.com/docker/docker-py.git
Verify TLS keys loaded from docker contexts
This maches the behaviour of the docker cli when using contexts. Signed-off-by: Hakan Ardo <hakan@debian.org>
This commit is contained in:
parent
55f405e04a
commit
c239d66d5d
|
@ -127,8 +127,12 @@ class Context:
|
|||
elif filename.startswith("key"):
|
||||
key = os.path.join(tls_dir, endpoint, filename)
|
||||
if all([ca_cert, cert, key]):
|
||||
verify = None
|
||||
if endpoint == "docker":
|
||||
if not self.endpoints["docker"].get("SkipTLSVerify", False):
|
||||
verify = True
|
||||
certs[endpoint] = TLSConfig(
|
||||
client_cert=(cert, key), ca_cert=ca_cert)
|
||||
client_cert=(cert, key), ca_cert=ca_cert, verify=verify)
|
||||
self.tls_cfg = certs
|
||||
self.tls_path = tls_dir
|
||||
|
||||
|
|
Loading…
Reference in New Issue