diff options
author | james <james@e7ae566f-a301-0410-adde-c780ea21d3b5> | 2005-10-13 08:38:41 +0000 |
---|---|---|
committer | james <james@e7ae566f-a301-0410-adde-c780ea21d3b5> | 2005-10-13 08:38:41 +0000 |
commit | ce98fd24bd72d479805cb121ca8e118826f1ed76 (patch) | |
tree | b109113870455d2c5595a0833301f234353578e3 /init.c | |
parent | Renamed plugin to plugins to work around (diff) | |
download | openvpn-ce98fd24bd72d479805cb121ca8e118826f1ed76.tar.xz |
Merged PKCS#11 patch.
Pre-2.1_beta3
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@604 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to 'init.c')
-rw-r--r-- | init.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -38,6 +38,7 @@ #include "otime.h" #include "pool.h" #include "gremlin.h" +#include "pkcs11.h" #include "memdbg.h" @@ -110,6 +111,14 @@ context_init_1 (struct context *c) /* Certificate password input */ if (c->options.key_pass_file) pem_password_setup (c->options.key_pass_file); + +#if defined(ENABLE_PKCS11) + { + int i; + for (i=0;i<MAX_PARMS && c->options.pkcs11_providers[i] != NULL;i++) + add_pkcs11 (c->options.pkcs11_providers[i], c->options.pkcs11_sign_mode[i]); + } +#endif #endif #if P2MP @@ -223,6 +232,12 @@ uninit_static (void) #ifdef USE_CRYPTO free_ssl_lib (); + +#ifdef USE_SSL +#ifdef ENABLE_PKCS11 + free_pkcs11 (); +#endif +#endif #endif #if defined(MEASURE_TLS_HANDSHAKE_STATS) && defined(USE_CRYPTO) && defined(USE_SSL) |