]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Fixed some minor build issues with PKCS11 patch:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>
Sat, 15 Oct 2005 12:14:56 +0000 (12:14 +0000)
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>
Sat, 15 Oct 2005 12:14:56 +0000 (12:14 +0000)
"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

12 files changed:
Makefile.am
config-win32.h.in
configure.ac
cryptoki-win32.h
cryptoki.h
install-win32/prebuild
pkcs11-headers/pkcs11.h [moved from pkcs11/pkcs11.h with 100% similarity]
pkcs11-headers/pkcs11f.h [moved from pkcs11/pkcs11f.h with 100% similarity]
pkcs11-headers/pkcs11t.h [moved from pkcs11/pkcs11t.h with 100% similarity]
pkcs11.c
pkcs11.h
syshead.h

index 030894777050e5b14d4ecaad94debb37ac29652f..abf1fcd8f83bbea00e3697d5ec210a4af125d372 100644 (file)
@@ -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
index 054ecccc732408ad363cef1e787c4ab214d72d96..ab036f1b98f6682e20a0cdae4e527c376cb85aa1 100644 (file)
@@ -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
index 844778f898b6afff4159efe17048425ff7049d0d..6b01f37638c14e788f95c744e1d6067b99e1dc88 100644 (file)
@@ -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 
index 8f0291bc4018899d2d44df4e78e45a5bfff8bcd0..8e62bbdcc75bc6bdc32d0dc9612e7ae57b760a39 100644 (file)
@@ -59,7 +59,7 @@
 #define NULL_PTR 0
 #endif
 
-#include "pkcs11/pkcs11.h"
+#include "pkcs11-headers/pkcs11.h"
 
 #pragma pack(pop, cryptoki)
 
index b0ab3e818392997e14d16cb7c28ac1bb831e2fac..2975a67830efb62b8fd44c44171759049c6a2350 100644 (file)
@@ -30,6 +30,6 @@
 #define NULL_PTR 0
 #endif
 
-#include "pkcs11/pkcs11.h"
+#include "pkcs11-headers/pkcs11.h"
 
 #endif /* ___CRYPTOKI_H_INC___ */
index 8f6ac3bf6d21324466fca62394a19f11e9b7c38b..be7ef9f52ea36e16c07ed748df94d79b9858d5f1 100755 (executable)
@@ -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
similarity index 100%
rename from pkcs11/pkcs11.h
rename to pkcs11-headers/pkcs11.h
similarity index 100%
rename from pkcs11/pkcs11f.h
rename to pkcs11-headers/pkcs11f.h
similarity index 100%
rename from pkcs11/pkcs11t.h
rename to pkcs11-headers/pkcs11t.h
index 7352e8f1d6bdf3d91105f68e62eb84dda991e5b4..cee178ee65dba9ffddc94ad29caa0ad8601d0435 100644 (file)
--- a/pkcs11.c
+++ b/pkcs11.c
 #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"
index 7f44e1ba4cebd361256c4ebea063903b577b5847..fdb1b9139cdafc6b396a439811116ad5d9ad4a1b 100644 (file)
--- 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 (
index a786e65ab4f380f3629e8a65b11951dd4137be4b..c5ef47b41e86201b191ee9ae39a874a9b5807984 100644 (file)
--- a/syshead.h
+++ b/syshead.h
@@ -435,6 +435,13 @@ socket_defined (const socket_descriptor_t sd)
 #define NTLM 0
 #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?
  */