diff options
author | Alon Bar-Lev <alon.barlev@gmail.com> | 2012-02-29 22:12:07 +0200 |
---|---|---|
committer | David Sommerseth <davids@redhat.com> | 2012-03-22 22:17:27 +0100 |
commit | 18b5fbdfb3aba63a62de197b4931cac77af2323c (patch) | |
tree | ed98742167664b4dd93ec2459993b3f21c9c5655 /src/openvpn | |
parent | e06832a7edcf93e0feda8802beea55a3cc7ddf9f (diff) | |
download | openvpn-18b5fbdfb3aba63a62de197b4931cac77af2323c.tar.gz openvpn-18b5fbdfb3aba63a62de197b4931cac77af2323c.tar.xz openvpn-18b5fbdfb3aba63a62de197b4931cac77af2323c.zip |
build: proper pkcs11-helper detection and usage
Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Acked-by: Samuli Seppänen <samuli@openvpn.net>
Signed-off-by: David Sommerseth <davids@redhat.com>
Diffstat (limited to 'src/openvpn')
-rw-r--r-- | src/openvpn/Makefile.am | 4 | ||||
-rw-r--r-- | src/openvpn/ssl.c | 2 | ||||
-rw-r--r-- | src/openvpn/syshead.h | 7 |
3 files changed, 5 insertions, 8 deletions
diff --git a/src/openvpn/Makefile.am b/src/openvpn/Makefile.am index a3f8b3a..fd92225 100644 --- a/src/openvpn/Makefile.am +++ b/src/openvpn/Makefile.am @@ -16,6 +16,9 @@ MAINTAINERCLEANFILES = \ INCLUDES = -I$(top_srcdir)/include +AM_CFLAGS = \ + $(OPTIONAL_PKCS11_HELPER_CFLAGS) + sbin_PROGRAMS = openvpn openvpn_SOURCES = \ @@ -97,6 +100,7 @@ openvpn_SOURCES = \ cryptoapi.h cryptoapi.c openvpn_LDADD = \ $(SOCKETS_LIBS) \ + $(OPTIONAL_PKCS11_HELPER_LIBS) \ $(OPTIONAL_SELINUX_LIBS) \ $(OPTIONAL_DL_LIBS) if WIN32 diff --git a/src/openvpn/ssl.c b/src/openvpn/ssl.c index c26756e..e260718 100644 --- a/src/openvpn/ssl.c +++ b/src/openvpn/ssl.c @@ -264,7 +264,7 @@ ssl_purge_auth (const bool auth_user_pass_only) { if (!auth_user_pass_only) { -#ifdef USE_PKCS11 +#ifdef ENABLE_PKCS11 pkcs11_logout (); #endif purge_user_pass (&passbuf, true); diff --git a/src/openvpn/syshead.h b/src/openvpn/syshead.h index cac4757..53b7580 100644 --- a/src/openvpn/syshead.h +++ b/src/openvpn/syshead.h @@ -590,13 +590,6 @@ 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 - -/* * Do we have CryptoAPI capability? */ #if defined(WIN32) && defined(USE_CRYPTO) && defined(USE_SSL) && defined(USE_OPENSSL) |