[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] GNU gnutls branch, gnutls_3_0_x-2, updated. gnutls_3_0_18-30-g20cc
From: |
Nikos Mavrogiannopoulos |
Subject: |
[SCM] GNU gnutls branch, gnutls_3_0_x-2, updated. gnutls_3_0_18-30-g20ccd1e |
Date: |
Mon, 16 Apr 2012 16:42:37 +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=20ccd1e7b0d639ea23f1c3cfad2bb4ecf906bbca
The branch, gnutls_3_0_x-2 has been updated
via 20ccd1e7b0d639ea23f1c3cfad2bb4ecf906bbca (commit)
from 56988d61ac7ac1ae8804f4a8d2f5d2abee713a33 (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 20ccd1e7b0d639ea23f1c3cfad2bb4ecf906bbca
Author: Nikos Mavrogiannopoulos <address@hidden>
Date: Mon Apr 16 18:41:00 2012 +0200
If a callback fails try the other.
-----------------------------------------------------------------------
Summary of changes:
NEWS | 3 ++-
lib/pkcs11.c | 19 +++++++++++--------
2 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/NEWS b/NEWS
index b306c5d..d6db1c0 100644
--- a/NEWS
+++ b/NEWS
@@ -5,7 +5,8 @@ See the end for copying conditions.
* Version 3.0.19 (unreleased)
** libgnutls: When decoding a PKCS #11 URL the pin-source field
-is assumed to be a file that stores the pin.
+is assumed to be a file that stores the pin. Based on patch
+by David Smith.
** libgnutls: gnutls_record_check_pending() no longer
returns unprocessed data, and thus ensure the non-blocking
diff --git a/lib/pkcs11.c b/lib/pkcs11.c
index ca7b76b..6cc40f3 100644
--- a/lib/pkcs11.c
+++ b/lib/pkcs11.c
@@ -1948,7 +1948,7 @@ retrieve_pin_for_callback (struct ck_token_info
*token_info, int attempts,
*pin = p11_kit_pin_new_for_string (pin_value);
if (*pin == NULL)
- return gnutls_assert_val(GNUTLS_E_INTERNAL_ERROR);
+ return gnutls_assert_val(GNUTLS_E_MEMORY_ERROR);
return 0;
}
@@ -1958,29 +1958,32 @@ retrieve_pin (struct p11_kit_uri *info, struct
ck_token_info *token_info,
int attempts, ck_user_type_t user_type, struct p11_kit_pin **pin)
{
const char *pinfile;
+ int ret = GNUTLS_E_PKCS11_PIN_ERROR;
*pin = NULL;
/* Check if a pinfile is specified, and use that if possible */
pinfile = p11_kit_uri_get_pinfile (info);
- if (pinfile != NULL && attempts == 0)
+ if (pinfile != NULL)
{
_gnutls_debug_log("pk11: Using pinfile to retrieve PIN\n");
- return retrieve_pin_for_pinfile (pinfile, token_info, attempts,
user_type, pin);
+ ret = retrieve_pin_for_pinfile (pinfile, token_info, attempts,
user_type, pin);
}
/* The global gnutls pin callback */
- else if (pin_func)
- return retrieve_pin_for_callback (token_info, attempts, user_type, pin);
+ if (pin_func && ret < 0)
+ ret = retrieve_pin_for_callback (token_info, attempts, user_type, pin);
/* Otherwise, PIN entry is necessary for login, so fail if there's
* no callback. */
- else
+
+ if (ret < 0)
{
gnutls_assert ();
- _gnutls_debug_log ("pk11: No pin callback but login required.\n");
- return GNUTLS_E_PKCS11_ERROR;
+ _gnutls_debug_log ("pk11: No suitable pin callback but login
required.\n");
}
+
+ return ret;
}
int
hooks/post-receive
--
GNU gnutls
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] GNU gnutls branch, gnutls_3_0_x-2, updated. gnutls_3_0_18-30-g20ccd1e,
Nikos Mavrogiannopoulos <=