]> git.ipfire.org Git - thirdparty/strongswan.git/blobdiff - configure.ac
github: Use tpm2-tss 3.2.3 for tests
[thirdparty/strongswan.git] / configure.ac
index 4c44bd0d0841c35bfdf3b7fa77ce87215eef2221..f6e8701d07e0d410c1d8547da0edcd28d716b608 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2007-2017 Tobias Brunner
+# Copyright (C) 2007-2022 Tobias Brunner
 # Copyright (C) 2006-2022 Andreas Steffen
 # Copyright (C) 2006-2014 Martin Willi
 #
@@ -20,7 +20,7 @@
 #  initialize & set some vars
 # ============================
 
-AC_INIT([strongSwan],[5.9.7])
+AC_INIT([strongSwan],[5.9.14])
 AM_INIT_AUTOMAKE(m4_esyscmd([
        echo tar-ustar
        echo subdir-objects
@@ -144,7 +144,7 @@ ARG_ENABL_SET([ctr],            [enables the Counter Mode wrapper crypto plugin.
 ARG_DISBL_SET([des],            [disable DES/3DES software implementation plugin.])
 ARG_DISBL_SET([drbg],           [disable the NIST Deterministic Random Bit Generator plugin.])
 ARG_DISBL_SET([fips-prf],       [disable FIPS PRF software implementation plugin.])
-ARG_ENABL_SET([gcm],            [enables the GCM AEAD wrapper crypto plugin.])
+ARG_DISBL_SET([gcm],            [disable the GCM AEAD wrapper crypto plugin.])
 ARG_ENABL_SET([gcrypt],         [enables the libgcrypt plugin.])
 ARG_DISBL_SET([gmp],            [disable GNU MP (libgmp) based crypto implementation plugin.])
 ARG_DISBL_SET([curve25519],     [disable Curve25519 Diffie-Hellman plugin.])
@@ -178,6 +178,7 @@ ARG_DISBL_SET([pkcs12],         [disable PKCS12 container support plugin.])
 ARG_DISBL_SET([pubkey],         [disable RAW public key support plugin.])
 ARG_DISBL_SET([sshkey],         [disable SSH key decoding plugin.])
 ARG_DISBL_SET([x509],           [disable X509 certificate implementation plugin.])
+ARG_ENABL_SET([openxpki],       [enable OCSP responder accessing OpenXPKI certificate database.])
 # fetcher/resolver plugins
 ARG_ENABL_SET([curl],           [enable CURL fetcher plugin to fetch files via libcurl. Requires libcurl.])
 ARG_ENABL_SET([files],          [enable simple file:// URI fetcher.])
@@ -307,6 +308,7 @@ ARG_ENABL_SET([svc],            [enable charon Windows service.])
 ARG_ENABL_SET([systemd],        [enable systemd specific IKE daemon charon-systemd.])
 ARG_DISBL_SET([swanctl],        [disable swanctl configuration and control tool.])
 ARG_ENABL_SET([tkm],            [enable Trusted Key Manager support.])
+ARG_ENABL_SET([cert-enroll],    [enable automatic certificate enrollment via EST or SCEP.])
 # optional features
 ARG_ENABL_SET([bfd-backtraces], [use binutils libbfd to resolve backtraces for memory leaks and segfaults.])
 ARG_ENABL_SET([dbghelp-backtraces],[use dbghlp.dll on Windows to create and print backtraces for memory leaks and segfaults.])
@@ -325,8 +327,10 @@ ARG_ENABL_SET([perl-cpan-install],[enable installation of provided CPAN module.]
 ARG_ENABL_SET([selinux],        [enable SELinux support for labeled IPsec.])
 ARG_ENABL_SET([tss-trousers],   [enable the use of the TrouSerS Trusted Software Stack])
 ARG_ENABL_SET([tss-tss2],       [enable the use of the TSS 2.0 Trusted Software Stack])
+ARG_ENABL_SET([cert-enroll-timer],[enable installation of cert-enroll as a systemd timer.])
 
 # compile options
+ARG_ENABL_SET([asan],           [enable build with AddressSanitizer (ASan).])
 ARG_ENABL_SET([coverage],       [enable lcov coverage report generation.])
 ARG_ENABL_SET([git-version],    [use output of 'git describe' as version information in executables.])
 ARG_ENABL_SET([leak-detective], [enable malloc hooks to find memory leaks.])
@@ -511,10 +515,14 @@ if test x$gmp = xtrue -o x$ntru = xtrue -o x$bliss = xtrue; then
        mgf1=true
 fi
 
-if test x$stroke = xtrue; then
+if test x$stroke = xtrue -o x$vici = xtrue; then
        counters=true
 fi
 
+if test x$cert_enroll = xtrue; then
+       pki=true
+fi
+
 if test x$kdf = xfalse; then
        if test x$aesni = xtrue -o x$cmac = xtrue -o x$xcbc = xtrue; then
                AC_MSG_WARN(m4_normalize([
@@ -743,7 +751,7 @@ AC_COMPILE_IFELSE(
                  #include <sys/types.h>
                  #include <sys/socket.h>
                  #include <netinet/in.h>]],
-               [[struct in6_pktinfo pi;
+               [[struct in6_pktinfo pi = {};
                  if (pi.ipi6_ifindex)
                  {
                    return 0;
@@ -1029,14 +1037,16 @@ if test x$xml = xtrue; then
        AC_SUBST(xml_LIBS)
 fi
 
-if test x$systemd = xtrue; then
+if test x$systemd = xtrue -o x$cert_enroll_timer = xtrue; then
        AC_MSG_CHECKING([for systemd system unit directory])
        if test -n "$systemdsystemunitdir" -a "x$systemdsystemunitdir" != xno; then
                AC_MSG_RESULT([$systemdsystemunitdir])
        else
                AC_MSG_ERROR([not found (try --with-systemdsystemunitdir)])
        fi
+fi
 
+if test x$systemd = xtrue; then
        PKG_CHECK_MODULES(systemd, [libsystemd >= 209],
                [AC_SUBST(systemd_CFLAGS)
                 AC_SUBST(systemd_LIBS)],
@@ -1168,7 +1178,7 @@ if test x$openssl = xtrue; then
        if test "x$windows" = xtrue; then
                openssl_lib=eay32
                AC_CHECK_LIB([$openssl_lib],[EVP_CIPHER_CTX_new],[LIBS="$LIBS"],
-                       [AC_MSG_RESULT([no]);openssl_lib=""],[$DLLIB])
+                       [openssl_lib=""],[$DLLIB])
        fi
        if test -z "$openssl_lib"; then
                openssl_lib=crypto
@@ -1206,7 +1216,7 @@ if test x$botan = xtrue; then
        AC_SUBST(botan_LIBS)
        saved_LIBS=$LIBS
        LIBS="$botan_LIBS"
-       AC_CHECK_FUNCS(botan_rng_init_custom)
+       AC_CHECK_FUNCS(botan_rng_init_custom botan_pubkey_ecc_key_used_explicit_encoding)
        LIBS=$saved_LIBS
 fi
 
@@ -1378,6 +1388,27 @@ if test x$fuzzing = xtrue; then
        esac
 fi
 
+if test x$asan = xtrue; then
+       # adding this here and not earlier or passed to the script avoids issues
+       # e.g. with libpthread (libasan provides stubs for its functions but no full
+       # implementation so configure does not detect that -lpthread is required
+       # when GCC is used, clang always adds -lpthread)
+       CFLAGS="$CFLAGS -fsanitize=address -fno-omit-frame-pointer"
+       # this is necessary so AddressSanitizer can resolve symbols e.g. for
+       # C++ exceptions that are used in libbotan
+       if test x$botan = xtrue; then
+               LDFLAGS="$LDFLAGS -lstdc++"
+       fi
+       if test x$openssl = xtrue; then
+               # we need to suppress some leaks with OpenSSL 3 as we don't deinitialze
+               # it properly
+               AC_SUBST(LSAN_OPTIONS, [suppressions=\${abs_top_srcdir}/.lsan.suppressions])
+               # use this instead of AM_TESTS_ENVIRONMENT as we don't use the parallel
+               # test harness
+               AC_SUBST(TESTS_ENVIRONMENT, ['export LSAN_OPTIONS="$(LSAN_OPTIONS)";'])
+       fi
+fi
+
 if test x$ruby_gems = xtrue; then
        AC_PATH_PROG([GEM], [gem], [], [$PATH:/bin:/usr/bin:/usr/local/bin])
        if test x$GEM = x; then
@@ -1448,9 +1479,13 @@ fi
 # modify CFLAGS as needed, do this late so we don't affect configure checks
 CFLAGS="$CFLAGS -include $(pwd)/config.h"
 
+AC_MSG_CHECKING([for use of -Werror and additional warnings])
 WARN_CFLAGS=
 if test x$warnings = xtrue; then
        WARN_CFLAGS="-Werror -Wall -Wextra"
+       AC_MSG_RESULT([yes])
+else
+       AC_MSG_RESULT([no])
 fi
 # disable some warnings, whether explicitly enabled above or by default
 # these are not compatible with our custom printf specifiers
@@ -1479,7 +1514,6 @@ m4_include(m4/macros/add-plugin.m4)
 
 # plugin lists for all components
 charon_plugins=
-starter_plugins=
 pool_plugins=
 attest_plugins=
 pki_plugins=
@@ -1519,7 +1553,7 @@ ADD_PLUGIN([random],               [s charon pki scripts manager medsrv attest n
 ADD_PLUGIN([nonce],                [s charon nm cmd aikgen])
 ADD_PLUGIN([x509],                 [s charon pki scripts attest nm cmd aikgen fuzz])
 ADD_PLUGIN([revocation],           [s charon pki nm cmd])
-ADD_PLUGIN([constraints],          [s charon nm cmd])
+ADD_PLUGIN([constraints],          [s charon pki nm cmd])
 ADD_PLUGIN([acert],                [s charon])
 ADD_PLUGIN([pubkey],               [s charon pki cmd aikgen])
 ADD_PLUGIN([pkcs1],                [s charon pki scripts manager medsrv attest nm cmd aikgen fuzz])
@@ -1559,18 +1593,19 @@ ADD_PLUGIN([curl],                 [s charon pki scripts nm cmd])
 ADD_PLUGIN([files],                [s charon pki scripts nm cmd])
 ADD_PLUGIN([winhttp],              [s charon pki scripts])
 ADD_PLUGIN([soup],                 [s charon pki scripts nm cmd])
-ADD_PLUGIN([mysql],                [s charon pool manager medsrv attest])
-ADD_PLUGIN([sqlite],               [s charon pool manager medsrv attest])
+ADD_PLUGIN([mysql],                [s charon pki pool manager medsrv attest])
+ADD_PLUGIN([sqlite],               [s charon pki pool manager medsrv attest])
+ADD_PLUGIN([openxpki],             [s pki])
 ADD_PLUGIN([attr],                 [c charon])
 ADD_PLUGIN([attr-sql],             [c charon])
 ADD_PLUGIN([load-tester],          [c charon])
 ADD_PLUGIN([kernel-libipsec],      [c charon cmd])
 ADD_PLUGIN([kernel-wfp],           [c charon])
 ADD_PLUGIN([kernel-iph],           [c charon])
-ADD_PLUGIN([kernel-pfkey],         [c charon starter nm cmd])
-ADD_PLUGIN([kernel-pfroute],       [c charon starter nm cmd])
-ADD_PLUGIN([kernel-netlink],       [c charon starter nm cmd])
-ADD_PLUGIN([selinux],              [c charon starter nm cmd])
+ADD_PLUGIN([kernel-pfkey],         [c charon nm cmd])
+ADD_PLUGIN([kernel-pfroute],       [c charon nm cmd])
+ADD_PLUGIN([kernel-netlink],       [c charon nm cmd])
+ADD_PLUGIN([selinux],              [c charon nm cmd])
 ADD_PLUGIN([resolve],              [c charon cmd])
 ADD_PLUGIN([save-keys],            [c])
 ADD_PLUGIN([socket-default],       [c charon nm cmd])
@@ -1640,10 +1675,8 @@ ADD_PLUGIN([unity],                [c charon])
 ADD_PLUGIN([counters],             [c charon])
 
 AC_SUBST(charon_plugins)
-AC_SUBST(starter_plugins)
 AC_SUBST(pool_plugins)
 AC_SUBST(attest_plugins)
-AC_SUBST(scepclient_plugins)
 AC_SUBST(pki_plugins)
 AC_SUBST(scripts_plugins)
 AC_SUBST(fuzz_plugins)
@@ -1697,6 +1730,7 @@ AM_CONDITIONAL(USE_PKCS1, test x$pkcs1 = xtrue)
 AM_CONDITIONAL(USE_PKCS7, test x$pkcs7 = xtrue)
 AM_CONDITIONAL(USE_PKCS8, test x$pkcs8 = xtrue)
 AM_CONDITIONAL(USE_PKCS12, test x$pkcs12 = xtrue)
+AM_CONDITIONAL(USE_OPENXPKI, test x$openxpki = xtrue)
 AM_CONDITIONAL(USE_PGP, test x$pgp = xtrue)
 AM_CONDITIONAL(USE_DNSKEY, test x$dnskey = xtrue)
 AM_CONDITIONAL(USE_SSHKEY, test x$sshkey = xtrue)
@@ -1819,6 +1853,7 @@ AM_CONDITIONAL(USE_ATTR, test x$attr = xtrue)
 AM_CONDITIONAL(USE_ATTR_SQL, test x$attr_sql = xtrue)
 AM_CONDITIONAL(USE_COUNTERS, test x$counters = xtrue)
 AM_CONDITIONAL(USE_SELINUX, test x$selinux = xtrue)
+AM_CONDITIONAL(USE_PF_HANDLER, test x$dhcp = xtrue -o x$farp = xtrue)
 
 #  other options
 # ---------------
@@ -1870,6 +1905,8 @@ AM_CONDITIONAL(USE_SWANCTL, test x$swanctl = xtrue)
 AM_CONDITIONAL(USE_SVC, test x$svc = xtrue)
 AM_CONDITIONAL(USE_SYSTEMD, test x$systemd = xtrue)
 AM_CONDITIONAL(USE_LEGACY_SYSTEMD, test -n "$systemdsystemunitdir" -a "x$systemdsystemunitdir" != xno)
+AM_CONDITIONAL(USE_CERT_ENROLL, test x$cert_enroll = xtrue)
+AM_CONDITIONAL(USE_CERT_ENROLL_TIMER, test x$cert_enroll_timer = xtrue)
 AM_CONDITIONAL(USE_RUBY_GEMS, test x$ruby_gems = xtrue)
 AM_CONDITIONAL(USE_PYTHON_EGGS, test x$python_eggs = xtrue)
 AM_CONDITIONAL(USE_PERL_CPAN, test x$perl_cpan = xtrue)
@@ -1977,6 +2014,7 @@ AC_CONFIG_FILES([
        src/libstrongswan/plugins/pkcs7/Makefile
        src/libstrongswan/plugins/pkcs8/Makefile
        src/libstrongswan/plugins/pkcs12/Makefile
+       src/libstrongswan/plugins/openxpki/Makefile
        src/libstrongswan/plugins/pgp/Makefile
        src/libstrongswan/plugins/dnskey/Makefile
        src/libstrongswan/plugins/sshkey/Makefile
@@ -2144,6 +2182,7 @@ AC_CONFIG_FILES([
        src/sw-collector/Makefile
        src/sec-updater/Makefile
        src/swanctl/Makefile
+       src/cert-enroll/Makefile
        src/xfrmi/Makefile
        scripts/Makefile
        testing/Makefile
@@ -2167,6 +2206,7 @@ AC_CONFIG_FILES([
        src/pki/man/pki---gen.1
        src/pki/man/pki---issue.1
        src/pki/man/pki---keyid.1
+       src/pki/man/pki---ocsp.1
        src/pki/man/pki---pkcs12.1
        src/pki/man/pki---pkcs7.1
        src/pki/man/pki---print.1
@@ -2183,6 +2223,7 @@ AC_CONFIG_FILES([
        src/pt-tls-client/pt-tls-client.1
        src/sw-collector/sw-collector.8
        src/sec-updater/sec-updater.8
+       src/cert-enroll/cert-enroll.8
 ])
 
 AC_OUTPUT