Skip to content

Commit

Permalink
Fix to properly extract SecureBoot v2 public key
Browse files Browse the repository at this point in the history
Closes #623
  • Loading branch information
gnought authored and dobairoland committed Apr 27, 2021
1 parent 152c292 commit 8438f69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion espsecure.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ def extract_public_key(args):
args.public_keyfile.write(vk.to_string())
elif args.version == "2":
""" Load an RSA private key and extract the public key as raw binary data. """
sk = _load_sbv2_rsa_signing_key(args.keyfile)
sk = _load_sbv2_rsa_signing_key(args.keyfile.read())
vk = sk.public_key().public_bytes(
encoding=serialization.Encoding.PEM,
format=serialization.PublicFormat.SubjectPublicKeyInfo
Expand Down

0 comments on commit 8438f69

Please sign in to comment.