- honor --pin argument for pin pad readers, too
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1537 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
927ae344cc
commit
6ff1ecbc73
|
@ -417,8 +417,8 @@ main(int argc, char * const argv[])
|
||||||
* we safely stop here. */
|
* we safely stop here. */
|
||||||
return change_pin(opt_slot, session);
|
return change_pin(opt_slot, session);
|
||||||
|
|
||||||
if (opt_login) {
|
if (opt_login || opt_pin) {
|
||||||
char *pin;
|
char *pin = NULL;
|
||||||
CK_TOKEN_INFO info;
|
CK_TOKEN_INFO info;
|
||||||
|
|
||||||
get_token_info(opt_slot, &info);
|
get_token_info(opt_slot, &info);
|
||||||
|
@ -426,7 +426,8 @@ main(int argc, char * const argv[])
|
||||||
/* Identify which pin to enter */
|
/* Identify which pin to enter */
|
||||||
|
|
||||||
if (info.flags & CKF_PROTECTED_AUTHENTICATION_PATH) {
|
if (info.flags & CKF_PROTECTED_AUTHENTICATION_PATH) {
|
||||||
pin = NULL;
|
if (opt_pin)
|
||||||
|
pin = opt_pin;
|
||||||
} else
|
} else
|
||||||
if (info.flags & CKF_LOGIN_REQUIRED) {
|
if (info.flags & CKF_LOGIN_REQUIRED) {
|
||||||
if (opt_pin == NULL)
|
if (opt_pin == NULL)
|
||||||
|
|
Loading…
Reference in New Issue