diff options
Diffstat (limited to '')
-rw-r--r-- | Makefile.am | 6 | ||||
-rw-r--r-- | config-win32.h.in | 2 | ||||
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | cryptoki-win32.h | 2 | ||||
-rw-r--r-- | cryptoki.h | 2 | ||||
-rwxr-xr-x | install-win32/prebuild | 4 | ||||
-rw-r--r-- | pkcs11-headers/pkcs11.h (renamed from pkcs11/pkcs11.h) | 0 | ||||
-rw-r--r-- | pkcs11-headers/pkcs11f.h (renamed from pkcs11/pkcs11f.h) | 0 | ||||
-rw-r--r-- | pkcs11-headers/pkcs11t.h (renamed from pkcs11/pkcs11t.h) | 0 | ||||
-rw-r--r-- | pkcs11.c | 5 | ||||
-rw-r--r-- | pkcs11.h | 4 | ||||
-rw-r--r-- | syshead.h | 7 |
12 files changed, 24 insertions, 12 deletions
diff --git a/Makefile.am b/Makefile.am index 0308947..abf1fcd 100644 --- a/Makefile.am +++ b/Makefile.am @@ -65,7 +65,7 @@ openvpn_SOURCES = \ multi.c multi.h \ ntlm.c ntlm.h \ occ.c occ.h occ-inline.h \ - pkcs11.c pkcs11.h \ + pkcs11.c pkcs11.h cryptoki.h \ openvpn.c openvpn.h \ openvpn-plugin.h \ options.c options.h \ @@ -123,7 +123,9 @@ EXTRA_DIST = \ contrib \ debug \ plugins \ - management + management \ + pkcs11-headers \ + cryptoki-win32.h dist-hook: cd $(distdir) && for i in $(EXTRA_DIST) ; do find $$i -name .svn -type d -prune -exec rm -rf '{}' ';' ; rm -f `find $$i -type f | grep -E '(^|\/)\.?\#|\~$$|\.s?o$$'` ; done diff --git a/config-win32.h.in b/config-win32.h.in index 054eccc..ab036f1 100644 --- a/config-win32.h.in +++ b/config-win32.h.in @@ -75,7 +75,7 @@ typedef unsigned long in_addr_t; #define ENABLE_MANAGEMENT 1 /* Enable PKCS#11 support */ -#define ENABLE_PKCS11 1 +#define USE_PKCS11 1 /* Enable HTTP proxy support */ #define ENABLE_HTTP_PROXY 1 diff --git a/configure.ac b/configure.ac index 844778f..6b01f37 100644 --- a/configure.ac +++ b/configure.ac @@ -466,7 +466,7 @@ fi dnl dnl Check for dlopen -- first try libc then libdl. dnl -if test "$PLUGINS" = "yes"; then +if test "$PLUGINS" = "yes" || test "$PKCS11" = "yes"; then AC_CHECKING([for libdl Library and Header files]) AC_CHECK_HEADER(dlfcn.h, [AC_CHECK_FUNC(dlopen, @@ -603,7 +603,7 @@ fi dnl enable pkcs11 capability if test "$PKCS11" = "yes"; then - AC_DEFINE(ENABLE_PKCS11, 1, [Enable PKCS#11 capability]) + AC_DEFINE(USE_PKCS11, 1, [Enable PKCS11 capability]) fi dnl enable socks diff --git a/cryptoki-win32.h b/cryptoki-win32.h index 8f0291b..8e62bbd 100644 --- a/cryptoki-win32.h +++ b/cryptoki-win32.h @@ -59,7 +59,7 @@ #define NULL_PTR 0 #endif -#include "pkcs11/pkcs11.h" +#include "pkcs11-headers/pkcs11.h" #pragma pack(pop, cryptoki) @@ -30,6 +30,6 @@ #define NULL_PTR 0 #endif -#include "pkcs11/pkcs11.h" +#include "pkcs11-headers/pkcs11.h" #endif /* ___CRYPTOKI_H_INC___ */ diff --git a/install-win32/prebuild b/install-win32/prebuild index 8f6ac3b..be7ef9f 100755 --- a/install-win32/prebuild +++ b/install-win32/prebuild @@ -54,11 +54,11 @@ gcc -O2 $SCRIPTS/u2d.c -o $U2D echo BUILD output dir from source rm -rf $OUT mkdir $OUT -mkdir $OUT/pkcs11 +mkdir $OUT/pkcs11-headers cp $IN/*.[ch] $OUT rm -f $OUT/config.h -cp $IN/pkcs11/*.h $OUT/pkcs11 +cp $IN/pkcs11-headers/*.h $OUT/pkcs11-headers if [ $MISC ]; then cp $MISC/*.* $OUT diff --git a/pkcs11/pkcs11.h b/pkcs11-headers/pkcs11.h index 6c61220..6c61220 100644 --- a/pkcs11/pkcs11.h +++ b/pkcs11-headers/pkcs11.h diff --git a/pkcs11/pkcs11f.h b/pkcs11-headers/pkcs11f.h index a479384..a479384 100644 --- a/pkcs11/pkcs11f.h +++ b/pkcs11-headers/pkcs11f.h diff --git a/pkcs11/pkcs11t.h b/pkcs11-headers/pkcs11t.h index b1a231a..b1a231a 100644 --- a/pkcs11/pkcs11t.h +++ b/pkcs11-headers/pkcs11t.h @@ -34,9 +34,10 @@ #include "config.h" #endif -#if defined(USE_CRYPTO) && defined(USE_SSL) && defined(ENABLE_PKCS11) - #include "syshead.h" + +#if defined(ENABLE_PKCS11) + #include "error.h" #include "misc.h" #include "ssl.h" @@ -25,7 +25,9 @@ #ifndef OPENVPN_PKCS11_H #define OPENVPN_PKCS11_H -#if defined(USE_CRYPTO) && defined(USE_SSL) && defined(ENABLE_PKCS11) +#if defined(ENABLE_PKCS11) + +#include <openssl/ssl.h> int SSL_CTX_use_pkcs11 ( @@ -436,6 +436,13 @@ socket_defined (const socket_descriptor_t sd) #endif /* + * Do we have PKCS11 capability? + */ +#if defined(USE_PKCS11) && defined(USE_CRYPTO) && defined(USE_SSL) +#define ENABLE_PKCS11 +#endif + +/* * Is poll available on this platform? */ #if defined(HAVE_POLL) && defined(HAVE_SYS_POLL_H) |