diff --git a/Makefile.am b/Makefile.am index 5d835735..11127802 100644 --- a/Makefile.am +++ b/Makefile.am @@ -512,6 +512,10 @@ AM_CFLAGS = $(ell_cflags) -fvisibility=hidden \ -DUNITDIR=\""$(top_srcdir)/unit/"\" \ -DCERTDIR=\""$(top_builddir)/unit/"\" +if MAINTAINER_MODE +AM_CFLAGS += -DHAVE_PKCS8_SUPPORT +endif + CLEANFILES = src/iwd.service wired/ead.service DISTCHECK_CONFIGURE_FLAGS = --disable-dbus-policy --disable-systemd-service \ diff --git a/unit/test-eapol.c b/unit/test-eapol.c index 1fe39b0c..177b2577 100644 --- a/unit/test-eapol.c +++ b/unit/test-eapol.c @@ -3511,6 +3511,12 @@ static void eapol_ft_handshake_test(const void *data) eapol_exit(); } +#define IS_ENABLED(config_macro) _IS_ENABLED1(config_macro) +#define _IS_ENABLED1(config_macro) _IS_ENABLED2(_XXXX##config_macro) +#define _XXXX1 _YYYY, +#define _IS_ENABLED2(one_or_two_args) _IS_ENABLED3(one_or_two_args true, false) +#define _IS_ENABLED3(ignore_this, val, ...) val + int main(int argc, char *argv[]) { l_test_init(&argc, &argv); @@ -3622,10 +3628,11 @@ int main(int argc, char *argv[]) l_test_add("EAPoL/WPA2 Retransmit Test", &eapol_sm_wpa2_retransmit_test, NULL); - if (l_cipher_is_supported(L_CIPHER_DES3_EDE_CBC) && + if (IS_ENABLED(HAVE_PKCS8_SUPPORT) && + l_cipher_is_supported(L_CIPHER_DES3_EDE_CBC) && l_cipher_is_supported(L_CIPHER_AES_CBC) && l_key_is_supported(L_KEY_FEATURE_RESTRICT | - L_KEY_FEATURE_CRYPTO)) { + L_KEY_FEATURE_CRYPTO)) { l_test_add("EAPoL/8021x EAP-TLS & 4-Way Handshake", &eapol_sm_test_eap_tls, NULL);