Bugzilla – Attachment 2569 Details for
Bug 2240
Secure PIN entry for smartcards through the keypad on the reader (patch)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Updated patch for same.
x-patch-openss-head-7f0250a8ae6c639a19d4e1e24fc112d5e2e1249a.txt (text/plain), 1.38 KB, created by
Dirk-Willem van Gulik
on 2015-03-18 19:18:52 AEDT
(
hide
)
Description:
Updated patch for same.
Filename:
MIME Type:
Creator:
Dirk-Willem van Gulik
Created:
2015-03-18 19:18:52 AEDT
Size:
1.38 KB
patch
obsolete
>diff --git a/ssh-pkcs11.c b/ssh-pkcs11.c >index c3a112f..b053332 100644 >--- a/ssh-pkcs11.c >+++ b/ssh-pkcs11.c >@@ -255,22 +255,30 @@ pkcs11_rsa_private_encrypt(int flen, const u_char *from, u_char *to, RSA *rsa, > si = &k11->provider->slotinfo[k11->slotidx]; > if ((si->token.flags & CKF_LOGIN_REQUIRED) && !si->logged_in) { > if (!pkcs11_interactive) { >- error("need pin"); >+ error("need pin%s", >+ (si->token.flags & CKF_PROTECTED_AUTHENTICATION_PATH) >+ ? " entry on reader keypad" : ""); > 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 (si->token.flags & CKF_PROTECTED_AUTHENTICATION_PATH) { >+ verbose("Deferring PIN entry to keypad of chipcard reader."); >+ pin = NULL; >+ } 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)); > if (rv != CKR_OK && rv != CKR_USER_ALREADY_LOGGED_IN) { >- free(pin); >+ if (pin) free(pin); > error("C_Login failed: %lu", rv); > return (-1); > } >- free(pin); >+ if (pin) 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 2240
:
2435
| 2569 |
2570