diff --git a/bin/tests/system/Makefile.am b/bin/tests/system/Makefile.am index 3998b0d6f7..380ad49d8e 100644 --- a/bin/tests/system/Makefile.am +++ b/bin/tests/system/Makefile.am @@ -34,7 +34,8 @@ check_PROGRAMS = \ feature_test_CPPFLAGS = \ $(AM_CPPFLAGS) \ - $(LIBDNS_CFLAGS) + $(LIBDNS_CFLAGS) \ + $(OPENSSL_CFLAGS) feature_test_LDADD = \ $(LDADD) \ diff --git a/bin/tests/system/feature-test.c b/bin/tests/system/feature-test.c index 82a7269f36..647db428a3 100644 --- a/bin/tests/system/feature-test.c +++ b/bin/tests/system/feature-test.c @@ -17,6 +17,8 @@ #include #include +#include + #include #include #include @@ -34,6 +36,7 @@ usage(void) { fprintf(stderr, "\t--enable-querytrace\n"); fprintf(stderr, "\t--gethostname\n"); fprintf(stderr, "\t--gssapi\n"); + fprintf(stderr, "\t--have-fips-dh\n"); fprintf(stderr, "\t--have-fips-mode\n"); fprintf(stderr, "\t--have-geoip2\n"); fprintf(stderr, "\t--have-json-c\n"); @@ -109,6 +112,25 @@ main(int argc, char **argv) { #endif /* HAVE_GSSAPI */ } + if (strcmp(argv[1], "--have-fips-dh") == 0) { +#if defined(ENABLE_FIPS_MODE) +#if OPENSSL_VERSION_NUMBER >= 0x30000000L + return (0); +#else + return (1); +#endif +#else + if (isc_fips_mode()) { +#if OPENSSL_VERSION_NUMBER >= 0x30000000L + return (0); +#else + return (1); +#endif + } + return (0); +#endif + } + if (strcmp(argv[1], "--have-fips-mode") == 0) { #if defined(ENABLE_FIPS_MODE) return (0);