summaryrefslogtreecommitdiffstats
path: root/autocrypt
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2020-05-13 13:19:47 +0200
committerNeal H. Walfield <neal@pep.foundation>2020-05-18 11:16:55 +0200
commit029d86bd7b17d264e27865d5da97534d2b664e1d (patch)
treea94be61f706e2e479843de91a5ec5b1cb0d0ef11 /autocrypt
parent83c8eef93f720297f2551d3d166c3471bdec9303 (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.rs9
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.