"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
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 \
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
#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
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,
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
#define NULL_PTR 0
#endif
-#include "pkcs11/pkcs11.h"
+#include "pkcs11-headers/pkcs11.h"
#pragma pack(pop, cryptoki)
#define NULL_PTR 0
#endif
-#include "pkcs11/pkcs11.h"
+#include "pkcs11-headers/pkcs11.h"
#endif /* ___CRYPTOKI_H_INC___ */
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
#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"
#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 (
#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?
*/