summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2005-10-15 12:14:56 +0000
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2005-10-15 12:14:56 +0000
commitbe38c0514aabcff8b4a0b588a06d36c150c8b5ed (patch)
treeeb8f07b55de462c2789a9e2138a19ad6e321b0d7
parentc7e014dda9d704b7df6ff37a688d5395649b356a (diff)
downloadopenvpn-be38c0514aabcff8b4a0b588a06d36c150c8b5ed.tar.gz
openvpn-be38c0514aabcff8b4a0b588a06d36c150c8b5ed.tar.xz
openvpn-be38c0514aabcff8b4a0b588a06d36c150c8b5ed.zip
Fixed some minor build issues with PKCS11 patch:
"make dist" wasn't building correct tarball. Some ./configure --enable/--disable options were broken. Renamed pkcs11 directory to pkcs11-headers to work around automake issue. git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@626 e7ae566f-a301-0410-adde-c780ea21d3b5
-rw-r--r--Makefile.am6
-rw-r--r--config-win32.h.in2
-rw-r--r--configure.ac4
-rw-r--r--cryptoki-win32.h2
-rw-r--r--cryptoki.h2
-rwxr-xr-xinstall-win32/prebuild4
-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.c5
-rw-r--r--pkcs11.h4
-rw-r--r--syshead.h7
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)
diff --git a/cryptoki.h b/cryptoki.h
index b0ab3e8..2975a67 100644
--- a/cryptoki.h
+++ b/cryptoki.h
@@ -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
diff --git a/pkcs11.c b/pkcs11.c
index 7352e8f..cee178e 100644
--- a/pkcs11.c
+++ b/pkcs11.c
@@ -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"
diff --git a/pkcs11.h b/pkcs11.h
index 7f44e1b..fdb1b91 100644
--- a/pkcs11.h
+++ b/pkcs11.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 (
diff --git a/syshead.h b/syshead.h
index a786e65..c5ef47b 100644
--- a/syshead.h
+++ b/syshead.h
@@ -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)