Bugzilla – Attachment 3032 Details for
Bug 2652
PKCS11 login skipped if login required and no pin set
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
d6be677d1befd84fdbef0259316ebf4383feef6c.diff (text/plain), 939 bytes, created by
Damien Miller
on 2017-08-11 14:32:26 AEST
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Damien Miller
Created:
2017-08-11 14:32:26 AEST
Size:
939 bytes
patch
obsolete
>diff --git a/ssh-pkcs11.c b/ssh-pkcs11.c >index d1f750db0..938535638 100644 >--- a/ssh-pkcs11.c >+++ b/ssh-pkcs11.c >@@ -366,19 +366,16 @@ pkcs11_open_session(struct pkcs11_provider *p, CK_ULONG slotidx, char *pin) > > f = p->function_list; > login_required = p->slotinfo[slotidx].token.flags & CKF_LOGIN_REQUIRED; >- if (pin && login_required && !strlen(pin)) { >- error("pin required"); >- return (-1); >- } >+ > if ((rv = f->C_OpenSession(p->slotlist[slotidx], CKF_RW_SESSION| > CKF_SERIAL_SESSION, NULL, NULL, &session)) > != CKR_OK) { > error("C_OpenSession failed: %lu", rv); > return (-1); > } >- if (login_required && pin) { >+ if (login_required) { > rv = f->C_Login(session, CKU_USER, >- (u_char *)pin, strlen(pin)); >+ (u_char *)pin, (pin != NULL) ? strlen(pin) : 0); > if (rv != CKR_OK && rv != CKR_USER_ALREADY_LOGGED_IN) { > error("C_Login failed: %lu", rv); > if ((rv = f->C_CloseSession(session)) != CKR_OK)
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 2652
:
3032
|
3124
|
3125
|
3226