diff options
author | Ruben Pollan <meskio@sindominio.net> | 2020-05-13 13:19:47 +0200 |
---|---|---|
committer | Neal H. Walfield <neal@pep.foundation> | 2020-05-18 11:16:55 +0200 |
commit | 029d86bd7b17d264e27865d5da97534d2b664e1d (patch) | |
tree | a94be61f706e2e479843de91a5ec5b1cb0d0ef11 /autocrypt | |
parent | 83c8eef93f720297f2551d3d166c3471bdec9303 (diff) |
autocrypt: only export transport encrypt and sign subkeys on encode-sender
Authentication subkeys are not needed for autocrypt, let's reduce the
size of the export.
- Fixes #506
Diffstat (limited to 'autocrypt')
-rw-r--r-- | autocrypt/src/lib.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/autocrypt/src/lib.rs b/autocrypt/src/lib.rs index f467ef29..06dbd696 100644 --- a/autocrypt/src/lib.rs +++ b/autocrypt/src/lib.rs @@ -124,10 +124,11 @@ impl AutocryptHeader { if let RevocationStatus::Revoked(_) = skb.revocation_status() { continue; } - - let k = skb.key().clone(); - acc.push(k.into()); - acc.push(skb.binding_signature().clone().into()); + if skb.for_signing() || skb.for_transport_encryption() { + let k = skb.key().clone(); + acc.push(k.into()); + acc.push(skb.binding_signature().clone().into()); + } } // The UserIDs matching ADDR. |