From d3ca8c456c7220a65ef0f88042fe49fb438eddc9 Mon Sep 17 00:00:00 2001 From: Ivan Alejandro Date: Wed, 23 Oct 2013 17:34:11 -0300 Subject: Encode cert path before send it. --- src/leap/bitmask/crypto/srpauth.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/leap/bitmask') diff --git a/src/leap/bitmask/crypto/srpauth.py b/src/leap/bitmask/crypto/srpauth.py index 47ed21b0..31316f17 100644 --- a/src/leap/bitmask/crypto/srpauth.py +++ b/src/leap/bitmask/crypto/srpauth.py @@ -17,6 +17,7 @@ import binascii import logging +import sys import requests import srp @@ -249,10 +250,13 @@ class SRPAuth(QtCore.QObject): (self._provider_config.get_api_uri(), self._provider_config.get_api_version(), "sessions") + + ca_cert_path = self._provider_config.get_ca_cert_path() + ca_cert_path = ca_cert_path.encode(sys.getfilesystemencoding()) + init_session = self._session.post(sessions_url, data=auth_data, - verify=self._provider_config. - get_ca_cert_path(), + verify=ca_cert_path, timeout=REQUEST_TIMEOUT) # Clean up A value, we don't need it anymore self._srp_a = None -- cgit v1.2.3