From 7e0fdd8f9d01dce6e09f914b34fa38f06cedf847 Mon Sep 17 00:00:00 2001 From: Klas Lindfors Date: Mon, 10 Nov 2014 09:49:54 +0100 Subject: [PATCH] correct offs for CHUID_GUID_OFFS and change verbose print to CHUID CHUID_GUID_OFFS was 28 instead of 29, leading to invalid CHUID verbose print said "setting GUID.." changing to CHUID patch from Doug Engert fixes #9 --- tool/yubico-piv-tool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tool/yubico-piv-tool.c b/tool/yubico-piv-tool.c index 9786afc..5a2fc9c 100644 --- a/tool/yubico-piv-tool.c +++ b/tool/yubico-piv-tool.c @@ -57,7 +57,7 @@ unsigned const char chuid_tmpl[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x35, 0x08, 0x32, 0x30, 0x33, 0x30, 0x30, 0x31, 0x30, 0x31, 0x3e, 0x00, 0xfe, 0x00, }; -#define CHUID_GUID_OFFS 28 +#define CHUID_GUID_OFFS 29 unsigned const char sha1oid[] = { 0x30, 0x21, 0x30, 0x09, 0x06, 0x05, 0x2B, 0x0E, 0x03, 0x02, 0x1A, 0x05, 0x00, @@ -469,7 +469,7 @@ static bool set_chuid(ykpiv_state *state, int verbose) { return false; } if(verbose) { - fprintf(stderr, "Setting the GUID to: "); + fprintf(stderr, "Setting the CHUID to: "); dump_hex(chuid, sizeof(chuid)); fprintf(stderr, "\n"); }