Skip to content
This repository has been archived by the owner on Mar 12, 2020. It is now read-only.

Commit

Permalink
Make cert verification actually work
Browse files Browse the repository at this point in the history
Certificate used to be given to 'cert' parameter for requests which
is actually for client certs. Pass it to 'verify' instead.
  • Loading branch information
dividedmind committed Dec 3, 2014
1 parent 0b90355 commit 35d7dfa
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 2 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Version 0.3.1
* make the certificate verification actually work
7 changes: 4 additions & 3 deletions conjur/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,10 @@ def request(self, method, url, **kwargs):

def _request(self, method, url, *args, **kwargs):
if 'verify' not in kwargs:
kwargs['verify'] = self.config.verify_ssl
if self.config.cert_file is not None and 'cert' not in kwargs:
kwargs['cert'] = self.config.cert_file
if self.config.verify_ssl and self.config.cert_file is not None:
kwargs['verify'] = self.config.cert_file
else:
kwargs['verify'] = self.config.verify_ssl
check_errors = kwargs.pop('check_errors', True)

response = getattr(requests, method.lower())(url, *args, **kwargs)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name='Conjur',
version='0.3.0',
version='0.3.1',
packages=find_packages(),
install_requires=open('requirements.txt').readlines(),
package_data={},
Expand Down

0 comments on commit 35d7dfa

Please sign in to comment.