From 3787a645993ea36bbecebc850296de4b0fdd3620 Mon Sep 17 00:00:00 2001 From: drebs Date: Thu, 26 Jan 2017 10:52:20 -0200 Subject: [doc] improve comment for client secrets file migration function --- client/src/leap/soledad/client/_secrets/crypto.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/src/leap/soledad/client/_secrets/crypto.py b/client/src/leap/soledad/client/_secrets/crypto.py index dc80cf0b..02d7dc02 100644 --- a/client/src/leap/soledad/client/_secrets/crypto.py +++ b/client/src/leap/soledad/client/_secrets/crypto.py @@ -80,7 +80,11 @@ class SecretsCrypto(object): raise SecretsError(e) def _decrypt_v1(self, data): - # get encrypted secret from dictionary + # get encrypted secret from dictionary: the old format allowed for + # storage of more than one secret, but this feature was never used and + # soledad has been using only one secret so far. As there is a corner + # case where the old 'active_secret' key might not be set, we just + # ignore it and pop the only secret found in the 'storage_secrets' key. secret_id = data['storage_secrets'].keys().pop() encrypted = data['storage_secrets'][secret_id] -- cgit v1.2.3