mirror of
https://salsa.debian.org/gnuk-team/gnuk/gnuk.git
synced 2024-09-19 18:30:15 +00:00
tests: Fix KDF required handling.
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
98ac78624d
commit
af3ebbca50
@ -79,6 +79,11 @@ class OpenPGP_Card(object):
|
||||
except:
|
||||
string4 = None
|
||||
self.is_gnuk2 = (self.is_gnuk and string4 and string4[0:9] == "release/2")
|
||||
try:
|
||||
string5 = reader.get_string(5)
|
||||
except:
|
||||
string5 = None
|
||||
self.kdf_required = (self.is_gnuk and string5 and string5[-12:] == "kdf=required")
|
||||
self.initialize_kdf()
|
||||
|
||||
def add_to_key_attrlist(self, no, attr):
|
||||
|
6
tests/skip_if_kdfreq.py
Normal file
6
tests/skip_if_kdfreq.py
Normal file
@ -0,0 +1,6 @@
|
||||
import pytest
|
||||
|
||||
@pytest.fixture(scope="module",autouse=True)
|
||||
def check_kdfreq(card):
|
||||
if card.kdf_required:
|
||||
pytest.skip("Token requires KDF setup", allow_module_level=True)
|
@ -1,8 +0,0 @@
|
||||
import pytest
|
||||
|
||||
@pytest.fixture(scope="module",autouse=True)
|
||||
def check_kdfreq(card):
|
||||
if card.is_emulated_gnuk:
|
||||
pytest.skip("Emulation requires KDF setup", allow_module_level=True)
|
||||
if card.is_gnuk2:
|
||||
pytest.skip("Gnuk2 requires KDF setup", allow_module_level=True)
|
Loading…
Reference in New Issue
Block a user