don't set P11_LOGIN_DONE before we're logged in
fixes crash on subsequent logins From: Guido Günther. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23858 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -419,8 +419,6 @@ p11_get_session(hx509_context context,
|
|||||||
char pin[20];
|
char pin[20];
|
||||||
char *str;
|
char *str;
|
||||||
|
|
||||||
slot->flags |= P11_LOGIN_DONE;
|
|
||||||
|
|
||||||
if (slot->pin == NULL) {
|
if (slot->pin == NULL) {
|
||||||
|
|
||||||
memset(&prompt, 0, sizeof(prompt));
|
memset(&prompt, 0, sizeof(prompt));
|
||||||
@@ -455,7 +453,9 @@ p11_get_session(hx509_context context,
|
|||||||
"with error: 0x%08x",
|
"with error: 0x%08x",
|
||||||
(int)slot->id, ret);
|
(int)slot->id, ret);
|
||||||
return HX509_PKCS11_LOGIN;
|
return HX509_PKCS11_LOGIN;
|
||||||
}
|
} else
|
||||||
|
slot->flags |= P11_LOGIN_DONE;
|
||||||
|
|
||||||
if (slot->pin == NULL) {
|
if (slot->pin == NULL) {
|
||||||
slot->pin = strdup(pin);
|
slot->pin = strdup(pin);
|
||||||
if (slot->pin == NULL) {
|
if (slot->pin == NULL) {
|
||||||
|
Reference in New Issue
Block a user