From 09e62f96b20397be1ace7b2a1fbb25c106f8ecd9 Mon Sep 17 00:00:00 2001 From: Jukka Laitinen Date: Fri, 28 May 2021 15:36:37 +0300 Subject: [PATCH] Put all the test key material into same directory Move Tools/test_key.json and key0.pub into same directory. key0.pub is just a hex-dump of the public key part from the test_key.json, for easy inclusion into bootloader monocypher sw crypto Signed-off-by: Jukka Laitinen --- Tools/cryptotools.py | 4 ++-- Tools/test_keys/key0.pub | 5 +++++ Tools/{ => test_keys}/test_keys.json | 0 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 Tools/test_keys/key0.pub rename Tools/{ => test_keys}/test_keys.json (100%) diff --git a/Tools/cryptotools.py b/Tools/cryptotools.py index f058b92a9e..6e4bd42d63 100755 --- a/Tools/cryptotools.py +++ b/Tools/cryptotools.py @@ -134,7 +134,7 @@ if(__name__ == "__main__"): parser.add_argument("signee", help=".bin file to add signature", nargs='?', default=None) parser.add_argument("signed", help="signed output .bin", nargs='?', default=None) - parser.add_argument("--key", help="key.json file", default="Tools/test_keys.json") + parser.add_argument("--key", help="key.json file", default="Tools/test_keys/test_keys.json") parser.add_argument("--rdct", help="binary R&D certificate file", default=None) parser.add_argument("--genkey", help="new generated key", default=None) args = parser.parse_args() @@ -153,7 +153,7 @@ if(__name__ == "__main__"): sys.exit(1) # Issue a warning when signing with testing key - if args.key=='Tools/test_keys.json': + if args.key=='Tools/test_keys/test_keys.json': print("WARNING: Signing with PX4 test key") # Sign the binary diff --git a/Tools/test_keys/key0.pub b/Tools/test_keys/key0.pub new file mode 100644 index 0000000000..7eb9984de1 --- /dev/null +++ b/Tools/test_keys/key0.pub @@ -0,0 +1,5 @@ +//Public key to verify signed binaries +0x4d, 0xb0, 0xc2, 0x1, 0x5, 0x55, 0x2a, 0x3c, +0xd7, 0xfb, 0xaf, 0x5c, 0xba, 0x7a, 0xb0, 0x81, +0x1b, 0x36, 0x63, 0xdb, 0x28, 0x52, 0x5e, 0xdb, +0x14, 0x36, 0xf2, 0x57, 0x8d, 0x2, 0xb7, 0xfd, diff --git a/Tools/test_keys.json b/Tools/test_keys/test_keys.json similarity index 100% rename from Tools/test_keys.json rename to Tools/test_keys/test_keys.json