[gnome-keysign: 5/10] gpgmeh: return the plaintext along with the encrypted signatures
- From: Tobias Mueller <tobiasmue src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-keysign: 5/10] gpgmeh: return the plaintext along with the encrypted signatures
- Date: Mon, 29 Jul 2019 07:11:42 +0000 (UTC)
commit 37a41ed91e2bf13998afbdd926acfc1b93b686a2
Author: Tobias Mueller <muelli cryptobitch de>
Date: Fri May 10 10:48:50 2019 +0200
gpgmeh: return the plaintext along with the encrypted signatures
This allows for the caller to do whatever they think is appropriate with
the plaintext.
We're now returning a three-tuple which is about as much as we should
do. Bigger tuples are more difficult to grasp.
keysign/gpgmeh.py | 2 +-
keysign/util.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/keysign/gpgmeh.py b/keysign/gpgmeh.py
index c4316c1..332a73a 100755
--- a/keysign/gpgmeh.py
+++ b/keysign/gpgmeh.py
@@ -507,4 +507,4 @@ def sign_keydata_and_encrypt(keydata, error_cb=None, homedir=None):
# in order for it to work out of the box
always_trust=True,
sign=False)
- yield (UID.from_gpgme(uid), ciphertext)
+ yield (UID.from_gpgme(uid), ciphertext, uid_data)
diff --git a/keysign/util.py b/keysign/util.py
index 076d45b..bdfc85c 100755
--- a/keysign/util.py
+++ b/keysign/util.py
@@ -261,7 +261,7 @@ def sign_keydata_and_send(keydata, error_cb=None):
except AttributeError:
log.debug("keydata is probably already a bytes type")
- for uid, encrypted_key in list(sign_keydata_and_encrypt(keydata, error_cb)):
+ for uid, encrypted_key, plaintext in list(sign_keydata_and_encrypt(keydata, error_cb)):
log.info("Using UID: %r", uid)
# We expect uid.uid to be a consumable string
uid_str = uid.uid
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]