[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] GNU gnutls branch, gnutls_2_12_x, updated. gnutls_2_12_5-3-gb0dc5a
From: |
Nikos Mavrogiannopoulos |
Subject: |
[SCM] GNU gnutls branch, gnutls_2_12_x, updated. gnutls_2_12_5-3-gb0dc5a5 |
Date: |
Mon, 16 May 2011 21:46:05 +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=b0dc5a5b0988fe151027e039d96bc57bd6d3fa87
The branch, gnutls_2_12_x has been updated
via b0dc5a5b0988fe151027e039d96bc57bd6d3fa87 (commit)
from 02c18f999126d6ee268b5374bfe53e543879fa37 (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 b0dc5a5b0988fe151027e039d96bc57bd6d3fa87
Author: Nikos Mavrogiannopoulos <address@hidden>
Date: Mon May 16 23:45:37 2011 +0200
Corrected PIN caching.
-----------------------------------------------------------------------
Summary of changes:
src/p11common.c | 23 +++++++++++++++--------
1 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/src/p11common.c b/src/p11common.c
index f9cf723..019877d 100644
--- a/src/p11common.c
+++ b/src/p11common.c
@@ -36,19 +36,13 @@ pin_callback (void *user, int attempt, const char
*token_url,
size_t pin_max)
{
const char *password;
- int len;
+ int len, cache = 1;
/* allow caching of PIN */
static char *cached_url = NULL;
static char cached_pin[32] = "";
- printf ("PIN required for token '%s' with URL '%s'\n", token_label,
- token_url);
- if (flags & GNUTLS_PKCS11_PIN_FINAL_TRY)
- printf ("*** This is the final try before locking!\n");
- if (flags & GNUTLS_PKCS11_PIN_COUNT_LOW)
- printf ("*** Only few tries left before locking!\n");
- if (flags == 0 && cached_url != NULL)
+ if (cache == 1 && cached_url != NULL)
{
if (strcmp (cached_url, token_url) == 0)
{
@@ -63,6 +57,19 @@ pin_callback (void *user, int attempt, const char *token_url,
}
}
+ printf ("PIN required for token '%s' with URL '%s'\n", token_label,
+ token_url);
+ if (flags & GNUTLS_PKCS11_PIN_FINAL_TRY)
+ {
+ cache = 0;
+ printf ("*** This is the final try before locking!\n");
+ }
+ if (flags & GNUTLS_PKCS11_PIN_COUNT_LOW)
+ {
+ cache = 0;
+ printf ("*** Only few tries left before locking!\n");
+ }
+
password = getpass ("Enter pin: ");
if (password == NULL || password[0] == 0)
{
hooks/post-receive
--
GNU gnutls
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] GNU gnutls branch, gnutls_2_12_x, updated. gnutls_2_12_5-3-gb0dc5a5,
Nikos Mavrogiannopoulos <=