summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2011-05-17 00:21:38 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2011-05-17 00:21:38 +0200
commita03cdfff1a7007e08fb62def8086f68d71e7ce31 (patch)
tree748503eb6935b2eb7741ffdadce15ca87bde0556 /src
parent722d5ba4d82acf4782bf77b0a915ba0b8d5dea48 (diff)
downloadgnutls-a03cdfff1a7007e08fb62def8086f68d71e7ce31.tar.gz
corrected message reporting.
Diffstat (limited to 'src')
-rw-r--r--src/p11common.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/p11common.c b/src/p11common.c
index 019877dd10..f91123f3d7 100644
--- a/src/p11common.c
+++ b/src/p11common.c
@@ -41,7 +41,17 @@ pin_callback (void *user, int attempt, const char *token_url,
static char *cached_url = NULL;
static char cached_pin[32] = "";
-
+ 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");
+ }
+
if (cache == 1 && cached_url != NULL)
{
if (strcmp (cached_url, token_url) == 0)
@@ -59,16 +69,6 @@ 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)