]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Added options to switch between OpenSSL and PolarSSL and PKCS11...
authorAdriaan de Jong <dejong@fox-it.com>
Mon, 31 Oct 2011 15:29:18 +0000 (16:29 +0100)
committerDavid Sommerseth <davids@redhat.com>
Mon, 21 Nov 2011 10:51:39 +0000 (11:51 +0100)
at compile time. Also included the option to enable/disable PKCS11.

Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: Samuli Seppänen <samuli@openvpn.net>
Signed-off-by: David Sommerseth <davids@redhat.com>
win/config.h.in
win/msvc.mak.in
win/settings.in

index ec447a2d259a5fa7bc3aeb366dacca346350deec..e9df379804e8ec6f37a6404f71c99611ee834c91 100644 (file)
@@ -74,7 +74,9 @@ typedef unsigned long in_addr_t;
 #endif
 
 /* Enable PKCS#11 support */
-/* #define USE_PKCS11 1 */
+#if @USE_PKCS11@ != 0
+#define USE_PKCS11 1
+#endif
 
 /* Enable HTTP proxy support */
 #if @ENABLE_HTTP_PROXY@ != 0
@@ -252,7 +254,17 @@ typedef unsigned long in_addr_t;
 #define TIME_WITH_SYS_TIME 1
 #endif
 
-/* Use OpenSSL crypto library */
+/* Use the PolarSSL crypto library */
+#if @USE_POLARSSL@ != 0
+#define USE_POLARSSL 1
+#endif
+
+/* Use the OpenSSL crypto library */
+#if @USE_OPENSSL@ != 0
+#define USE_OPENSSL 1
+#endif
+
+/* Use the crypto library */
 #define USE_CRYPTO 1
 
 /* Use LZO compression library */
@@ -264,7 +276,7 @@ typedef unsigned long in_addr_t;
 /* Use lzo/ directory prefix for LZO header files (for LZO 2.0) */
 #define LZO_HEADER_DIR 1
 
-/* Use OpenSSL SSL library */
+/* Use the SSL library */
 #define USE_SSL 1
 
 /* Version number of package */
index ac17ae9a9fa02e3a4afee7d8a2eb2746f05db0bc..d2babcf2a2d8e7b88daf3e2794b5d591df4fcd9a 100644 (file)
 # - OPENSSL_DIR and LZO_DIR are dynamically created from settings.in
 
 OPENSSL = @OPENSSL_DIR@
+!ifdef INCLUDE_OPENSSL
 OPENSSL_DYNAMIC = libeay32.lib ssleay32.lib
+!endif
+
+POLARSSL = @POLARSSL_DIR@
+!ifdef INCLUDE_POLARSSL
+POLARSSL_DYNAMIC = polarssl.lib
+!endif
+
+PKCS11_HELPER = @PKCS11_HELPER_DIR@
+!ifdef INCLUDE_PKCS11
+PKCS11_HELPER_DYNAMIC = pkcs11-helper.lib
+!endif
 
 LZO = @LZO_DIR@
 LZO_DYNAMIC = lzo2.lib
 
-INCLUDE_DIRS = -I$(OPENSSL)/include -I$(LZO)/include
+INCLUDE_DIRS = -I$(OPENSSL)/include -I$(POLARSSL)/include -I$(LZO)/include -I$(PKCS11_HELPER)/include
 
-LIBS = $(OPENSSL_DYNAMIC) $(LZO_DYNAMIC) ws2_32.lib crypt32.lib iphlpapi.lib winmm.lib user32.lib gdi32.lib advapi32.lib wininet.lib
+LIBS = $(OPENSSL_DYNAMIC) $(POLARSSL_DYNAMIC) $(PKCS11_HELPER_DYNAMIC) $(LZO_DYNAMIC) ws2_32.lib crypt32.lib iphlpapi.lib winmm.lib user32.lib gdi32.lib advapi32.lib wininet.lib
 
-LIB_DIRS = -LIBPATH:$(OPENSSL)\lib -LIBPATH:$(LZO)\lib
+LIB_DIRS = -LIBPATH:$(OPENSSL)\lib -LIBPATH:$(POLARSSL)\build\library -LIBPATH:$(PKCS11_HELPER)\lib -LIBPATH:$(LZO)
 
 EXE = openvpn.exe
 
index 10c79268fe9e0d564dcb111b4250cabb515a17dc..79033dd60a8b023a6ad6a28eecd92ceaefc8bf95 100644 (file)
 !define OPENVPN_GUI_DIR "../openvpn-gui"
 !define OPENVPN_GUI     "openvpn-gui-1.0.3.exe"
 
+# Use either PolarSSL or OpenSSL. Only one may be active at a time
+!define USE_POLARSSL 0
+!define USE_OPENSSL 1
+
+# The same as above, but for library inclusion (must be defined/undefined due to build system)
+;!define INCLUDE_POLARSSL
+!define INCLUDE_OPENSSL
+
+# Uncomment to use the PKCS#11 helper library
+!define USE_PKCS11 0
+;!define INCLUDE_PKCS11
+
 # Prebuilt libraries.  DMALLOC is optional.
 !define OPENSSL_DIR      "../openssl"
+!define POLARSSL_DIR     "../polarssl"
 !define LZO_DIR                  "../lzo"
 !define PKCS11_HELPER_DIR "../pkcs11-helper"