Skip to content

Commit

Permalink
HSMAUTH: change credential password format in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
elibon99 committed Aug 7, 2023
1 parent 44ed85a commit 26fd65e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions tests/device/test_hsmauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def session(ccid_connection):
def import_key_derived(
session,
management_key,
credential_password=b"123456",
credential_password="123456",
derivation_password=b"password",
) -> Credential:
credential = session.put_credential_derived(
Expand All @@ -47,7 +47,7 @@ def import_key_derived(


def import_key_symmetric(
session, management_key, key_enc, key_mac, credential_password=b"123456"
session, management_key, key_enc, key_mac, credential_password="123456"
) -> Credential:
credential = session.put_credential_symmetric(
management_key,
Expand All @@ -61,7 +61,7 @@ def import_key_symmetric(


def import_key_asymmetric(
session, management_key, private_key, credential_password=b"12345"
session, management_key, private_key, credential_password="123456"
) -> Credential:
credential = session.put_credential_asymmetric(
management_key,
Expand All @@ -74,7 +74,7 @@ def import_key_asymmetric(


def generate_key_asymmetric(
session, management_key, credential_password=b"12345"
session, management_key, credential_password="123456"
) -> Credential:
credential = session.generate_credential_asymmetric(
management_key,
Expand Down Expand Up @@ -206,7 +206,7 @@ def test_management_key_retries(self, session):

class TestSessionKeys:
def test_calculate_session_keys_symmetric(self, session):
credential_password = b"1234"
credential_password = "1234"
credential = import_key_derived(
session,
DEFAULT_MANAGEMENT_KEY,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_hsmauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def test_generate_random_management_key(self):
assert 16 == len(output1) == len(output2)

def test_parse_credential_password(self):
parsed_credential_password = _parse_credential_password(b"123456")
parsed_credential_password = _parse_credential_password("123456")

assert (
b"123456\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
Expand Down

0 comments on commit 26fd65e

Please sign in to comment.