tests: Support Yubikey's RSA-2048.

Signed-off-by: NIIBE Yutaka <[email protected]>
This commit is contained in:
NIIBE Yutaka
2021-07-14 11:57:28 +09:00
parent aa9bb3b102
commit 1187f05ab5
3 changed files with 7 additions and 4 deletions
+1
View File
@@ -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"
+3 -2
View File
@@ -21,12 +21,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
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")
+3 -2
View File
@@ -21,12 +21,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
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")