From 1b4ad6b8bd54c363675d940c8d4231db6b7c91d6 Mon Sep 17 00:00:00 2001 From: Thomas Westfeld Date: Sun, 18 Jan 2015 22:35:35 +0100 Subject: [PATCH] Fixed error when parameters in unblock-pin when unblock-pin action is called without -P and -N parameter, the wrong error is returned, saying that -P should be a pin, whereas in this action it is a puk. --- tool/yubico-piv-tool.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tool/yubico-piv-tool.c b/tool/yubico-piv-tool.c index dedafe5..9550b31 100644 --- a/tool/yubico-piv-tool.c +++ b/tool/yubico-piv-tool.c @@ -1358,9 +1358,10 @@ int main(int argc, char *argv[]) { ret = EXIT_FAILURE; } } else { - fprintf(stderr, "The %s action needs a pin (-P) and a new-pin (-N).\n", + fprintf(stderr, "The %s action needs a %s (-P) and a new-pin (-N).\n", action == action_arg_changeMINUS_pin ? "change-pin" : - action == action_arg_changeMINUS_puk ? "change-puk" : "unblock-pin"); + action == action_arg_changeMINUS_puk ? "change-puk" : "unblock-pin", + action == action_arg_unblockMINUS_pin ? "puk" : "pin"); ret = EXIT_FAILURE; } break;