gnutls-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU gnutls branch, master, updated. gnutls_2_99_1-31-g722d5ba


From: Nikos Mavrogiannopoulos
Subject: [SCM] GNU gnutls branch, master, updated. gnutls_2_99_1-31-g722d5ba
Date: Mon, 16 May 2011 21:45:43 +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=722d5ba4d82acf4782bf77b0a915ba0b8d5dea48

The branch, master has been updated
       via  722d5ba4d82acf4782bf77b0a915ba0b8d5dea48 (commit)
       via  a9aea8db6b09b551d5243e02dbe8f1855b437188 (commit)
      from  f6cafabd269985ef6e527b8ca76aa4f698e12897 (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 722d5ba4d82acf4782bf77b0a915ba0b8d5dea48
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Mon May 16 23:45:37 2011 +0200

    Corrected PIN caching.

commit a9aea8db6b09b551d5243e02dbe8f1855b437188
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Mon May 16 22:29:45 2011 +0200

    assign value

-----------------------------------------------------------------------

Summary of changes:
 lib/gnutls_record.c |    2 +-
 src/p11common.c     |   23 +++++++++++++++--------
 2 files changed, 16 insertions(+), 9 deletions(-)

diff --git a/lib/gnutls_record.c b/lib/gnutls_record.c
index 4afac7e..9b1f8de 100644
--- a/lib/gnutls_record.c
+++ b/lib/gnutls_record.c
@@ -968,7 +968,7 @@ begin:
   ret = recv_headers(session, type, htype, &record);
   if (ret < 0)
     {
-      gnutls_assert_val_fatal(ret);
+      ret = gnutls_assert_val_fatal(ret);
       goto recv_error;
     }
 
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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]