aboutsummaryrefslogtreecommitdiffstats
path: root/lang/python/tests/t-decrypt-verify.py
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <[email protected]>2019-05-03 03:28:11 +0000
committerDaniel Kahn Gillmor <[email protected]>2019-05-03 03:28:11 +0000
commit4100794e305ba22241ea5a4f7b42bb5189fbd948 (patch)
treea1b0d92c4cb86b2fa8c24d39e1d339e4185a2236 /lang/python/tests/t-decrypt-verify.py
parentpython/tests: try to decrypt and verify new test data (diff)
downloadgpgme-4100794e305ba22241ea5a4f7b42bb5189fbd948.tar.gz
gpgme-4100794e305ba22241ea5a4f7b42bb5189fbd948.zip
python: stop raising BadSignatures from decrypt(verify=True)dkg/fix-T4276
* src/core.py (decrypt): filter out signatures with errors from the returned verify_result, but avoid raising BadSignatures * tests/t-decrypt-verify.py: ensure that only a single signature is returned when evaluating cipher-3.asc, since the other signature is unknown. -- This change preserves the invariant that decrypt() only ever returns valid signatures in the verify_result, but it avoids unnecessary errors in the face of the presence of an additional bad signature. GnuPG-bug-id: 4276 Signed-off-by: Daniel Kahn Gillmor <[email protected]>
Diffstat (limited to '')
-rwxr-xr-xlang/python/tests/t-decrypt-verify.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/lang/python/tests/t-decrypt-verify.py b/lang/python/tests/t-decrypt-verify.py
index 6a4fc554..300fc713 100755
--- a/lang/python/tests/t-decrypt-verify.py
+++ b/lang/python/tests/t-decrypt-verify.py
@@ -84,5 +84,6 @@ with gpg.Context() as c:
plaintext, _, verify_result = c.decrypt(open(support.make_filename("cipher-3.asc")))
assert len(plaintext) > 0
+ assert len(verify_result.signatures) == 1
assert plaintext.find(b'Reenact Studied Thermos Bonehead Unclasp Opposing') >= 0, \
'second Plaintext not found'