summaryrefslogtreecommitdiff
path: root/tests/test_openpgp.py
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2023-01-22 10:08:05 +0100
committerMichał Górny <mgorny@gentoo.org>2023-01-22 10:08:05 +0100
commit5702581b9a92ea2fc02190d66ad9a274011eebe4 (patch)
tree71ee0587658d04740f8a6ec6001b1fdd8ed8e3d1 /tests/test_openpgp.py
parentfaa264c5b8c81df7480dde39950baba5c7ce802b (diff)
downloadgemato-5702581b9a92ea2fc02190d66ad9a274011eebe4.tar.gz
test_openpgp: Add more tests for the multi-signature case
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'tests/test_openpgp.py')
-rw-r--r--tests/test_openpgp.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_openpgp.py b/tests/test_openpgp.py
index e29dbed..6702471 100644
--- a/tests/test_openpgp.py
+++ b/tests/test_openpgp.py
@@ -48,6 +48,7 @@ from tests.keydata import (
UNSIGNED_SUBKEY, FORGED_SUBKEY, SIG_TIMESTAMP, SUBKEY_FINGERPRINT,
SUBKEY_SIG_TIMESTAMP, UNEXPIRE_PUBLIC_KEY, OLD_UNEXPIRE_PUBLIC_KEY,
FORGED_UNEXPIRE_KEY, TWO_SIGNATURE_PUBLIC_KEYS, SECOND_KEY_FINGERPRINT,
+ SECOND_VALID_PUBLIC_KEY, TWO_KEYS_ONE_EXPIRED,
)
from tests.test_recursiveloader import INSECURE_HASH_TESTS
from tests.testutil import HKPServer
@@ -238,6 +239,8 @@ _ = FORGED_SUBKEY
_ = FORGED_UNEXPIRE_KEY
_ = OLD_UNEXPIRE_PUBLIC_KEY
_ = OTHER_VALID_PUBLIC_KEY
+_ = SECOND_VALID_PUBLIC_KEY
+_ = TWO_KEYS_ONE_EXPIRED
_ = TWO_SIGNATURE_PUBLIC_KEYS
_ = UNEXPIRE_PUBLIC_KEY
_ = UNSIGNED_PUBLIC_KEY
@@ -384,6 +387,11 @@ MANIFEST_VARIANTS = [
('SUBKEY_SIGNED_MANIFEST', 'VALID_KEY_SUBKEY', None),
# == Manifest with two signatures ==
("TWO_SIGNATURE_MANIFEST", "TWO_SIGNATURE_PUBLIC_KEYS", None),
+ ("TWO_SIGNATURE_MANIFEST", "VALID_PUBLIC_KEY", OpenPGPVerificationFailure),
+ ("TWO_SIGNATURE_MANIFEST", "SECOND_VALID_PUBLIC_KEY",
+ OpenPGPVerificationFailure),
+ ("TWO_SIGNATURE_MANIFEST", "TWO_KEYS_ONE_EXPIRED",
+ OpenPGPExpiredKeyFailure),
# == using private key ==
('SIGNED_MANIFEST', 'PRIVATE_KEY', None),
# == bad manifests ==