From 9a0847455532fd203768d37266aa461e65352095 Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Wed, 1 Mar 2023 20:25:55 +0100 Subject: Support verifying detached signatures of data from stdin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes: https://github.com/projg2/gemato/issues/28 Signed-off-by: Michał Górny --- tests/test_openpgp.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'tests/test_openpgp.py') diff --git a/tests/test_openpgp.py b/tests/test_openpgp.py index 149b769..0c43fc6 100644 --- a/tests/test_openpgp.py +++ b/tests/test_openpgp.py @@ -1140,9 +1140,10 @@ def test_verify_detached(tmp_path, key_var, two_sigs): with open(tmp_path / "sig.bin", "wb") as f: f.write(base64.b64decode(TWO_SIGNATURES)) - sig = openpgp_env.verify_detached( - tmp_path / "sig.bin", tmp_path / "data.bin", - require_all_good=two_sigs) + with open(tmp_path / "data.bin", "rb") as f: + sig = openpgp_env.verify_detached( + tmp_path / "sig.bin", f, + require_all_good=two_sigs) assert_signature(sig, "TWO_SIGNATURE_MANIFEST", expect_both=two_sigs) -- cgit v1.2.3