Skip to content

Commit 0ae5c29

Browse files
author
aianchici
committed
Merge pull request #1 from aianchici/configure-certs-for-redirects
Set the certificate information regardless of protocol
2 parents 6ccabd8 + 8cc31c6 commit 0ae5c29

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

src/etcd/client.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -102,18 +102,18 @@ def uri(protocol, host, port):
102102
# (<1.0) won't be able to connect.
103103
kw['ssl_version'] = ssl.PROTOCOL_TLSv1
104104

105-
if cert:
106-
if isinstance(cert, tuple):
107-
# Key and cert are separate
108-
kw['cert_file'] = cert[0]
109-
kw['key_file'] = cert[1]
110-
else:
111-
# combined certificate
112-
kw['cert_file'] = cert
105+
if cert:
106+
if isinstance(cert, tuple):
107+
# Key and cert are separate
108+
kw['cert_file'] = cert[0]
109+
kw['key_file'] = cert[1]
110+
else:
111+
# combined certificate
112+
kw['cert_file'] = cert
113113

114-
if ca_cert:
115-
kw['ca_certs'] = ca_cert
116-
kw['cert_reqs'] = ssl.CERT_REQUIRED
114+
if ca_cert:
115+
kw['ca_certs'] = ca_cert
116+
kw['cert_reqs'] = ssl.CERT_REQUIRED
117117

118118
self.http = urllib3.PoolManager(num_pools=10, **kw)
119119

0 commit comments

Comments
 (0)