mirror of
git://git.gniibe.org/gnuk/gnuk.git
synced 2026-11-20 19:01:26 +00:00
tests: Support Yubikey's RSA-2048.
Signed-off-by: NIIBE Yutaka <[email protected]>
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user