summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2013-04-29 17:43:24 -0300
committerdrebs <drebs@leap.se>2013-04-29 17:43:24 -0300
commite15e1ae21c973fa6674bb5526c59a22c98106db9 (patch)
tree1ad1f7cfebbcd9cc4073c3907246c31004e3decd /src
parent027cd6cd2980c1dd5943392fbb4f3eefb7ccfaed (diff)
Refactor name and fix doc of function that stores secrets in shred recovery database.
Diffstat (limited to 'src')
-rw-r--r--src/leap/soledad/__init__.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/leap/soledad/__init__.py b/src/leap/soledad/__init__.py
index 6ae82b4d..d030c20c 100644
--- a/src/leap/soledad/__init__.py
+++ b/src/leap/soledad/__init__.py
@@ -215,7 +215,7 @@ class Soledad(object):
doc.content[self.KEY_SYMKEY],
passphrase=self._address_hash()))
# Stage 2 - Keys synchronization
- self._assert_server_keys()
+ self._assert_keys_in_shared_db()
# Stage 3 - Local database initialization
self._init_db()
@@ -416,9 +416,14 @@ class Soledad(object):
events.events_pb2.SOLEDAD_DONE_DOWNLOADING_KEYS, self._address)
return doc
- def _assert_server_keys(self):
+ def _assert_keys_in_shared_db(self):
"""
- Assert our key copies are the same as server's ones.
+ Assert local keys are the same as shared db's ones.
+
+ Try to fetch keys from shared recovery database. If they already exist
+ in the remote db, assert that that data is the same as local data.
+ Otherwise, upload keys to shared recovery database.
+
"""
leap_assert(
self._has_keys(),