From 68360978d6d39ee5b268cd3a7fc169580015a50a Mon Sep 17 00:00:00 2001 From: Pol Henarejos Date: Mon, 28 Oct 2024 00:25:22 +0100 Subject: [PATCH] Use BOOTKEY instead of reading json. Signed-off-by: Pol Henarejos --- tools/pico-hsm-tool.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/pico-hsm-tool.py b/tools/pico-hsm-tool.py index a10979a..c582590 100644 --- a/tools/pico-hsm-tool.py +++ b/tools/pico-hsm-tool.py @@ -57,6 +57,8 @@ from argparse import RawTextHelpFormatter pin = None +BOOTKEY = [225, 209, 107, 167, 100, 171, 215, 18, 212, 239, 110, 62, 221, 116, 78, 213, 99, 140, 38, 11, 119, 28, 249, 129, 81, 17, 11, 175, 172, 155, 200, 113] + def hexy(a): return [hex(i) for i in a] @@ -498,9 +500,7 @@ def otp(picohsm, args): picohsm.otp(row=row, data=data) print(f'OTP row {args.row} written successfully.') elif (args.subcommand == 'secure_boot'): - script_path = os.path.dirname(os.path.abspath(__file__)) - boot_json = json.load(open(f'{script_path}/../pico-keys-sdk/config/rp2350/secure_boot.json')) - picohsm.secure_boot(boot_json['bootkey0'], bootkey_index=args.index, lock=args.lock) + picohsm.secure_boot(BOOTKEY, bootkey_index=args.index, lock=args.lock) def main(args): sys.stderr.buffer.write(b'Pico HSM Tool v1.18\n')