diff options
author | Ruben Pollan <meskio@sindominio.net> | 2015-12-21 15:35:56 +0100 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2016-02-29 10:36:15 -0400 |
commit | d83b04cfb0969daae26d36ef36907f136fd6f261 (patch) | |
tree | 18e6f04eb1ad6fc55730295985fe4338d82f0cf6 /mail | |
parent | 5b1bea0c8813206a7f17119c1c82eafc8e727bbb (diff) |
[feat] use fingerprint instead of key_id to address keys
Diffstat (limited to 'mail')
-rw-r--r-- | mail/src/leap/mail/incoming/service.py | 2 | ||||
-rw-r--r-- | mail/src/leap/mail/outgoing/service.py | 2 | ||||
-rw-r--r-- | mail/src/leap/mail/outgoing/tests/test_outgoing.py | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/mail/src/leap/mail/incoming/service.py b/mail/src/leap/mail/incoming/service.py index 49bca50..98ed416 100644 --- a/mail/src/leap/mail/incoming/service.py +++ b/mail/src/leap/mail/incoming/service.py @@ -461,7 +461,7 @@ class IncomingMail(Service): decrmsg.add_header( self.LEAP_SIGNATURE_HEADER, self.LEAP_SIGNATURE_VALID, - pubkey=signkey.key_id) + pubkey=signkey.fingerprint) return decrmsg.as_string() if msg.get_content_type() == MULTIPART_ENCRYPTED: diff --git a/mail/src/leap/mail/outgoing/service.py b/mail/src/leap/mail/outgoing/service.py index 8e06bd4..eeb5d32 100644 --- a/mail/src/leap/mail/outgoing/service.py +++ b/mail/src/leap/mail/outgoing/service.py @@ -487,7 +487,7 @@ class OutgoingMail(object): def add_openpgp_header(signkey): username, domain = sign_address.split('@') newmsg.add_header( - 'OpenPGP', 'id=%s' % signkey.key_id, + 'OpenPGP', 'id=%s' % signkey.fingerprint, url='https://%s/key/%s' % (domain, username), preference='signencrypt') return newmsg, origmsg diff --git a/mail/src/leap/mail/outgoing/tests/test_outgoing.py b/mail/src/leap/mail/outgoing/tests/test_outgoing.py index 79eafd9..ad7803d 100644 --- a/mail/src/leap/mail/outgoing/tests/test_outgoing.py +++ b/mail/src/leap/mail/outgoing/tests/test_outgoing.py @@ -236,7 +236,7 @@ class TestOutgoingMail(TestCaseWithKeyManager): def _set_sign_used(self, address): def set_sign(key): key.sign_used = True - return self._km.put_key(key, address) + return self._km.put_key(key) d = self._km.get_key(address, openpgp.OpenPGPKey, fetch_remote=False) d.addCallback(set_sign) |