diff options
author | Michał Górny <mgorny@gentoo.org> | 2023-03-01 20:25:55 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2023-03-01 20:25:55 +0100 |
commit | 9a0847455532fd203768d37266aa461e65352095 (patch) | |
tree | 45956e504f7490977325f8ebc1bcb2fc953d3579 /tests/test_openpgp.py | |
parent | 07f84921d58841f0149114de685aa4d805effd0c (diff) | |
download | gemato-9a0847455532fd203768d37266aa461e65352095.tar.gz |
Support verifying detached signatures of data from stdin
Closes: https://github.com/projg2/gemato/issues/28
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'tests/test_openpgp.py')
-rw-r--r-- | tests/test_openpgp.py | 7 |
1 files changed, 4 insertions, 3 deletions
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) |