From ac8d7238dbf165950c9844e5cb41da8eb4d37bc0 Mon Sep 17 00:00:00 2001 From: Daniel Kahn Gillmor Date: Tue, 4 Dec 2018 20:44:35 +0300 Subject: python: overhaul logic of Context.decrypt() * 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 --- lang/python/tests/t-decrypt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lang/python/tests/t-decrypt.py') 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' -- cgit v1.2.3