summaryrefslogtreecommitdiff
path: root/alot/commands/envelope.py
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2017-09-25 20:06:11 +0200
committerRuben Pollan <meskio@sindominio.net>2017-09-25 20:06:11 +0200
commit5904b86d09edb888c80f8f8ba7f1b2e18baf456a (patch)
tree97107bffd4fbbb35b5b7900711612e531f1270f8 /alot/commands/envelope.py
parent6fe1c7e9852b83800a80701d4d085f79d53f96f3 (diff)
commands/envelope: Acknowledge keyids param on encrypt
Diffstat (limited to 'alot/commands/envelope.py')
-rw-r--r--alot/commands/envelope.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/alot/commands/envelope.py b/alot/commands/envelope.py
index f497ecc2..d008d227 100644
--- a/alot/commands/envelope.py
+++ b/alot/commands/envelope.py
@@ -582,7 +582,12 @@ class EncryptCommand(Command):
elif self.action == 'toggleencrypt':
encrypt = not envelope.encrypt
if encrypt:
- yield utils.set_encrypt(ui, envelope, signed_only=self.trusted)
+ if self.encrypt_keys:
+ for keyid in self.encrypt_keys:
+ tmp_key = crypto.get_key(keyid)
+ envelope.encrypt_keys[tmp_key.fpr] = tmp_key
+ else:
+ yield utils.set_encrypt(ui, envelope, signed_only=self.trusted)
envelope.encrypt = encrypt
if not envelope.encrypt:
# This is an extra conditional as it can even happen if encrypt is