aboutsummaryrefslogtreecommitdiffstats
path: root/lang/python/tests/t-decrypt.py
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <[email protected]>2018-12-04 17:44:35 +0000
committerDaniel Kahn Gillmor <[email protected]>2018-12-04 23:41:16 +0000
commitac8d7238dbf165950c9844e5cb41da8eb4d37bc0 (patch)
tree956e4b123755954c3140b0f82c6f8107e3db6146 /lang/python/tests/t-decrypt.py
parentpython: ctx.decrypt() has problematic error handling (diff)
downloadgpgme-dkg/fix-T4271.tar.gz
gpgme-dkg/fix-T4271.zip
python: overhaul logic of Context.decrypt()dkg/fix-T4271
* lang/python/src/core.py (Context.decrypt): simplify and clarify the logic behind handling verify=False. * lang/python/tests/t-decrypt.py: ensure that we test verify=False -- The function-internal variables were pretty unclear to the reader, and the logic caused pretty nasty breakage when verify=False. GnuPG-Bug-Id: 4271 Signed-off-by: Daniel Kahn Gillmor <[email protected]>
Diffstat (limited to 'lang/python/tests/t-decrypt.py')
-rwxr-xr-xlang/python/tests/t-decrypt.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lang/python/tests/t-decrypt.py b/lang/python/tests/t-decrypt.py
index 44743da7..c72b51ab 100755
--- a/lang/python/tests/t-decrypt.py
+++ b/lang/python/tests/t-decrypt.py
@@ -38,7 +38,7 @@ support.print_data(sink)
# Idiomatic interface.
with gpg.Context() as c:
- plaintext, _, _ = c.decrypt(open(support.make_filename("cipher-1.asc")))
+ plaintext, _, _ = c.decrypt(open(support.make_filename("cipher-1.asc")), verify=False)
assert len(plaintext) > 0
assert plaintext.find(b'Wenn Sie dies lesen k') >= 0, \
'Plaintext not found'