Bugzilla – Attachment 2390 Details for
Bug 2185
Allow entering the PIN via reader pinpad
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
openssh_pinpad_support.patch
openssh_pinpad_new.patch (text/plain), 1.26 KB, created by
Dominik Heidler
on 2013-12-17 22:03:29 AEDT
(
hide
)
Description:
openssh_pinpad_support.patch
Filename:
MIME Type:
Creator:
Dominik Heidler
Created:
2013-12-17 22:03:29 AEDT
Size:
1.26 KB
patch
obsolete
>diff -u /tmp/openssh-6.4p1/ssh-pkcs11.c openssh-6.4p1/ssh-pkcs11.c >--- /tmp/openssh-6.4p1/ssh-pkcs11.c 2013-07-18 08:13:03.000000000 +0200 >+++ openssh-6.4p1/ssh-pkcs11.c 2013-12-17 12:00:56.580153425 +0100 >@@ -258,18 +258,26 @@ > error("need pin"); > return (-1); > } >- snprintf(prompt, sizeof(prompt), "Enter PIN for '%s': ", >- si->token.label); >- pin = read_passphrase(prompt, RP_ALLOW_EOF); >- if (pin == NULL) >- return (-1); /* bail out */ >- if ((rv = f->C_Login(si->session, CKU_USER, >- (u_char *)pin, strlen(pin))) != CKR_OK) { >- free(pin); >+ if (si->token.flags & CKF_PROTECTED_AUTHENTICATION_PATH) { >+ printf("Enter PIN for '%s' on reader pinpad. ", si->token.label); >+ fflush(stdout); >+ pin = malloc(1); >+ *pin = '\0'; >+ } else { >+ snprintf(prompt, sizeof(prompt), "Enter PIN for '%s': ", >+ si->token.label); >+ pin = read_passphrase(prompt, RP_ALLOW_EOF); >+ if (pin == NULL) >+ return (-1); /* bail out */ >+ } >+ rv = f->C_Login(si->session, CKU_USER, (u_char *)pin, strlen(pin)); >+ free(pin); >+ if (si->token.flags & CKF_PROTECTED_AUTHENTICATION_PATH) >+ printf("\n"); >+ if (rv != CKR_OK) { > error("C_Login failed: %lu", rv); > return (-1); > } >- free(pin); > si->logged_in = 1; > } > key_filter[1].pValue = k11->keyid;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 2185
:
2389
| 2390