Commit 6912709b by x

Fix ssl_verify

parent ba97bf0e
......@@ -20,23 +20,23 @@ class StoreApi:
headers = {'content-type': 'application/json'}
if settings['ssl_auth'] == 'True' and settings['basic_auth'] == 'True':
r = requests.post(url, data=payload, headers=headers, \
verify = settings['verify_ssl'], \
verify = settings['verify_ssl']=='True', \
cert=(settings['store_client_cert'], settings['store_client_key']), \
auth=(settings['store_client_user'], settings['store_client_pass'])
)
elif settings['ssl_auth'] == 'True':
r = requests.post(url, data=payload, headers=headers, \
verify = settings['verify_ssl'], \
verify = settings['verify_ssl']=='True', \
cert=(settings['store_client_cert'], settings['store_client_key']) \
)
elif settings['basic_auth'] == 'True':
r = requests.post(url, data=payload, headers=headers, \
verify = settings['verify_ssl'], \
verify = settings['verify_ssl']=='True', \
auth=(settings['store_client_user'], settings['store_client_pass']) \
)
else:
r = requests.post(url, data=payload, headers=headers, \
verify = settings['verify_ssl'] \
verify = settings['verify_ssl']=='True' \
)
return r
@staticmethod
......@@ -44,23 +44,23 @@ class StoreApi:
headers = {'content-type': 'application/json'}
if settings['ssl_auth'] == 'True' and settings['basic_auth'] == 'True':
r = requests.get(url, headers=headers, \
verify = settings['verify_ssl'], \
verify = settings['verify_ssl']=='True', \
cert=(settings['store_client_cert'], settings['store_client_key']), \
auth=(settings['store_client_user'], settings['store_client_pass'])
)
elif settings['ssl_auth'] == 'True':
r = requests.get(url, headers=headers, \
verify = settings['verify_ssl'], \
verify = settings['verify_ssl']=='True', \
cert=(settings['store_client_cert'], settings['store_client_key']) \
)
elif settings['basic_auth'] == 'True':
r = requests.get(url, headers=headers, \
verify = settings['verify_ssl'], \
verify = settings['verify_ssl']=='True', \
auth=(settings['store_client_user'], settings['store_client_pass']) \
)
else:
r = requests.get(url, headers=headers, \
verify = settings['verify_ssl'] \
verify = settings['verify_ssl']=='True' \
)
return r
@staticmethod
......
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 sign in to comment