Skip to content

Commit

Permalink
Fix mixup in disabling SSL cert verification.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Kelly committed Mar 5, 2012
1 parent b40422d commit bc9ea86
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions django_browserid/base.py
Expand Up @@ -88,15 +88,15 @@ def _verify_http_request(url, qs):
parameters = {
'data': qs,
'proxies': getattr(settings, 'BROWSERID_PROXY_INFO', None),
'verify': getattr(settings, 'BROWSERID_DISABLE_CERT_CHECK', False),
'verify': not getattr(settings, 'BROWSERID_DISABLE_CERT_CHECK', False),
'headers': {'Content-type': 'application/x-www-form-urlencoded'},
'params': {
'timeout': getattr(settings, 'BROWSERID_HTTP_TIMEOUT',
DEFAULT_HTTP_TIMEOUT)
}
}

if not parameters['verify']:
if parameters['verify']:
parameters['verify'] = getattr(settings, 'BROWSERID_CACERT_FILE', True)

r = requests.post(url, **parameters)
Expand Down

0 comments on commit bc9ea86

Please sign in to comment.