summaryrefslogtreecommitdiff
path: root/client/src
diff options
context:
space:
mode:
Diffstat (limited to 'client/src')
-rw-r--r--client/src/leap/soledad/client/__init__.py11
-rw-r--r--client/src/leap/soledad/client/shared_db.py4
2 files changed, 7 insertions, 8 deletions
diff --git a/client/src/leap/soledad/client/__init__.py b/client/src/leap/soledad/client/__init__.py
index 46e3cd5f..8881b422 100644
--- a/client/src/leap/soledad/client/__init__.py
+++ b/client/src/leap/soledad/client/__init__.py
@@ -720,8 +720,9 @@ class Soledad(object):
:return: the hash
:rtype: str
"""
- return sha256('%s%s' %
- (self._passphrase_as_string(), self.uuid)).hexdigest()
+ return sha256(
+ '%s%s' %
+ (self._passphrase_as_string(), self.uuid)).hexdigest()
def _get_secrets_from_shared_db(self):
"""
@@ -1211,7 +1212,6 @@ class Soledad(object):
"""
soledad_assert(self.STORAGE_SECRETS_KEY in data)
# check mac of the recovery document
- #mac_auth = False # XXX ?
mac = None
if MAC_KEY in data:
soledad_assert(data[MAC_KEY] is not None)
@@ -1234,7 +1234,6 @@ class Soledad(object):
if mac != data[MAC_KEY]:
raise WrongMac('Could not authenticate recovery document\'s '
'contents.')
- #mac_auth = True # XXX ?
# include secrets in the secret pool.
secrets = 0
for secret_id, secret_data in data[self.STORAGE_SECRETS_KEY].items():
@@ -1296,9 +1295,9 @@ class Soledad(object):
return self._passphrase.encode('utf-8')
-#-----------------------------------------------------------------------------
+# ----------------------------------------------------------------------------
# Monkey patching u1db to be able to provide a custom SSL cert
-#-----------------------------------------------------------------------------
+# ----------------------------------------------------------------------------
# We need a more reasonable timeout (in seconds)
SOLEDAD_TIMEOUT = 120
diff --git a/client/src/leap/soledad/client/shared_db.py b/client/src/leap/soledad/client/shared_db.py
index 0753cbb5..52e51c6f 100644
--- a/client/src/leap/soledad/client/shared_db.py
+++ b/client/src/leap/soledad/client/shared_db.py
@@ -30,9 +30,9 @@ from leap.soledad.common import SHARED_DB_LOCK_DOC_ID_PREFIX
from leap.soledad.client.auth import TokenBasedAuth
-#-----------------------------------------------------------------------------
+# ----------------------------------------------------------------------------
# Soledad shared database
-#-----------------------------------------------------------------------------
+# ----------------------------------------------------------------------------
class NoTokenForAuth(Exception):
"""