[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] GNU gnutls branch, master, updated. gnutls_2_9_10-238-ge029ff6
From: |
Nikos Mavrogiannopoulos |
Subject: |
[SCM] GNU gnutls branch, master, updated. gnutls_2_9_10-238-ge029ff6 |
Date: |
Sat, 19 Jun 2010 14:21:20 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU gnutls".
http://git.savannah.gnu.org/cgit/gnutls.git/commit/?id=e029ff67f2b7ca4e911f95671a66a0937b3b7c60
The branch, master has been updated
via e029ff67f2b7ca4e911f95671a66a0937b3b7c60 (commit)
from 310ee9a531b009905ceace902df96728a92c3833 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit e029ff67f2b7ca4e911f95671a66a0937b3b7c60
Author: Nikos Mavrogiannopoulos <address@hidden>
Date: Sat Jun 19 16:20:56 2010 +0200
Only save PIN if login was successful.
-----------------------------------------------------------------------
Summary of changes:
lib/pkcs11.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/lib/pkcs11.c b/lib/pkcs11.c
index 51d7f2f..ffb4c21 100644
--- a/lib/pkcs11.c
+++ b/lib/pkcs11.c
@@ -1648,6 +1648,8 @@ int pkcs11_login(pakchois_session_t *pks, struct
token_info *info, token_creds_s
memcpy(pin, creds->pin, creds->pin_size);
pin_len = creds->pin_size;
+
+ ret = 0;
} else {
if (info->tinfo.flags & CKF_USER_PIN_COUNT_LOW)
flags |= GNUTLS_PKCS11_PIN_COUNT_LOW;
@@ -1665,13 +1667,15 @@ int pkcs11_login(pakchois_session_t *pks, struct
token_info *info, token_creds_s
}
pin_len = strlen(pin);
- if (ret == GNUTLS_E_PKCS11_PIN_SAVE && creds) {
+ }
+
+ rv = pakchois_login(pks, CKU_USER, (unsigned char *)pin, pin_len);
+
+ if (ret == GNUTLS_E_PKCS11_PIN_SAVE && creds &&
(rv==CKR_OK||rv==CKR_USER_ALREADY_LOGGED_IN)) {
memcpy(creds->pin, pin, pin_len);
creds->pin_size = pin_len;
- }
}
- rv = pakchois_login(pks, CKU_USER, (unsigned char *)pin, pin_len);
/* Try to scrub the pin off the stack. Clever compilers will
* probably optimize this away, oh well. */
memset(pin, 0, sizeof pin);
hooks/post-receive
--
GNU gnutls
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] GNU gnutls branch, master, updated. gnutls_2_9_10-238-ge029ff6,
Nikos Mavrogiannopoulos <=