aboutsummaryrefslogtreecommitdiff
path: root/pkcs11.c
diff options
context:
space:
mode:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2006-06-13 17:02:28 +0000
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2006-06-13 17:02:28 +0000
commit14a4962ab06743b36481aca9481758a3dd92b035 (patch)
tree18e18f55f585a6d7b4a089b9eded04debb8e1c3e /pkcs11.c
parentAdded optional minimum-number-of-bytes (diff)
downloadopenvpn-14a4962ab06743b36481aca9481758a3dd92b035.tar.xz
-r 1026:1032
https://svn.openvpn.net/projects/openvpn/contrib/alon/BETA21/openvpn Changes: 1. Updated makefile.w32-vc to include lladdr.*, updated linkage libraries. 2. Modified lladdr.c to be compiled under visual C. 3. Added retry counter to PKCS#11 PIN hook. 4. Modified PKCS#11 PIN retry loop to return correct error code when PIN is incorrect. git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@1038 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to 'pkcs11.c')
-rw-r--r--pkcs11.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/pkcs11.c b/pkcs11.c
index 3b136c5..9f30407 100644
--- a/pkcs11.c
+++ b/pkcs11.c
@@ -149,10 +149,12 @@ static
bool
_pkcs11_openvpn_token_prompt (
IN const void *pData,
- IN const pkcs11h_token_id_t token
+ IN const pkcs11h_token_id_t token,
+ IN const unsigned retry
) {
static struct user_pass token_resp;
+ (void)retry;
ASSERT (token!=NULL);
CLEAR (token_resp);
@@ -179,12 +181,14 @@ bool
_pkcs11_openvpn_pin_prompt (
IN const void *pData,
IN const pkcs11h_token_id_t token,
+ IN const unsigned retry,
OUT char * const szPIN,
IN const size_t nMaxPIN
) {
static struct user_pass token_pass;
char szPrompt[1024];
+ (void)retry;
ASSERT (token!=NULL);
openvpn_snprintf (szPrompt, sizeof (szPrompt), "%s token", token->label);