diff --git a/tests/card_const.py b/tests/card_const.py index 0a9bf60..9a170e5 100644 --- a/tests/card_const.py +++ b/tests/card_const.py @@ -2,6 +2,7 @@ FACTORY_PASSPHRASE_PW1=b"123456" FACTORY_PASSPHRASE_PW3=b"12345678" KEY_ATTRIBUTES_RSA4K=b"\x01\x10\x00\x00\x20\x00" KEY_ATTRIBUTES_RSA2K=b"\x01\x08\x00\x00\x20\x00" +KEY_ATTRIBUTES_RSA2K_ALT=b"\x01\x08\x00\x00\x11\x00" KEY_ATTRIBUTES_ECDH_NISTP256R1=b"\x12\x2a\x86\x48\xce\x3d\x03\x01\x07" KEY_ATTRIBUTES_ECDH_NISTP384R1=b"\x12\x2b\x81\x04\x00\x22" KEY_ATTRIBUTES_ECDH_NISTP521R1=b"\x12\x2b\x81\x04\x00\x23" diff --git a/tests/card_test_kg_pko_dsc_rsa2k.py b/tests/card_test_kg_pko_dsc_rsa2k.py index 865ead5..13f5994 100644 --- a/tests/card_test_kg_pko_dsc_rsa2k.py +++ b/tests/card_test_kg_pko_dsc_rsa2k.py @@ -21,12 +21,13 @@ along with this program. If not, see . """ import pytest -from card_const import KEY_ATTRIBUTES_RSA2K +from card_const import KEY_ATTRIBUTES_RSA2K, KEY_ATTRIBUTES_RSA2K_ALT from rsa_keys import rsa_pk @pytest.fixture(scope="module",autouse=True) def check_rsa2k(card): - if not KEY_ATTRIBUTES_RSA2K in card.supported_key_attrlist[0]: + if not (KEY_ATTRIBUTES_RSA2K in card.supported_key_attrlist[0] + or KEY_ATTRIBUTES_RSA2K_ALT in card.supported_key_attrlist[0]): pytest.skip("Test for RSA-2048", allow_module_level=True) @pytest.fixture(scope="module") diff --git a/tests/card_test_ki_pko_dsc_rsa2k.py b/tests/card_test_ki_pko_dsc_rsa2k.py index 1f96f1f..a5fe83e 100644 --- a/tests/card_test_ki_pko_dsc_rsa2k.py +++ b/tests/card_test_ki_pko_dsc_rsa2k.py @@ -21,12 +21,13 @@ along with this program. If not, see . """ import pytest -from card_const import KEY_ATTRIBUTES_RSA2K +from card_const import KEY_ATTRIBUTES_RSA2K, KEY_ATTRIBUTES_RSA2K_ALT from rsa_keys import rsa_pk @pytest.fixture(scope="module",autouse=True) def check_rsa2k(card): - if not KEY_ATTRIBUTES_RSA2K in card.supported_key_attrlist[0]: + if not (KEY_ATTRIBUTES_RSA2K in card.supported_key_attrlist[0] + or KEY_ATTRIBUTES_RSA2K_ALT in card.supported_key_attrlist[0]): pytest.skip("Test for RSA-2048", allow_module_level=True) @pytest.fixture(scope="module")