You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by an...@apache.org on 2017/01/09 04:52:56 UTC
[36/51] [abbrv] libcloud git commit: check if cert path is a list and
only of 1
check if cert path is a list and only of 1
Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/5528f5bd
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/5528f5bd
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/5528f5bd
Branch: refs/heads/trunk
Commit: 5528f5bdd756fc69403023276430091f91936cc7
Parents: 7ec75c1
Author: Anthony Shaw <an...@apache.org>
Authored: Fri Jan 6 19:36:36 2017 +1100
Committer: Anthony Shaw <an...@apache.org>
Committed: Fri Jan 6 19:36:36 2017 +1100
----------------------------------------------------------------------
libcloud/httplib_ssl.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/libcloud/blob/5528f5bd/libcloud/httplib_ssl.py
----------------------------------------------------------------------
diff --git a/libcloud/httplib_ssl.py b/libcloud/httplib_ssl.py
index 168cb68..640d31a 100644
--- a/libcloud/httplib_ssl.py
+++ b/libcloud/httplib_ssl.py
@@ -149,7 +149,12 @@ class LibcloudBaseConnection(object):
if self.verify is False:
pass
else:
- self.ca_cert = libcloud.security.CA_CERTS_PATH
+ if isinstance(libcloud.security.CA_CERTS_PATH, list):
+ if len(libcloud.security.CA_CERTS_PATH) > 1:
+ raise ValueError('Only 1 certificate path is supported')
+ self.ca_cert = libcloud.security.CA_CERTS_PATH[0]
+ else:
+ self.ca_cert = libcloud.security.CA_CERTS_PATH
class LibcloudConnection(LibcloudBaseConnection):