summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/crypto
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2013-11-15 10:35:43 -0300
committerTomás Touceda <chiiph@leap.se>2013-11-15 10:35:43 -0300
commitd51d6bedfecd41491f2c8243235e7d3db043a4d7 (patch)
tree3d6152565be983d0e6ddc1fb0ce764bee060fc25 /src/leap/bitmask/crypto
parent23e9034664edf6b2a01a677c4fa4e6efd880e364 (diff)
parent72f53cc32bf20b00bcbd5f28bab5fc25250215bf (diff)
Merge branch 'release-0.3.7'0.3.7
Diffstat (limited to 'src/leap/bitmask/crypto')
-rw-r--r--src/leap/bitmask/crypto/srpauth.py1
-rw-r--r--src/leap/bitmask/crypto/srpregister.py6
2 files changed, 4 insertions, 3 deletions
diff --git a/src/leap/bitmask/crypto/srpauth.py b/src/leap/bitmask/crypto/srpauth.py
index ab98850d..85b9b003 100644
--- a/src/leap/bitmask/crypto/srpauth.py
+++ b/src/leap/bitmask/crypto/srpauth.py
@@ -581,6 +581,7 @@ class SRPAuth(QtCore.QObject):
else:
self.set_session_id(None)
self.set_uid(None)
+ self.set_token(None)
# Also reset the session
self._session = self._fetcher.session()
logger.debug("Successfully logged out.")
diff --git a/src/leap/bitmask/crypto/srpregister.py b/src/leap/bitmask/crypto/srpregister.py
index 5c0a8efc..02a1ea63 100644
--- a/src/leap/bitmask/crypto/srpregister.py
+++ b/src/leap/bitmask/crypto/srpregister.py
@@ -108,7 +108,8 @@ class SRPRegister(QtCore.QObject):
:rparam: (ok, request)
"""
- username = username.lower()
+ username = username.lower().encode('utf-8')
+ password = password.encode('utf-8')
salt, verifier = self._srp.create_salted_verification_key(
username,
@@ -140,8 +141,7 @@ class SRPRegister(QtCore.QObject):
verify=self._provider_config.
get_ca_cert_path())
- except (requests.exceptions.SSLError,
- requests.exceptions.ConnectionError) as exc:
+ except requests.exceptions.RequestException as exc:
logger.error(exc.message)
ok = False
else: