Skip to content

Commit

Permalink
Merge pull request #478 from mmerklinger/bug/nethsm-get-key
Browse files Browse the repository at this point in the history
Display value for type and mechanism on NetHSM get_key
  • Loading branch information
robin-nitrokey committed Nov 30, 2023
2 parents 55b0db3 + 9e0b7c7 commit 6d3002a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pynitrokey/cli/nethsm.py
Original file line number Diff line number Diff line change
Expand Up @@ -524,9 +524,9 @@ def get_key(ctx: Context, key_id: str, public_key: bool) -> None:
print(nethsm.get_key_public_key(key_id))
else:
key = nethsm.get_key(key_id)
mechanisms = ", ".join([str(m) for m in key.mechanisms])
mechanisms = ", ".join([str(m.value) for m in key.mechanisms])
print(f"Key {key_id} on NetHSM {nethsm.host}:")
print(f"Type: {key.type}")
print(f"Type: {key.type.value}")
print(f"Mechanisms: {mechanisms}")
print(f"Operations: {key.operations}")
if key.tags:
Expand Down

0 comments on commit 6d3002a

Please sign in to comment.