summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/crypto
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/bitmask/crypto')
-rw-r--r--src/leap/bitmask/crypto/srpauth.py16
-rwxr-xr-xsrc/leap/bitmask/crypto/tests/fake_provider.py1
2 files changed, 2 insertions, 15 deletions
diff --git a/src/leap/bitmask/crypto/srpauth.py b/src/leap/bitmask/crypto/srpauth.py
index bdd38db2..b46f0ea6 100644
--- a/src/leap/bitmask/crypto/srpauth.py
+++ b/src/leap/bitmask/crypto/srpauth.py
@@ -600,7 +600,8 @@ class SRPAuth(QtCore.QObject):
QtCore.QMutexLocker(self._uuid_lock)
full_uid = "%s@%s" % (
self._username, self._provider_config.get_domain())
- self._settings.set_uuid(full_uid, uuid)
+ if uuid is not None: # avoid removing the uuid from settings
+ self._settings.set_uuid(full_uid, uuid)
self._uuid = uuid
def get_uuid(self):
@@ -655,7 +656,6 @@ class SRPAuth(QtCore.QObject):
username = username.lower()
d = self.__instance.authenticate(username, password)
d.addCallback(self._gui_notify)
- d.addErrback(self._errback)
return d
def change_password(self, current_password, new_password):
@@ -695,18 +695,6 @@ class SRPAuth(QtCore.QObject):
logger.debug("Successful login!")
self.authentication_finished.emit(True, self.tr("Succeeded"))
- def _errback(self, failure):
- """
- General errback for the whole login process. Will notify the
- UI with the proper signal.
-
- :param failure: Failure object captured from a callback.
- :type failure: twisted.python.failure.Failure
- """
- logger.error("Error logging in %s" % (failure,))
- self.authentication_finished.emit(False, "%s" % (failure.value,))
- failure.trap(Exception)
-
def get_session_id(self):
return self.__instance.get_session_id()
diff --git a/src/leap/bitmask/crypto/tests/fake_provider.py b/src/leap/bitmask/crypto/tests/fake_provider.py
index 54af485d..b8cdbb12 100755
--- a/src/leap/bitmask/crypto/tests/fake_provider.py
+++ b/src/leap/bitmask/crypto/tests/fake_provider.py
@@ -280,7 +280,6 @@ class FakeSession(Resource):
if HAMK is None:
print '[server] verification failed!!!'
raise Exception("Authentication failed!")
- #import ipdb;ipdb.set_trace()
assert svr.authenticated()
print "***"