diff options
author | NavaL <ayoyo@thoughtworks.com> | 2016-11-21 12:07:10 +0100 |
---|---|---|
committer | Ruben Pollan <meskio@sindominio.net> | 2017-12-03 20:43:30 +0100 |
commit | 0454dc3545693a8c6325f4864d89154c514b3bcb (patch) | |
tree | 157a12a02cccca3184814ba8b059a8648b2cea54 /src/leap/bitmask/keymanager/keys.py | |
parent | e5c567d79557eecbd708f4fabe8d04c92cf66ea1 (diff) |
[feat] reset sign_used flag after regenerating key pair
- this flag is used by leap.mail to attach the new key
Diffstat (limited to 'src/leap/bitmask/keymanager/keys.py')
-rw-r--r-- | src/leap/bitmask/keymanager/keys.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/leap/bitmask/keymanager/keys.py b/src/leap/bitmask/keymanager/keys.py index d37c6d21..7e8d8ead 100644 --- a/src/leap/bitmask/keymanager/keys.py +++ b/src/leap/bitmask/keymanager/keys.py @@ -184,7 +184,7 @@ class OpenPGPKey(object): return False - def merge(self, newkey): + def merge(self, newkey, key_renewal=False): if newkey.fingerprint != self.fingerprint: self.log.critical( "Can't put a key whith the same key_id and different " @@ -216,7 +216,8 @@ class OpenPGPKey(object): if newkey.last_audited_at > self.last_audited_at: self.validation = newkey.last_audited_at self.encr_used = newkey.encr_used or self.encr_used - self.sign_used = newkey.sign_used or self.sign_used + if not key_renewal: + self.sign_used = newkey.sign_used or self.sign_used self.refreshed_at = datetime.now() def get_json(self): |