From 4035245649632106616cb2f82312263574ed1282 Mon Sep 17 00:00:00 2001 From: Peter Marschall Date: Sun, 17 Jun 2012 18:55:24 +0200 Subject: [PATCH] opensc-explorer: allow longer PINs in CHANGE & UNBLOCK Harmonize the allowed PIN length in CHANGE & UNBLOCK with the one in VERIFY, making sure they are large enough for OpenPGP, which allows up ro 32 characters, and giving additional security margin for other cards. --- src/tools/opensc-explorer.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/tools/opensc-explorer.c b/src/tools/opensc-explorer.c index 9cc27ffd..28d40920 100644 --- a/src/tools/opensc-explorer.c +++ b/src/tools/opensc-explorer.c @@ -1020,8 +1020,8 @@ static int do_pace(int argc, char **argv) static int do_change(int argc, char **argv) { int ref, r, tries_left = -1; - u8 oldpin[30]; - u8 newpin[30]; + u8 oldpin[64]; + u8 newpin[64]; size_t oldpinlen = 0; size_t newpinlen = 0; struct sc_pin_cmd_data data; @@ -1082,8 +1082,8 @@ static int do_change(int argc, char **argv) static int do_unblock(int argc, char **argv) { int ref, r; - u8 puk[30]; - u8 newpin[30]; + u8 puk[64]; + u8 newpin[64]; size_t puklen = 0; size_t newpinlen = 0; struct sc_pin_cmd_data data;