summaryrefslogtreecommitdiffstats
path: root/ssl.c
diff options
context:
space:
mode:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2007-10-22 20:06:14 +0000
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2007-10-22 20:06:14 +0000
commit718526e0e9efbcf6f8aa5cfa411c06c21429011d (patch)
tree91ba9366ad8d733256e15eb61623384a48a9950f /ssl.c
parent7256e6b4d6439695fc1221b00ae0b876006ffe75 (diff)
downloadopenvpn-718526e0e9efbcf6f8aa5cfa411c06c21429011d.tar.gz
openvpn-718526e0e9efbcf6f8aa5cfa411c06c21429011d.tar.xz
openvpn-718526e0e9efbcf6f8aa5cfa411c06c21429011d.zip
Use pkcs11-helper as external library, can be downloaded
from https://www.opensc-project.org/pkcs11-helper (Alon Bar-Lev). git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@2418 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to 'ssl.c')
-rw-r--r--ssl.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/ssl.c b/ssl.c
index 85e9c6f..712489a 100644
--- a/ssl.c
+++ b/ssl.c
@@ -321,6 +321,9 @@ ssl_set_auth_nocache (void)
void
ssl_purge_auth (void)
{
+#ifdef USE_PKCS11
+ pkcs11_logout ();
+#endif
purge_user_pass (&passbuf, true);
purge_user_pass (&auth_user_pass, true);
}
@@ -1151,10 +1154,9 @@ init_ssl (const struct options *options)
if (options->pkcs11_providers[0])
{
/* Load Certificate and Private Key */
- if (!SSL_CTX_use_pkcs11 (ctx, options->pkcs11_slot_type, options->pkcs11_slot, options->pkcs11_id_type, options->pkcs11_id))
+ if (!SSL_CTX_use_pkcs11 (ctx, options->pkcs11_id))
{
- msg (M_WARN, "Cannot load certificate \"%s:%s\" from slot \"%s:%s\" using PKCS#11 interface",
- options->pkcs11_id_type, options->pkcs11_id, options->pkcs11_slot_type, options->pkcs11_slot);
+ msg (M_WARN, "Cannot load certificate \"%s\" using PKCS#11 interface", options->pkcs11_id);
goto err;
}
}