diff --git a/Tools/scripts/signing/make_secure_bl.py b/Tools/scripts/signing/make_secure_bl.py index e3ed4718a4..bd60bee3c7 100755 --- a/Tools/scripts/signing/make_secure_bl.py +++ b/Tools/scripts/signing/make_secure_bl.py @@ -36,7 +36,7 @@ offset += 8 desc = b'' desc_len = 0 -keys = args.keys[:] +keys = [] if not args.omit_ardupilot_keys: print("Adding ArduPilot keys") @@ -47,6 +47,8 @@ if not args.omit_ardupilot_keys: if f.endswith(".dat"): keys.append(os.path.relpath(os.path.join(keydir, f))) +keys += args.keys[:] + if len(keys) > max_keys: print("Too many key files %u, max is %u" % (len(keys), max_keys)) sys.exit(1)