From 34e3a42c8f58e64b11a5a648e5f2cc96a641eab8 Mon Sep 17 00:00:00 2001 From: sth Date: Wed, 6 Oct 2004 14:07:18 +0000 Subject: [PATCH] If you do pkcs15-init -C with the onepin option, you can now specify --pin and --puk instead of --so-pin and --so-puk (also allowed for backward compatibility) git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1910 c6295689-39f2-0310-b995-f0e70906c6a9 --- src/tools/pkcs15-init.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/tools/pkcs15-init.c b/src/tools/pkcs15-init.c index 5e4e5043..f10a06fc 100644 --- a/src/tools/pkcs15-init.c +++ b/src/tools/pkcs15-init.c @@ -531,6 +531,14 @@ do_init_app(struct sc_profile *profile) hints.p15card = NULL; hints.info.pin = &info; + /* If it's the onepin option, we need the user PIN iso the SO PIN */ + if (opt_profile && strstr(opt_profile, "+onepin")) { + if (opt_pins[0]) + opt_pins[2] = opt_pins[0]; + if (opt_pins[1]) + opt_pins[3] = opt_pins[1]; + } + memset(&args, 0, sizeof(args)); if (!opt_pins[2] && !opt_no_prompt && !opt_no_sopin) { sc_pkcs15init_get_pin_info(profile,