summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/crypto
diff options
context:
space:
mode:
authorIvan Alejandro <ivanalejandro0@gmail.com>2013-10-23 17:34:11 -0300
committerIvan Alejandro <ivanalejandro0@gmail.com>2013-10-29 11:05:59 -0300
commitd3ca8c456c7220a65ef0f88042fe49fb438eddc9 (patch)
tree130575f361d605cfc4c44975c55d905da158dce7 /src/leap/bitmask/crypto
parent30c922e03f61d9c588d4d4eca5edcdf2a5c4056c (diff)
Encode cert path before send it.
Diffstat (limited to 'src/leap/bitmask/crypto')
-rw-r--r--src/leap/bitmask/crypto/srpauth.py8
1 files changed, 6 insertions, 2 deletions
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