summaryrefslogtreecommitdiffstats
path: root/pkcs11-helper.c
diff options
context:
space:
mode:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2005-10-25 17:28:54 +0000
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2005-10-25 17:28:54 +0000
commit1f2c6877ad1fc8cb96937d56ea9ad097bfd43f02 (patch)
tree054dfcf12dac9294819cff36094cd7ef9e96cb0d /pkcs11-helper.c
parent7f9811db02ad61cbacc0da730f95fee116e521ca (diff)
downloadopenvpn-1f2c6877ad1fc8cb96937d56ea9ad097bfd43f02.tar.gz
openvpn-1f2c6877ad1fc8cb96937d56ea9ad097bfd43f02.tar.xz
openvpn-1f2c6877ad1fc8cb96937d56ea9ad097bfd43f02.zip
Merge with https://svn.openvpn.net/projects/openvpn/contrib/alon/BETA21@719
More PKCS#11 changes. git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@720 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to 'pkcs11-helper.c')
-rw-r--r--pkcs11-helper.c32
1 files changed, 14 insertions, 18 deletions
diff --git a/pkcs11-helper.c b/pkcs11-helper.c
index af27383..033c31f 100644
--- a/pkcs11-helper.c
+++ b/pkcs11-helper.c
@@ -38,12 +38,6 @@
#if defined(PKCS11H_ENABLE_HELPER)
-#if defined(WIN32)
-#include "cryptoki-win32.h"
-#else
-#include "cryptoki.h"
-#endif
-
#include "pkcs11-helper.h"
/*===========================================
@@ -1773,6 +1767,11 @@ pkcs11h_addProvider (
) {
pkcs11h_provider_t provider = NULL;
CK_C_GetFunctionList gfl = NULL;
+#if defined(WIN32)
+ int mypid = 0;
+#else
+ pid_t mypid = getpid ();
+#endif
CK_RV rv = CKR_OK;
PKCS11ASSERT (pkcs11h_data!=NULL);
@@ -1782,11 +1781,7 @@ pkcs11h_addProvider (
PKCS11DLOG (
PKCS11_LOG_DEBUG2,
"PKCS#11: pkcs11h_addProvider entry pid=%d, szProvider=%s, szSignMode=%s",
-#if defined(WIN32)
- 0,
-#else
- getpid (),
-#endif
+ mypid,
szProvider,
szSignMode
);
@@ -1896,15 +1891,16 @@ pkcs11h_addProvider (
CK_RV
pkcs11h_forkFixup () {
+#if defined(WIN32)
+ int mypid = 0;
+#else
+ pid_t mypid = getpid ();
+#endif
PKCS11DLOG (
PKCS11_LOG_DEBUG2,
"PKCS#11: pkcs11h_forkFixup entry pid=%d",
-#if defined(WIN32)
- 0
-#else
- getpid ()
-#endif
+ mypid
);
if (pkcs11h_data != NULL && pkcs11h_data->fInitialized) {
@@ -1940,7 +1936,7 @@ pkcs11h_createCertificateSession (
IN const int nPINCachePeriod,
OUT pkcs11h_certificate_t * const p_pkcs11h_certificate
) {
- pkcs11h_certificate_t pkcs11h_certificate;
+ pkcs11h_certificate_t pkcs11h_certificate = NULL;
CK_RV rv = CKR_OK;
bool fOpSuccess = false;
@@ -2554,7 +2550,7 @@ _pkcs11h_openssl_sign (
int myrsa_size = 0;
unsigned char *enc_alloc = NULL;
- unsigned char *enc;
+ unsigned char *enc = NULL;
int enc_len = 0;
PKCS11ASSERT (m!=NULL);