Commit 14ef92cb authored by Stavros Sachtouris's avatar Stavros Sachtouris
Browse files

Initialize kamaki clients with default certs path

Refs #55

If no CA certificates are set, kamaki clients will use
CACERTS_DEFAULT_PATH from "kamaki.defaults".

This commit concerns applications using "kamaki.clients", but does
not affect the kamaki CLI.
parent 99f47050
......@@ -409,6 +409,15 @@ class Client(Logged):
self.response_headers = []
self.response_header_prefices = []
# If no CA certificates are set, get the defaults from kamaki.defaults
if https.HTTPSClientAuthConnection.ca_file is None:
from kamaki import defaults
https.HTTPSClientAuthConnection.ca_file = getattr(
defaults, 'CACERTS_DEFAULT_PATH', None)
except ImportError as ie:
log.debug('ImportError while loading default certs: %s' % ie)
def _unquote_header_keys(headers, prefices):
new_keys = dict()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment