diff options
author | drebs <drebs@leap.se> | 2014-04-29 13:29:23 -0300 |
---|---|---|
committer | drebs <drebs@leap.se> | 2014-05-22 18:43:48 -0300 |
commit | 8e750af78bd8f9a37d1b095712b66e6ecdb3e102 (patch) | |
tree | 91a5691cbfdd81d93a7b2b2a2da4cf3d91699833 /client/src/leap/soledad/client/__init__.py | |
parent | 5cb40a959af827e4eadde1c047664c4f4c0ae01d (diff) |
Cleanup and pep8 fix.
Diffstat (limited to 'client/src/leap/soledad/client/__init__.py')
-rw-r--r-- | client/src/leap/soledad/client/__init__.py | 11 |
1 files changed, 5 insertions, 6 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 |