From c28f77d75105a31555c0eb45f45c76675248032f Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Fri, 25 Nov 2016 12:51:29 -0500 Subject: Add debugging code to cryptech_upload. --- projects/hsm/cryptech_upload | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) (limited to 'projects/hsm') diff --git a/projects/hsm/cryptech_upload b/projects/hsm/cryptech_upload index 0c3f6fc..6cf1283 100755 --- a/projects/hsm/cryptech_upload +++ b/projects/hsm/cryptech_upload @@ -105,16 +105,28 @@ def parse_args(): type = argparse.FileType("rb"), help = "Explicit source image file for upload, overrides firmware tarball") + parser.add_argument("--separate-pins", + action = "store_true", + help = "Prompt separately for each PIN required during upload") + + parser.add_argument("--debug", + action = "store_true", + help = "Enable debugging of upload protocol", + ) + return parser.parse_args() def _write(dst, data): + numeric = isinstance(data, (int, long)) + if numeric: + data = struct.pack("