Skip to content

Commit

Permalink
fido2-api fix for fido2 util
Browse files Browse the repository at this point in the history
  • Loading branch information
daringer committed Aug 25, 2020
1 parent 1ed5b3f commit 73184c0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions pynitrokey/cli/fido2.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def genkey(input_seed_file, output_pem_file):
* You may optionally supply a file to seed the RNG for key generating.
"""

vk = pynitrokey.operations.genkey(output_pem_file, input_seed_file=input_seed_file)
vk = pynitrokey.fido2.operations.genkey(output_pem_file, input_seed_file=input_seed_file)

local_print(
"Public key in various formats:",
Expand All @@ -90,7 +90,7 @@ def genkey(input_seed_file, output_pem_file):
def sign(verifying_key, app_hex, output_json, end_page):
"""Signs a fw-hex file, outputs a .json file that can be used for signed update."""

msg = pynitrokey.operations.sign_firmware(
msg = pynitrokey.fido2.operations.sign_firmware(
verifying_key, app_hex, APPLICATION_END_PAGE=end_page)
local_print(f"Saving signed firmware to: {output_json}")
with open(output_json, "wb+") as fh:
Expand Down Expand Up @@ -123,7 +123,7 @@ def mergehex(
If no attestation key is passed, uses default Solo Hacker one.
Note that later hex files replace data of earlier ones, if they overlap.
"""
pynitrokey.operations.mergehex(
pynitrokey.fido2.operations.mergehex(
input_hex_files,
output_hex_file,
attestation_key=attestation_key,
Expand Down
2 changes: 1 addition & 1 deletion pynitrokey/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def local_print(*messages, **kwargs):

# logfile debug output
else:
logger.debug(f"print: {item.strip()}")
logger.debug(f"print: {str(item).strip()}")

# to stdout
print(item, **kwargs)
Expand Down

0 comments on commit 73184c0

Please sign in to comment.