diff --git a/bin/check/Makefile.in b/bin/check/Makefile.in index e47a913538..1f527b4ac6 100644 --- a/bin/check/Makefile.in +++ b/bin/check/Makefile.in @@ -18,7 +18,7 @@ VERSION=@BIND9_VERSION@ CINCLUDES = ${NS_INCLUDES} ${BIND9_INCLUDES} ${DNS_INCLUDES} ${ISCCFG_INCLUDES} \ ${ISC_INCLUDES} @DST_OPENSSL_INC@ -CDEFINES = @CRYPTO@ -DNAMED_CONFFILE=\"${sysconfdir}/named.conf\" +CDEFINES = -DNAMED_CONFFILE=\"${sysconfdir}/named.conf\" CWARNINGS = DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@ diff --git a/bin/confgen/Makefile.in b/bin/confgen/Makefile.in index 83daebfe4a..d2a6b692b3 100644 --- a/bin/confgen/Makefile.in +++ b/bin/confgen/Makefile.in @@ -22,7 +22,7 @@ VERSION=@BIND9_VERSION@ CINCLUDES = -I${srcdir}/include ${ISC_INCLUDES} ${ISCCC_INCLUDES} \ ${ISCCFG_INCLUDES} ${DNS_INCLUDES} ${BIND9_INCLUDES} -CDEFINES = @CRYPTO@ +CDEFINES = CWARNINGS = ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@ diff --git a/bin/confgen/ddns-confgen.c b/bin/confgen/ddns-confgen.c index bf8664dafa..7571ab2ba7 100644 --- a/bin/confgen/ddns-confgen.c +++ b/bin/confgen/ddns-confgen.c @@ -36,7 +36,7 @@ #include #include -#ifdef PKCS11CRYPTO +#if HAVE_PKCS11 #include #endif @@ -102,7 +102,7 @@ main(int argc, char **argv) { int len = 0; int ch; -#ifdef PKCS11CRYPTO +#if HAVE_PKCS11 pk11_result_register(); #endif dns_result_register(); diff --git a/bin/confgen/unix/Makefile.in b/bin/confgen/unix/Makefile.in index af1452dbb3..64e3cb8bb5 100644 --- a/bin/confgen/unix/Makefile.in +++ b/bin/confgen/unix/Makefile.in @@ -16,7 +16,7 @@ top_srcdir = @top_srcdir@ CINCLUDES = -I${srcdir}/include -I${srcdir}/../include \ ${DNS_INCLUDES} ${ISC_INCLUDES} -CDEFINES = @CRYPTO@ +CDEFINES = CWARNINGS = OBJS = os.@O@ diff --git a/bin/delv/Makefile.in b/bin/delv/Makefile.in index 26512dede3..34adffdf69 100644 --- a/bin/delv/Makefile.in +++ b/bin/delv/Makefile.in @@ -18,7 +18,7 @@ VERSION=@BIND9_VERSION@ CINCLUDES = -I${srcdir}/include ${DNS_INCLUDES} ${ISC_INCLUDES} \ ${IRS_INCLUDES} ${ISCCFG_INCLUDES} @DST_OPENSSL_INC@ -CDEFINES = @CRYPTO@ -DVERSION=\"${VERSION}\" \ +CDEFINES = -DVERSION=\"${VERSION}\" \ -DSYSCONFDIR=\"${sysconfdir}\" CWARNINGS = diff --git a/bin/dig/Makefile.in b/bin/dig/Makefile.in index 0ddd9b0f7a..69d540ffe8 100644 --- a/bin/dig/Makefile.in +++ b/bin/dig/Makefile.in @@ -21,7 +21,7 @@ CINCLUDES = -I${srcdir}/include ${DNS_INCLUDES} \ ${BIND9_INCLUDES} ${ISC_INCLUDES} \ ${IRS_INCLUDES} ${ISCCFG_INCLUDES} @LIBIDN2_CFLAGS@ @DST_OPENSSL_INC@ -CDEFINES = -DVERSION=\"${VERSION}\" @CRYPTO@ +CDEFINES = -DVERSION=\"${VERSION}\" CWARNINGS = ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@ diff --git a/bin/dig/dighost.c b/bin/dig/dighost.c index ef8ceb6c1e..e980bd3c88 100644 --- a/bin/dig/dighost.c +++ b/bin/dig/dighost.c @@ -86,7 +86,7 @@ #include -#ifdef PKCS11CRYPTO +#if HAVE_PKCS11 #include #endif @@ -1340,7 +1340,7 @@ setup_libs(void) { debug("setup_libs()"); -#ifdef PKCS11CRYPTO +#if HAVE_PKCS11 pk11_result_register(); #endif dns_result_register(); diff --git a/bin/dnssec/Makefile.in b/bin/dnssec/Makefile.in index afdb717c6c..84cb2a9b8f 100644 --- a/bin/dnssec/Makefile.in +++ b/bin/dnssec/Makefile.in @@ -18,7 +18,7 @@ VERSION=@BIND9_VERSION@ CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES} @DST_OPENSSL_INC@ CDEFINES = -DVERSION=\"${VERSION}\" @USE_PKCS11@ @PKCS11_ENGINE@ \ - @CRYPTO@ -DPK11_LIB_LOCATION=\"@PKCS11_PROVIDER@\" + -DPK11_LIB_LOCATION=\"@PKCS11_PROVIDER@\" CWARNINGS = DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@ diff --git a/bin/dnssec/dnssec-cds.c b/bin/dnssec/dnssec-cds.c index ed111d423c..dc825d8eda 100644 --- a/bin/dnssec/dnssec-cds.c +++ b/bin/dnssec/dnssec-cds.c @@ -53,7 +53,7 @@ #include -#ifdef PKCS11CRYPTO +#if HAVE_PKCS11 #include #endif @@ -1147,7 +1147,7 @@ main(int argc, char *argv[]) { fatal("out of memory"); } -#ifdef PKCS11CRYPTO +#if HAVE_PKCS11 pk11_result_register(); #endif dns_result_register(); diff --git a/bin/dnssec/dnssec-dsfromkey.c b/bin/dnssec/dnssec-dsfromkey.c index 026a1a5309..36165f586b 100644 --- a/bin/dnssec/dnssec-dsfromkey.c +++ b/bin/dnssec/dnssec-dsfromkey.c @@ -41,7 +41,7 @@ #include -#ifdef PKCS11CRYPTO +#if HAVE_PKCS11 #include #endif @@ -370,7 +370,7 @@ main(int argc, char **argv) { if (result != ISC_R_SUCCESS) fatal("out of memory"); -#ifdef PKCS11CRYPTO +#if HAVE_PKCS11 pk11_result_register(); #endif dns_result_register(); diff --git a/bin/dnssec/dnssec-importkey.c b/bin/dnssec/dnssec-importkey.c index 1920e070b4..c0d1c9acc5 100644 --- a/bin/dnssec/dnssec-importkey.c +++ b/bin/dnssec/dnssec-importkey.c @@ -41,7 +41,7 @@ #include -#ifdef PKCS11CRYPTO +#if HAVE_PKCS11 #include #endif @@ -310,7 +310,7 @@ main(int argc, char **argv) { if (result != ISC_R_SUCCESS) fatal("out of memory"); -#ifdef PKCS11CRYPTO +#if HAVE_PKCS11 pk11_result_register(); #endif dns_result_register(); diff --git a/bin/dnssec/dnssec-keyfromlabel.c b/bin/dnssec/dnssec-keyfromlabel.c index 0977a0cad1..2dc104ab30 100644 --- a/bin/dnssec/dnssec-keyfromlabel.c +++ b/bin/dnssec/dnssec-keyfromlabel.c @@ -37,7 +37,7 @@ #include -#ifdef PKCS11CRYPTO +#if HAVE_PKCS11 #include #endif @@ -69,7 +69,7 @@ usage(void) { fprintf(stderr, " -3: use NSEC3-capable algorithm\n"); fprintf(stderr, " -c class (default: IN)\n"); fprintf(stderr, " -E :\n"); -#if defined(PKCS11CRYPTO) +#if HAVE_PKCS11 fprintf(stderr, " path to PKCS#11 provider library " "(default is %s)\n", PK11_LIB_LOCATION); #elif defined(USE_PKCS11) @@ -173,7 +173,7 @@ main(int argc, char **argv) { RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS); -#ifdef PKCS11CRYPTO +#if HAVE_PKCS11 pk11_result_register(); #endif dns_result_register(); @@ -607,7 +607,7 @@ main(int argc, char **argv) { /* associate the key */ ret = dst_key_fromlabel(name, alg, flags, protocol, rdclass, -#ifdef PKCS11CRYPTO +#if HAVE_PKCS11 "pkcs11", #else engine, diff --git a/bin/dnssec/dnssec-keygen.c b/bin/dnssec/dnssec-keygen.c index 935e1e4a86..9a3a919770 100644 --- a/bin/dnssec/dnssec-keygen.c +++ b/bin/dnssec/dnssec-keygen.c @@ -52,7 +52,7 @@ #include -#ifdef PKCS11CRYPTO +#if HAVE_PKCS11 #include #endif @@ -106,7 +106,7 @@ usage(void) { fprintf(stderr, " -c : (default: IN)\n"); fprintf(stderr, " -d (0 => max, default)\n"); fprintf(stderr, " -E :\n"); -#if defined(PKCS11CRYPTO) +#if HAVE_PKCS11 fprintf(stderr, " path to PKCS#11 provider library " "(default is %s)\n", PK11_LIB_LOCATION); #elif defined(USE_PKCS11) @@ -247,7 +247,7 @@ main(int argc, char **argv) { if (argc == 1) usage(); -#ifdef PKCS11CRYPTO +#if HAVE_PKCS11 pk11_result_register(); #endif dns_result_register(); diff --git a/bin/dnssec/dnssec-revoke.c b/bin/dnssec/dnssec-revoke.c index 99954dad0b..170dd04b9a 100644 --- a/bin/dnssec/dnssec-revoke.c +++ b/bin/dnssec/dnssec-revoke.c @@ -30,7 +30,7 @@ #include -#ifdef PKCS11CRYPTO +#if HAVE_PKCS11 #include #endif @@ -49,7 +49,7 @@ usage(void) { fprintf(stderr, "Usage:\n"); fprintf(stderr, " %s [options] keyfile\n\n", program); fprintf(stderr, "Version: %s\n", VERSION); -#if defined(PKCS11CRYPTO) +#if HAVE_PKCS11 fprintf(stderr, " -E engine: specify PKCS#11 provider " "(default: %s)\n", PK11_LIB_LOCATION); #elif defined(USE_PKCS11) @@ -100,7 +100,7 @@ main(int argc, char **argv) { if (result != ISC_R_SUCCESS) fatal("Out of memory"); -#ifdef PKCS11CRYPTO +#if HAVE_PKCS11 pk11_result_register(); #endif dns_result_register(); diff --git a/bin/dnssec/dnssec-settime.c b/bin/dnssec/dnssec-settime.c index e2fcc41227..d521662622 100644 --- a/bin/dnssec/dnssec-settime.c +++ b/bin/dnssec/dnssec-settime.c @@ -33,7 +33,7 @@ #include -#ifdef PKCS11CRYPTO +#if HAVE_PKCS11 #include #endif @@ -53,7 +53,7 @@ usage(void) { fprintf(stderr, " %s [options] keyfile\n\n", program); fprintf(stderr, "Version: %s\n", VERSION); fprintf(stderr, "General options:\n"); -#if defined(PKCS11CRYPTO) +#if HAVE_PKCS11 fprintf(stderr, " -E engine: specify PKCS#11 provider " "(default: %s)\n", PK11_LIB_LOCATION); #elif defined(USE_PKCS11) @@ -178,7 +178,7 @@ main(int argc, char **argv) { setup_logging(mctx, &log); -#ifdef PKCS11CRYPTO +#if HAVE_PKCS11 pk11_result_register(); #endif dns_result_register(); diff --git a/bin/dnssec/dnssec-signzone.c b/bin/dnssec/dnssec-signzone.c index 4ce8e9c983..e22e6d391b 100644 --- a/bin/dnssec/dnssec-signzone.c +++ b/bin/dnssec/dnssec-signzone.c @@ -79,7 +79,7 @@ #include -#ifdef PKCS11CRYPTO +#if HAVE_PKCS11 #include #endif @@ -3057,7 +3057,7 @@ usage(void) { fprintf(stderr, "verify generated signatures\n"); fprintf(stderr, "\t-c class (IN)\n"); fprintf(stderr, "\t-E engine:\n"); -#if defined(PKCS11CRYPTO) +#if HAVE_PKCS11 fprintf(stderr, "\t\tpath to PKCS#11 provider library " "(default is %s)\n", PK11_LIB_LOCATION); #elif defined(USE_PKCS11) @@ -3212,7 +3212,7 @@ main(int argc, char *argv[]) { if (result != ISC_R_SUCCESS) fatal("out of memory"); -#ifdef PKCS11CRYPTO +#if HAVE_PKCS11 pk11_result_register(); #endif dns_result_register(); diff --git a/bin/dnssec/dnssec-verify.c b/bin/dnssec/dnssec-verify.c index b4a3339c0a..09e8e30c2d 100644 --- a/bin/dnssec/dnssec-verify.c +++ b/bin/dnssec/dnssec-verify.c @@ -61,7 +61,7 @@ #include -#ifdef PKCS11CRYPTO +#if HAVE_PKCS11 #include #endif @@ -149,7 +149,7 @@ usage(void) { fprintf(stderr, "\t\tfile format of input zonefile (text)\n"); fprintf(stderr, "\t-c class (IN)\n"); fprintf(stderr, "\t-E engine:\n"); -#if defined(PKCS11CRYPTO) +#if HAVE_PKCS11 fprintf(stderr, "\t\tpath to PKCS#11 provider library " "(default is %s)\n", PK11_LIB_LOCATION); #elif defined(USE_PKCS11) @@ -211,7 +211,7 @@ main(int argc, char *argv[]) { if (result != ISC_R_SUCCESS) fatal("out of memory"); -#ifdef PKCS11CRYPTO +#if HAVE_PKCS11 pk11_result_register(); #endif dns_result_register(); diff --git a/bin/named/Makefile.in b/bin/named/Makefile.in index db8e5464ef..f48e74928a 100644 --- a/bin/named/Makefile.in +++ b/bin/named/Makefile.in @@ -48,7 +48,7 @@ CINCLUDES = -I${srcdir}/include -I${srcdir}/unix/include -I. \ ${ISC_INCLUDES} ${DLZDRIVER_INCLUDES} \ ${DBDRIVER_INCLUDES} @DST_OPENSSL_INC@ -CDEFINES = @CONTRIB_DLZ@ @USE_PKCS11@ @PKCS11_ENGINE@ @CRYPTO@ +CDEFINES = @CONTRIB_DLZ@ @USE_PKCS11@ @PKCS11_ENGINE@ CWARNINGS = diff --git a/bin/named/main.c b/bin/named/main.c index 21c4f5e4e2..a5f2c6d644 100644 --- a/bin/named/main.c +++ b/bin/named/main.c @@ -44,7 +44,7 @@ #include #include -#ifdef PKCS11CRYPTO +#if HAVE_PKCS11 #include #endif @@ -75,7 +75,7 @@ #include #endif -#ifdef OPENSSL +#if HAVE_OPENSSL #include #include #endif @@ -693,7 +693,7 @@ parse_command_line(int argc, char *argv[]) { #ifdef __SUNPRO_C printf("compiled by Solaris Studio %x\n", __SUNPRO_C); #endif -#ifdef OPENSSL +#if HAVE_OPENSSL printf("compiled with OpenSSL version: %s\n", OPENSSL_VERSION_TEXT); #if !defined(LIBRESSL_VERSION_NUMBER) && \ @@ -1279,7 +1279,7 @@ main(int argc, char *argv[]) { dns_result_register(); dst_result_register(); isccc_result_register(); -#ifdef PKCS11CRYPTO +#if HAVE_PKCS11 pk11_result_register(); #endif diff --git a/bin/named/unix/Makefile.in b/bin/named/unix/Makefile.in index 30075e611b..08d9dcd053 100644 --- a/bin/named/unix/Makefile.in +++ b/bin/named/unix/Makefile.in @@ -17,7 +17,7 @@ CINCLUDES = -I${srcdir}/include -I${srcdir}/../include \ ${ISCCFG_INCLUDES} ${ISCCC_INCLUDES} \ ${DNS_INCLUDES} ${ISC_INCLUDES} @DST_OPENSSL_INC@ -CDEFINES = @CRYPTO@ +CDEFINES = CWARNINGS = OBJS = os.@O@ dlz_dlopen_driver.@O@ diff --git a/bin/nsupdate/Makefile.in b/bin/nsupdate/Makefile.in index 81cdb1c5fe..60d0600c85 100644 --- a/bin/nsupdate/Makefile.in +++ b/bin/nsupdate/Makefile.in @@ -23,7 +23,7 @@ CINCLUDES = ${DNS_INCLUDES} ${BIND9_INCLUDES} ${ISC_INCLUDES} \ ${ISCCFG_INCLUDES} ${IRS_INCLUDES} ${DST_GSSAPI_INC} \ @DST_OPENSSL_INC@ -CDEFINES = -DVERSION=\"${VERSION}\" @CRYPTO@ @USE_GSSAPI@ +CDEFINES = -DVERSION=\"${VERSION}\" @USE_GSSAPI@ CWARNINGS = DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@ diff --git a/bin/pkcs11/Makefile.in b/bin/pkcs11/Makefile.in index e932518943..d33fc2094a 100644 --- a/bin/pkcs11/Makefile.in +++ b/bin/pkcs11/Makefile.in @@ -15,7 +15,7 @@ top_srcdir = @top_srcdir@ CINCLUDES = ${ISC_INCLUDES} -CDEFINES = @CRYPTO@ +CDEFINES = ISCLIBS = ../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@ diff --git a/bin/rndc/Makefile.in b/bin/rndc/Makefile.in index 51983483a9..ba68e781f8 100644 --- a/bin/rndc/Makefile.in +++ b/bin/rndc/Makefile.in @@ -18,7 +18,7 @@ VERSION=@BIND9_VERSION@ CINCLUDES = -I${srcdir}/include ${ISC_INCLUDES} ${ISCCC_INCLUDES} \ ${ISCCFG_INCLUDES} ${DNS_INCLUDES} ${BIND9_INCLUDES} -CDEFINES = @CRYPTO@ +CDEFINES = CWARNINGS = ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@ diff --git a/bin/tests/Makefile.in b/bin/tests/Makefile.in index cf2e1bf0d4..dd22d4e911 100644 --- a/bin/tests/Makefile.in +++ b/bin/tests/Makefile.in @@ -16,7 +16,7 @@ top_srcdir = @top_srcdir@ CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES} ${ISCCFG_INCLUDES} \ @DST_OPENSSL_INC@ -CDEFINES = @CRYPTO@ +CDEFINES = CWARNINGS = BACKTRACECFLAGS = @BACKTRACECFLAGS@ diff --git a/bin/tests/optional/Makefile.in b/bin/tests/optional/Makefile.in index c0736eb17f..ca0616b889 100644 --- a/bin/tests/optional/Makefile.in +++ b/bin/tests/optional/Makefile.in @@ -16,7 +16,7 @@ top_srcdir = @top_srcdir@ CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES} ${ISCCFG_INCLUDES} \ @DST_OPENSSL_INC@ @DST_GSSAPI_INC@ -CDEFINES = @CRYPTO@ @USE_GSSAPI@ +CDEFINES = @USE_GSSAPI@ CWARNINGS = BACKTRACECFLAGS = @BACKTRACECFLAGS@ diff --git a/bin/tests/pkcs11/Makefile.in b/bin/tests/pkcs11/Makefile.in index 29b1f3f0c7..73e0596705 100644 --- a/bin/tests/pkcs11/Makefile.in +++ b/bin/tests/pkcs11/Makefile.in @@ -17,7 +17,7 @@ PROVIDER = @PKCS11_PROVIDER@ CINCLUDES = ${ISC_INCLUDES} -CDEFINES = -DPK11_LIB_LOCATION=\"${PROVIDER}\" @CRYPTO@ +CDEFINES = -DPK11_LIB_LOCATION=\"${PROVIDER}\" ISCLIBS = ../../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@ diff --git a/bin/tests/pkcs11/benchmarks/Makefile.in b/bin/tests/pkcs11/benchmarks/Makefile.in index 3ee3821eec..15f5460044 100644 --- a/bin/tests/pkcs11/benchmarks/Makefile.in +++ b/bin/tests/pkcs11/benchmarks/Makefile.in @@ -17,7 +17,7 @@ PROVIDER = @PKCS11_PROVIDER@ CINCLUDES = ${ISC_INCLUDES} -CDEFINES = -DPK11_LIB_LOCATION=\"${PROVIDER}\" @CRYPTO@ +CDEFINES = -DPK11_LIB_LOCATION=\"${PROVIDER}\" ISCLIBS = ../../../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@ diff --git a/bin/tests/system/Makefile.in b/bin/tests/system/Makefile.in index d40917fab7..a552f4667e 100644 --- a/bin/tests/system/Makefile.in +++ b/bin/tests/system/Makefile.in @@ -19,7 +19,7 @@ SUBDIRS = dlzexternal dyndb pipelined rndc rpz rsabigexponent tkey CINCLUDES = ${ISC_INCLUDES} ${DNS_INCLUDES} -CDEFINES = @USE_GSSAPI@ @CRYPTO@ +CDEFINES = @USE_GSSAPI@ CWARNINGS = DNSLIBS = diff --git a/bin/tests/system/dlzexternal/Makefile.in b/bin/tests/system/dlzexternal/Makefile.in index dd04bd7d6a..db402cbe5d 100644 --- a/bin/tests/system/dlzexternal/Makefile.in +++ b/bin/tests/system/dlzexternal/Makefile.in @@ -16,7 +16,7 @@ VERSION=@BIND9_VERSION@ @BIND9_MAKE_INCLUDES@ CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES} @DST_OPENSSL_INC@ -CDEFINES = @CRYPTO@ +CDEFINES = CWARNINGS = LIBS = @LIBS@ diff --git a/bin/tests/system/dyndb/driver/Makefile.in b/bin/tests/system/dyndb/driver/Makefile.in index c23e664302..b48f9017ce 100644 --- a/bin/tests/system/dyndb/driver/Makefile.in +++ b/bin/tests/system/dyndb/driver/Makefile.in @@ -15,7 +15,7 @@ top_srcdir = @top_srcdir@ CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES} @DST_OPENSSL_INC@ -CDEFINES = @CRYPTO@ +CDEFINES = CWARNINGS = DNSLIBS = ../../../../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@ diff --git a/bin/tests/system/pipelined/Makefile.in b/bin/tests/system/pipelined/Makefile.in index f140d525db..5392b2956e 100644 --- a/bin/tests/system/pipelined/Makefile.in +++ b/bin/tests/system/pipelined/Makefile.in @@ -17,7 +17,7 @@ VERSION=@BIND9_VERSION@ CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES} @DST_OPENSSL_INC@ -CDEFINES = @CRYPTO@ +CDEFINES = CWARNINGS = DNSLIBS = ../../../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@ diff --git a/bin/tests/system/rndc/Makefile.in b/bin/tests/system/rndc/Makefile.in index 000958b21f..999c1e6e9f 100644 --- a/bin/tests/system/rndc/Makefile.in +++ b/bin/tests/system/rndc/Makefile.in @@ -17,7 +17,7 @@ VERSION=@BIND9_VERSION@ CINCLUDES = ${ISC_INCLUDES} -CDEFINES = @CRYPTO@ +CDEFINES = CWARNINGS = ISCLIBS = ../../../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@ diff --git a/bin/tests/system/rpz/Makefile.in b/bin/tests/system/rpz/Makefile.in index f44619dfc2..9ec63448cd 100644 --- a/bin/tests/system/rpz/Makefile.in +++ b/bin/tests/system/rpz/Makefile.in @@ -17,7 +17,7 @@ VERSION=@BIND9_VERSION@ CINCLUDES = ${ISC_INCLUDES} ${DNS_INCLUDES} -CDEFINES = @CRYPTO@ +CDEFINES = CWARNINGS = DNSLIBS = diff --git a/bin/tests/system/rsabigexponent/Makefile.in b/bin/tests/system/rsabigexponent/Makefile.in index 817522e6a7..378f48a56f 100644 --- a/bin/tests/system/rsabigexponent/Makefile.in +++ b/bin/tests/system/rsabigexponent/Makefile.in @@ -17,7 +17,7 @@ VERSION=@BIND9_VERSION@ CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES} @DST_OPENSSL_INC@ -CDEFINES = @CRYPTO@ +CDEFINES = CWARNINGS = DNSLIBS = ../../../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@ diff --git a/bin/tests/system/rsabigexponent/bigkey.c b/bin/tests/system/rsabigexponent/bigkey.c index 4f7ea74fad..9a0a4f2a65 100644 --- a/bin/tests/system/rsabigexponent/bigkey.c +++ b/bin/tests/system/rsabigexponent/bigkey.c @@ -12,8 +12,6 @@ #include -#if defined(OPENSSL) || defined(PKCS11CRYPTO) - #include #include @@ -40,7 +38,7 @@ #include #include -#if !defined(OPENSSL) +#if !HAVE_OPENSSL /* * Use a fixed key file pair if compiled without OpenSSL. @@ -105,7 +103,7 @@ main(int argc, char **argv) { return(0); } -#else +#else /* !HAVE_OPENSSL */ #include #include #include @@ -220,20 +218,4 @@ main(int argc, char **argv) { } #endif -#else /* OPENSSL || PKCS11CRYPTO */ - -#include -#include - -#include - -int -main(int argc, char **argv) { - UNUSED(argc); - UNUSED(argv); - fprintf(stderr, "Compiled without Crypto\n"); - exit(1); -} - -#endif /* OPENSSL || PKCS11CRYPTO */ /*! \file */ diff --git a/bin/tests/system/tkey/Makefile.in b/bin/tests/system/tkey/Makefile.in index 8a5dc7e086..750a7ffc37 100644 --- a/bin/tests/system/tkey/Makefile.in +++ b/bin/tests/system/tkey/Makefile.in @@ -17,7 +17,7 @@ VERSION=@BIND9_VERSION@ CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES} @DST_OPENSSL_INC@ -CDEFINES = @CRYPTO@ +CDEFINES = CWARNINGS = DNSLIBS = ../../../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@ diff --git a/bin/tests/virtual-time/vtwrapper.c b/bin/tests/virtual-time/vtwrapper.c index 36471f2ef0..123805d068 100644 --- a/bin/tests/virtual-time/vtwrapper.c +++ b/bin/tests/virtual-time/vtwrapper.c @@ -9,6 +9,7 @@ * information regarding copyright ownership. */ +#include #define _GNU_SOURCE #include diff --git a/bin/tools/Makefile.in b/bin/tools/Makefile.in index 8617592838..3ca94f5393 100644 --- a/bin/tools/Makefile.in +++ b/bin/tools/Makefile.in @@ -18,7 +18,7 @@ VERSION=@BIND9_VERSION@ CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES} ${ISCCFG_INCLUDES} \ ${BIND9_INCLUDES} @DST_OPENSSL_INC@ -CDEFINES = @CRYPTO@ -DVERSION=\"${VERSION}\" +CDEFINES = -DVERSION=\"${VERSION}\" CWARNINGS = DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@ diff --git a/bin/win32/BINDInstall/BINDInstallDlg.cpp b/bin/win32/BINDInstall/BINDInstallDlg.cpp index 8f91f556d5..48a33fcb5e 100644 --- a/bin/win32/BINDInstall/BINDInstallDlg.cpp +++ b/bin/win32/BINDInstall/BINDInstallDlg.cpp @@ -137,7 +137,7 @@ const FileData installFiles[] = {"libisccc.dll", FileData::BinDir, FileData::Critical, FALSE, TRUE}, {"libdns.dll", FileData::BinDir, FileData::Critical, FALSE, TRUE}, {"libirs.dll", FileData::BinDir, FileData::Critical, FALSE, TRUE}, -#ifdef OPENSSL +#if HAVE_OPENSSL {"libeay32.dll", FileData::BinDir, FileData::Critical, FALSE, TRUE}, #endif #ifdef HAVE_LIBXML2 diff --git a/config.h.in b/config.h.in index 5590de4e4f..69e3c1fd31 100644 --- a/config.h.in +++ b/config.h.in @@ -377,6 +377,9 @@ int sigwait(const unsigned int *set, int *sig); /* Define to 1 if you have the header file. */ #undef HAVE_NET_ROUTE_H +/* Define if OpenSSL is used as cryptographic library provider. */ +#undef HAVE_OPENSSL + /* Define if your OpenSSL version supports AES */ #undef HAVE_OPENSSL_AES @@ -395,6 +398,9 @@ int sigwait(const unsigned int *set, int *sig); /* Define if your OpenSSL version supports GOST. */ #undef HAVE_OPENSSL_GOST +/* Define if native PKCS#11 is used as cryptographic library provider */ +#undef HAVE_PKCS11 + /* Define if your PKCS11 provider supports ECDSA. */ #undef HAVE_PKCS11_ECDSA diff --git a/config.h.win32 b/config.h.win32 index 10f91bc6e6..4356a1a199 100644 --- a/config.h.win32 +++ b/config.h.win32 @@ -330,6 +330,9 @@ typedef __int64 off_t; /* Define if your OpenSSL version supports GOST. */ @HAVE_OPENSSL_GOST@ +/* Define if native PKCS#11 is used as cryptographic library provider */ +@HAVE_PKCS11@ + /* Define if your PKCS11 provider supports ECDSA. */ @HAVE_PKCS11_ECDSA@ @@ -345,6 +348,9 @@ typedef __int64 off_t; /* Define if GOST private keys are encoded in ASN.1. */ @PREFER_GOSTASN1@ +/* Define if OpenSSL is used as cryptographic library provider. */ +@HAVE_OPENSSL@ + /* Define if your OpenSSL version supports EVP AES */ @HAVE_OPENSSL_EVP_AES@ diff --git a/configure b/configure index 3e345c0286..28840a8a9c 100755 --- a/configure +++ b/configure @@ -801,7 +801,6 @@ PKCS11_TEST PKCS11_ED25519 PKCS11_GOST PKCS11_ECDSA -CRYPTO PKCS11LINKSRCS PKCS11LINKOBJS PKCS11_PROVIDER @@ -16174,7 +16173,7 @@ case "$use_openssl" in { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled because of native PKCS11" >&5 $as_echo "disabled because of native PKCS11" >&6; } DST_OPENSSL_INC="" - CRYPTO="-DPKCS11CRYPTO" + CRYPTO="PKCS11" CRYPTOLIB="pkcs11" OPENSSLECDSALINKOBJS="" OPENSSLECDSALINKSRCS="" @@ -16184,6 +16183,9 @@ $as_echo "disabled because of native PKCS11" >&6; } OPENSSLGOSTLINKSRCS="" OPENSSLLINKOBJS="" OPENSSLLINKSRCS="" + +$as_echo "#define HAVE_PKCS11 1" >>confdefs.h + ;; no) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -16243,7 +16245,7 @@ $as_echo "not found" >&6; } then as_fn_error $? "\"$use_openssl/include/openssl/opensslv.h\" not found" "$LINENO" 5 fi - CRYPTO='-DOPENSSL' + CRYPTO='OPENSSL' CRYPTOLIB="openssl" if test "/usr" = "$use_openssl" then @@ -16287,6 +16289,8 @@ $as_echo "using OpenSSL from $use_openssl/lib and $use_openssl/include" >&6; } CFLAGS="$DST_OPENSSL_INC $CFLAGS" LIBS="$DST_OPENSSL_LIBS $LIBS" +$as_echo "#define HAVE_OPENSSL 1" >>confdefs.h + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL >= 1.0.0 or LibreSSL" >&5 $as_echo_n "checking for OpenSSL >= 1.0.0 or LibreSSL... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -16928,7 +16932,7 @@ $as_echo_n "checking for using OpenSSL for hash functions... " >&6; } ISC_PLATFORM_OPENSSLHASH="#undef ISC_PLATFORM_OPENSSLHASH" if test "whenossl" = "$want_openssl_hash" then - if test "X$CRYPTO" = "X-DOPENSSL" + if test "$CRYPTO" = "OPENSSL" then want_openssl_hash="yes" else @@ -16937,7 +16941,7 @@ then fi case $want_openssl_hash in yes) - if test "X$CRYPTO" != "X-DOPENSSL" + if test "$CRYPTO" != "OPENSSL" then as_fn_error $? "No OpenSSL for hash functions" "$LINENO" 5 fi @@ -16999,7 +17003,7 @@ $as_echo "yes" >&6; } if ! $use_threads; then as_fn_error $? "PKCS11 requires thread support" "$LINENO" 5 fi - if test "X$CRYPTO" = "X-DOPENSSL" + if test "$CRYPTO" = "OPENSSL" then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL with PKCS11 support" >&5 $as_echo_n "checking for OpenSSL with PKCS11 support... " >&6; } @@ -17245,7 +17249,6 @@ esac - if test "X$CRYPTO" = "X"; then # cat << \EOF as_fn_error $? "No cryptography library has been found or provided. diff --git a/configure.in b/configure.in index 88f28f4c68..9594c01630 100644 --- a/configure.in +++ b/configure.in @@ -1471,7 +1471,7 @@ case "$use_openssl" in native_pkcs11) AC_MSG_RESULT(disabled because of native PKCS11) DST_OPENSSL_INC="" - CRYPTO="-DPKCS11CRYPTO" + CRYPTO="PKCS11" CRYPTOLIB="pkcs11" OPENSSLECDSALINKOBJS="" OPENSSLECDSALINKSRCS="" @@ -1481,6 +1481,7 @@ case "$use_openssl" in OPENSSLGOSTLINKSRCS="" OPENSSLLINKOBJS="" OPENSSLLINKSRCS="" + AC_DEFINE([HAVE_PKCS11],[1],[Define if native PKCS#11 is used as cryptographic library provider]) ;; no) AC_MSG_RESULT(no) @@ -1539,7 +1540,7 @@ If you do not want OpenSSL, use --without-openssl]) then AC_MSG_ERROR(["$use_openssl/include/openssl/opensslv.h" not found]) fi - CRYPTO='-DOPENSSL' + CRYPTO='OPENSSL' CRYPTOLIB="openssl" if test "/usr" = "$use_openssl" then @@ -1581,7 +1582,7 @@ If you do not want OpenSSL, use --without-openssl]) saved_libs="$LIBS" CFLAGS="$DST_OPENSSL_INC $CFLAGS" LIBS="$DST_OPENSSL_LIBS $LIBS" - + AC_DEFINE([HAVE_OPENSSL],[1],[Define if OpenSSL is used as cryptographic library provider.]) AC_MSG_CHECKING(for OpenSSL >= 1.0.0 or LibreSSL) AC_TRY_COMPILE([ #include @@ -2014,7 +2015,7 @@ AC_MSG_CHECKING(for using OpenSSL for hash functions) ISC_PLATFORM_OPENSSLHASH="#undef ISC_PLATFORM_OPENSSLHASH" if test "whenossl" = "$want_openssl_hash" then - if test "X$CRYPTO" = "X-DOPENSSL" + if test "$CRYPTO" = "OPENSSL" then want_openssl_hash="yes" else @@ -2023,7 +2024,7 @@ then fi case $want_openssl_hash in yes) - if test "X$CRYPTO" != "X-DOPENSSL" + if test "$CRYPTO" != "OPENSSL" then AC_MSG_ERROR([No OpenSSL for hash functions]) fi @@ -2080,7 +2081,7 @@ case "$use_pkcs11" in if ! $use_threads; then AC_MSG_ERROR([PKCS11 requires thread support]) fi - if test "X$CRYPTO" = "X-DOPENSSL" + if test "$CRYPTO" = "OPENSSL" then AC_MSG_CHECKING(for OpenSSL with PKCS11 support) saved_cc="$CC" @@ -2269,7 +2270,6 @@ esac AC_SUBST(PKCS11LINKOBJS) AC_SUBST(PKCS11LINKSRCS) -AC_SUBST(CRYPTO) AC_SUBST(PKCS11_ECDSA) AC_SUBST(PKCS11_GOST) AC_SUBST(PKCS11_ED25519) diff --git a/contrib/dlz/bin/dlzbdb/Makefile.in b/contrib/dlz/bin/dlzbdb/Makefile.in index 8c9823c97a..abda98d107 100644 --- a/contrib/dlz/bin/dlzbdb/Makefile.in +++ b/contrib/dlz/bin/dlzbdb/Makefile.in @@ -17,7 +17,7 @@ DLZINCLUDES = @DLZ_DRIVER_INCLUDES@ CINCLUDES = -I${srcdir}/include -I${srcdir}/unix/include \ ${ISC_INCLUDES} ${DLZINCLUDES} -CDEFINES = @CONTRIB_DLZ@ @CRYPTO@ +CDEFINES = @CONTRIB_DLZ@ CWARNINGS = DLZLIBS = @DLZ_DRIVER_LIBS@ diff --git a/lib/bind9/Makefile.in b/lib/bind9/Makefile.in index 2a27b7e82e..2019e96d1c 100644 --- a/lib/bind9/Makefile.in +++ b/lib/bind9/Makefile.in @@ -20,7 +20,7 @@ VERSION=@BIND9_VERSION@ CINCLUDES = -I. ${BIND9_INCLUDES} ${DNS_INCLUDES} ${ISC_INCLUDES} \ ${ISCCFG_INCLUDES} @ISC_OPENSSL_INC@ -CDEFINES = @CRYPTO@ +CDEFINES = CWARNINGS = ISCLIBS = ../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@ diff --git a/lib/bind9/version.c b/lib/bind9/version.c index 89003c73db..e365d9a0e9 100644 --- a/lib/bind9/version.c +++ b/lib/bind9/version.c @@ -11,6 +11,7 @@ /*! \file */ +#include #include diff --git a/lib/bind9/win32/DLLMain.c b/lib/bind9/win32/DLLMain.c index 8ff101757d..518039596c 100644 --- a/lib/bind9/win32/DLLMain.c +++ b/lib/bind9/win32/DLLMain.c @@ -9,6 +9,7 @@ * information regarding copyright ownership. */ +#include #include #include diff --git a/lib/bind9/win32/version.c b/lib/bind9/win32/version.c index 68ce9925bb..2838b9d9ee 100644 --- a/lib/bind9/win32/version.c +++ b/lib/bind9/win32/version.c @@ -9,6 +9,7 @@ * information regarding copyright ownership. */ +#include #include diff --git a/lib/dns/Makefile.in b/lib/dns/Makefile.in index ab9428fa4e..313c532474 100644 --- a/lib/dns/Makefile.in +++ b/lib/dns/Makefile.in @@ -29,7 +29,7 @@ USE_ISC_SPNEGO = @USE_ISC_SPNEGO@ CINCLUDES = -I. -I${top_srcdir}/lib/dns -Iinclude ${DNS_INCLUDES} \ ${ISC_INCLUDES} @DST_OPENSSL_INC@ @DST_GSSAPI_INC@ -CDEFINES = -DUSE_MD5 @CRYPTO@ @USE_GSSAPI@ ${USE_ISC_SPNEGO} +CDEFINES = -DUSE_MD5 @USE_GSSAPI@ ${USE_ISC_SPNEGO} CWARNINGS = diff --git a/lib/dns/compress.c b/lib/dns/compress.c index 8352a42652..0a66569ae5 100644 --- a/lib/dns/compress.c +++ b/lib/dns/compress.c @@ -9,12 +9,12 @@ * information regarding copyright ownership. */ +#include + /*! \file */ #define DNS_NAME_USEINLINE 1 -#include - #include #include #include diff --git a/lib/dns/dst_api.c b/lib/dns/dst_api.c index 8f7e075b8d..3192d6f14d 100644 --- a/lib/dns/dst_api.c +++ b/lib/dns/dst_api.c @@ -123,7 +123,7 @@ static isc_result_t addsuffix(char *filename, int len, return (_r); \ } while (0); \ -#if defined(OPENSSL) +#if HAVE_OPENSSL static void * default_memalloc(void *arg, size_t size) { UNUSED(arg); @@ -146,13 +146,11 @@ dst_lib_init(isc_mem_t *mctx, const char *engine) { REQUIRE(mctx != NULL); REQUIRE(dst_initialized == ISC_FALSE); -#if !defined(OPENSSL) && !defined(PKCS11CRYPTO) UNUSED(engine); -#endif dst__memory_pool = NULL; -#if defined(OPENSSL) +#if HAVE_OPENSSL UNUSED(mctx); /* * When using --with-openssl, there seems to be no good way of not @@ -170,9 +168,9 @@ dst_lib_init(isc_mem_t *mctx, const char *engine) { #ifndef OPENSSL_LEAKS isc_mem_setdestroycheck(dst__memory_pool, ISC_FALSE); #endif -#else /* OPENSSL */ +#else /* HAVE_OPENSSL */ isc_mem_attach(mctx, &dst__memory_pool); -#endif /* OPENSSL */ +#endif /* HAVE_OPENSSL */ dst_result_register(); @@ -185,7 +183,7 @@ dst_lib_init(isc_mem_t *mctx, const char *engine) { RETERR(dst__hmacsha256_init(&dst_t_func[DST_ALG_HMACSHA256])); RETERR(dst__hmacsha384_init(&dst_t_func[DST_ALG_HMACSHA384])); RETERR(dst__hmacsha512_init(&dst_t_func[DST_ALG_HMACSHA512])); -#ifdef OPENSSL +#if HAVE_OPENSSL RETERR(dst__openssl_init(engine)); #ifndef PK11_MD5_DISABLE RETERR(dst__opensslrsa_init(&dst_t_func[DST_ALG_RSAMD5], @@ -219,7 +217,7 @@ dst_lib_init(isc_mem_t *mctx, const char *engine) { #ifdef HAVE_OPENSSL_ED448 RETERR(dst__openssleddsa_init(&dst_t_func[DST_ALG_ED448])); #endif -#elif PKCS11CRYPTO +#elif HAVE_PKCS11 RETERR(dst__pkcs11_init(mctx, engine)); #ifndef PK11_MD5_DISABLE RETERR(dst__pkcs11rsa_init(&dst_t_func[DST_ALG_RSAMD5])); @@ -248,14 +246,11 @@ dst_lib_init(isc_mem_t *mctx, const char *engine) { #ifdef HAVE_PKCS11_GOST RETERR(dst__pkcs11gost_init(&dst_t_func[DST_ALG_ECCGOST])); #endif -#endif /* if OPENSSL, elif PKCS11CRYPTO */ +#endif /* if HAVE_OPENSSL, elif HAVE_PKCS11 */ #ifdef GSSAPI RETERR(dst__gssapi_init(&dst_t_func[DST_ALG_GSSAPI])); #endif -#if !defined(OPENSSL) && !defined(PKCS11CRYPTO) -#error Either OpenSSL or PKCS#11 cryptographic provider needed. -#endif /* !defined(OPENSSL) && !defined(PKCS11CRYPTO) */ dst_initialized = ISC_TRUE; return (ISC_R_SUCCESS); @@ -275,13 +270,13 @@ dst_lib_destroy(void) { for (i = 0; i < DST_MAX_ALGS; i++) if (dst_t_func[i] != NULL && dst_t_func[i]->cleanup != NULL) dst_t_func[i]->cleanup(); -#if defined(OPENSSL) || defined(PKCS11CRYPTO) -#ifdef OPENSSL +#if HAVE_OPENSSL dst__openssl_destroy(); -#elif PKCS11CRYPTO +#elif HAVE_PKCS11 (void) dst__pkcs11_destroy(); -#endif /* if OPENSSL, elif PKCS11CRYPTO */ -#endif /* defined(OPENSSL) || defined(PKCS11CRYPTO) */ +#else +#error Either OpenSSL or PKCS#11 cryptographic provider needed. +#endif /* if HAVE_OPENSSL, elif HAVE_PKCS11 */ if (dst__memory_pool != NULL) isc_mem_detach(&dst__memory_pool); } @@ -1880,19 +1875,9 @@ static isc_result_t algorithm_status(unsigned int alg) { REQUIRE(dst_initialized == ISC_TRUE); - if (dst_algorithm_supported(alg)) + if (dst_algorithm_supported(alg)) { return (ISC_R_SUCCESS); -#if !defined(OPENSSL) && !defined(PKCS11CRYPTO) - if (alg == DST_ALG_RSAMD5 || alg == DST_ALG_RSASHA1 || - alg == DST_ALG_DSA || alg == DST_ALG_DH || - alg == DST_ALG_HMACMD5 || alg == DST_ALG_NSEC3DSA || - alg == DST_ALG_NSEC3RSASHA1 || - alg == DST_ALG_RSASHA256 || alg == DST_ALG_RSASHA512 || - alg == DST_ALG_ECCGOST || - alg == DST_ALG_ECDSA256 || alg == DST_ALG_ECDSA384 || - alg == DST_ALG_ED25519 || alg == DST_ALG_ED448) - return (DST_R_NOCRYPTO); -#endif + } return (DST_R_UNSUPPORTEDALG); } diff --git a/lib/dns/dst_internal.h b/lib/dns/dst_internal.h index 732865fdf3..534ae744c5 100644 --- a/lib/dns/dst_internal.h +++ b/lib/dns/dst_internal.h @@ -47,7 +47,7 @@ #include -#ifdef OPENSSL +#if HAVE_OPENSSL #ifndef PK11_DH_DISABLE #include #endif @@ -112,7 +112,7 @@ struct dst_key { union { void *generic; gss_ctx_id_t gssctx; -#ifdef OPENSSL +#if HAVE_OPENSSL #ifndef PK11_DSA_DISABLE DSA *dsa; #endif @@ -120,7 +120,7 @@ struct dst_key { DH *dh; #endif EVP_PKEY *pkey; -#elif PKCS11CRYPTO +#elif HAVE_PKCS11 pk11_object_t *pkey; #endif #ifndef PK11_MD5_DISABLE @@ -172,9 +172,9 @@ struct dst_context { isc_hmacsha256_t *hmacsha256ctx; isc_hmacsha384_t *hmacsha384ctx; isc_hmacsha512_t *hmacsha512ctx; -#ifdef OPENSSL +#if HAVE_OPENSSL EVP_MD_CTX *evp_md_ctx; -#elif PKCS11CRYPTO +#elif HAVE_PKCS11 pk11_context_t *pk11_ctx; #endif } ctxdata; diff --git a/lib/dns/openssl_link.c b/lib/dns/openssl_link.c index 3be7b20353..be36f09836 100644 --- a/lib/dns/openssl_link.c +++ b/lib/dns/openssl_link.c @@ -23,10 +23,10 @@ * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifdef OPENSSL - #include +#if HAVE_OPENSSL + #include #include #include @@ -367,5 +367,5 @@ dst__openssl_getengine(const char *engine) { } #endif -#endif /* OPENSSL */ +#endif /* HAVE_OPENSSL */ /*! \file */ diff --git a/lib/dns/openssldh_link.c b/lib/dns/openssldh_link.c index b86d111dc3..ade77076a1 100644 --- a/lib/dns/openssldh_link.c +++ b/lib/dns/openssldh_link.c @@ -23,10 +23,10 @@ * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifdef OPENSSL - #include +#if HAVE_OPENSSL + #include #ifndef PK11_DH_DISABLE @@ -765,11 +765,11 @@ dst__openssldh_init(dst_func_t **funcp) { } #endif /* !PK11_DH_DISABLE */ -#else /* OPENSSL */ +#else /* HAVE_OPENSSL */ #include EMPTY_TRANSLATION_UNIT -#endif /* OPENSSL */ +#endif /* HAVE_OPENSSL */ /*! \file */ diff --git a/lib/dns/openssldsa_link.c b/lib/dns/openssldsa_link.c index 94279fb58e..cd5a60e82c 100644 --- a/lib/dns/openssldsa_link.c +++ b/lib/dns/openssldsa_link.c @@ -23,10 +23,10 @@ * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifdef OPENSSL - #include +#if HAVE_OPENSSL + #include #ifndef PK11_DSA_DISABLE @@ -689,11 +689,11 @@ dst__openssldsa_init(dst_func_t **funcp) { } #endif /* !PK11_DSA_DISABLE */ -#else /* OPENSSL */ +#else /* HAVE_OPENSSL */ #include EMPTY_TRANSLATION_UNIT -#endif /* OPENSSL */ +#endif /* HAVE_OPENSSL */ /*! \file */ diff --git a/lib/dns/opensslecdsa_link.c b/lib/dns/opensslecdsa_link.c index 53cc9d52e4..1b803044ca 100644 --- a/lib/dns/opensslecdsa_link.c +++ b/lib/dns/opensslecdsa_link.c @@ -11,7 +11,7 @@ #include -#if defined(OPENSSL) && defined(HAVE_OPENSSL_ECDSA) +#if HAVE_OPENSSL && HAVE_OPENSSL_ECDSA #include #include @@ -639,11 +639,11 @@ dst__opensslecdsa_init(dst_func_t **funcp) { return (ISC_R_SUCCESS); } -#else /* HAVE_OPENSSL_ECDSA */ +#else /* HAVE_OPENSSL && HAVE_OPENSSL_ECDSA */ #include EMPTY_TRANSLATION_UNIT -#endif /* HAVE_OPENSSL_ECDSA */ +#endif /* HAVE_OPENSSL && HAVE_OPENSSL_ECDSA */ /*! \file */ diff --git a/lib/dns/openssleddsa_link.c b/lib/dns/openssleddsa_link.c index 3dd08afbc5..be14f4180b 100644 --- a/lib/dns/openssleddsa_link.c +++ b/lib/dns/openssleddsa_link.c @@ -11,8 +11,7 @@ #include -#if defined(OPENSSL) && \ - (defined(HAVE_OPENSSL_ED25519) || defined(HAVE_OPENSSL_ED448)) +#if HAVE_OPENSSL && (HAVE_OPENSSL_ED25519 || HAVE_OPENSSL_ED448) #include #include @@ -663,11 +662,11 @@ dst__openssleddsa_init(dst_func_t **funcp) { return (ISC_R_SUCCESS); } -#else /* HAVE_OPENSSL_EDxxx */ +#else /* HAVE_OPENSSL && (HAVE_OPENSSL_ED25519 || HAVE_OPENSSL_ED448) */ #include EMPTY_TRANSLATION_UNIT -#endif /* HAVE_OPENSSL_EDxxx */ +#endif /* HAVE_OPENSSL && (HAVE_OPENSSL_ED25519 || HAVE_OPENSSL_ED448) */ /*! \file */ diff --git a/lib/dns/opensslgost_link.c b/lib/dns/opensslgost_link.c index 46a660bfdd..847106b815 100644 --- a/lib/dns/opensslgost_link.c +++ b/lib/dns/opensslgost_link.c @@ -11,7 +11,7 @@ #include -#if defined(OPENSSL) && defined(HAVE_OPENSSL_GOST) +#if HAVE_OPENSSL && HAVE_OPENSSL_GOST #include #include @@ -617,11 +617,11 @@ dst__opensslgost_init(dst_func_t **funcp) { return (ret); } -#else /* HAVE_OPENSSL_GOST */ +#else /* HAVE_OPENSSL && HAVE_OPENSSL_GOST */ #include EMPTY_TRANSLATION_UNIT -#endif /* HAVE_OPENSSL_GOST */ +#endif /* HAVE_OPENSSL && HAVE_OPENSSL_GOST */ /*! \file */ diff --git a/lib/dns/opensslrsa_link.c b/lib/dns/opensslrsa_link.c index 37d0362f61..0c7091e86d 100644 --- a/lib/dns/opensslrsa_link.c +++ b/lib/dns/opensslrsa_link.c @@ -9,9 +9,10 @@ * information regarding copyright ownership. */ -#ifdef OPENSSL #include +#if HAVE_OPENSSL + #include #include #include @@ -1188,11 +1189,11 @@ dst__opensslrsa_init(dst_func_t **funcp, unsigned char algorithm) { return (ISC_R_SUCCESS); } -#else /* OPENSSL */ +#else /* HAVE_OPENSSL */ #include EMPTY_TRANSLATION_UNIT -#endif /* OPENSSL */ +#endif /* HAVE_OPENSSL */ /*! \file */ diff --git a/lib/dns/pkcs11.c b/lib/dns/pkcs11.c index 714175356f..c7e0072e0a 100644 --- a/lib/dns/pkcs11.c +++ b/lib/dns/pkcs11.c @@ -9,10 +9,10 @@ * information regarding copyright ownership. */ -#ifdef PKCS11CRYPTO - #include +#if HAVE_PKCS11 + #include #include @@ -37,5 +37,5 @@ dst__pkcs11_toresult(const char *funcname, const char *file, int line, return (fallback); } -#endif /* PKCS11CRYPTO */ +#endif /* HAVE_PKCS11 */ /*! \file */ diff --git a/lib/dns/pkcs11dh_link.c b/lib/dns/pkcs11dh_link.c index c192b53e2f..9a55c06d1f 100644 --- a/lib/dns/pkcs11dh_link.c +++ b/lib/dns/pkcs11dh_link.c @@ -9,10 +9,10 @@ * information regarding copyright ownership. */ -#ifdef PKCS11CRYPTO - #include +#if HAVE_PKCS11 + #include #ifndef PK11_DH_DISABLE @@ -1125,11 +1125,11 @@ dst__pkcs11dh_init(dst_func_t **funcp) { } #endif /* !PK11_DH_DISABLE */ -#else /* PKCS11CRYPTO */ +#else /* HAVE_PKCS11 */ #include EMPTY_TRANSLATION_UNIT -#endif /* PKCS11CRYPTO */ +#endif /* HAVE_PKCS11 */ /*! \file */ diff --git a/lib/dns/pkcs11dsa_link.c b/lib/dns/pkcs11dsa_link.c index 13a96567de..23f383b109 100644 --- a/lib/dns/pkcs11dsa_link.c +++ b/lib/dns/pkcs11dsa_link.c @@ -9,10 +9,10 @@ * information regarding copyright ownership. */ -#ifdef PKCS11CRYPTO - #include +#if HAVE_PKCS11 + #include #ifndef PK11_DSA_DISABLE @@ -1114,11 +1114,11 @@ dst__pkcs11dsa_init(dst_func_t **funcp) { } #endif /* !PK11_DSA_DISABLE */ -#else /* PKCS11CRYPTO */ +#else /* HAVE_PKCS11 */ #include EMPTY_TRANSLATION_UNIT -#endif /* PKCS11CRYPTO */ +#endif /* HAVE_PKCS11 */ /*! \file */ diff --git a/lib/dns/pkcs11ecdsa_link.c b/lib/dns/pkcs11ecdsa_link.c index 308d9d3c9d..048eeede44 100644 --- a/lib/dns/pkcs11ecdsa_link.c +++ b/lib/dns/pkcs11ecdsa_link.c @@ -11,7 +11,7 @@ #include -#if defined(PKCS11CRYPTO) && defined(HAVE_PKCS11_ECDSA) +#if HAVE_PKCS11 && defined(HAVE_PKCS11_ECDSA) #include #include @@ -1185,11 +1185,11 @@ dst__pkcs11ecdsa_init(dst_func_t **funcp) { return (ISC_R_SUCCESS); } -#else /* PKCS11CRYPTO && HAVE_PKCS11_ECDSA */ +#else /* HAVE_PKCS11 && HAVE_PKCS11_ECDSA */ #include EMPTY_TRANSLATION_UNIT -#endif /* PKCS11CRYPTO && HAVE_PKCS11_ECDSA */ +#endif /* HAVE_PKCS11 && HAVE_PKCS11_ECDSA */ /*! \file */ diff --git a/lib/dns/pkcs11eddsa_link.c b/lib/dns/pkcs11eddsa_link.c index 6644338e5d..342088ed47 100644 --- a/lib/dns/pkcs11eddsa_link.c +++ b/lib/dns/pkcs11eddsa_link.c @@ -11,7 +11,7 @@ #include -#if defined(PKCS11CRYPTO) && \ +#if HAVE_PKCS11 && \ defined(HAVE_PKCS11_ED25519) || defined(HAVE_PKCS11_ED448) #include @@ -1172,11 +1172,11 @@ dst__pkcs11eddsa_init(dst_func_t **funcp) { return (ISC_R_SUCCESS); } -#else /* PKCS11CRYPTO && HAVE_PKCS11_EDxxx */ +#else /* HAVE_PKCS11 && HAVE_PKCS11_EDxxx */ #include EMPTY_TRANSLATION_UNIT -#endif /* PKCS11CRYPTO && HAVE_PKCS11_EDxxx */ +#endif /* HAVE_PKCS11 && HAVE_PKCS11_EDxxx */ /*! \file */ diff --git a/lib/dns/pkcs11gost_link.c b/lib/dns/pkcs11gost_link.c index 7a2f1397a4..48d51067db 100644 --- a/lib/dns/pkcs11gost_link.c +++ b/lib/dns/pkcs11gost_link.c @@ -11,7 +11,7 @@ #include -#if defined(PKCS11CRYPTO) && defined(HAVE_PKCS11_GOST) +#if HAVE_PKCS11 && defined(HAVE_PKCS11_GOST) #include #include @@ -944,11 +944,11 @@ dst__pkcs11gost_init(dst_func_t **funcp) { return (ISC_R_SUCCESS); } -#else /* PKCS11CRYPTO && HAVE_PKCS11_GOST */ +#else /* HAVE_PKCS11 && HAVE_PKCS11_GOST */ #include EMPTY_TRANSLATION_UNIT -#endif /* PKCS11CRYPTO && HAVE_PKCS11_GOST */ +#endif /* HAVE_PKCS11 && HAVE_PKCS11_GOST */ /*! \file */ diff --git a/lib/dns/pkcs11rsa_link.c b/lib/dns/pkcs11rsa_link.c index 163517df26..30fd7eb0b6 100644 --- a/lib/dns/pkcs11rsa_link.c +++ b/lib/dns/pkcs11rsa_link.c @@ -9,11 +9,10 @@ * information regarding copyright ownership. */ - -#ifdef PKCS11CRYPTO - #include +#if HAVE_PKCS11 + #include #include #include @@ -2225,11 +2224,11 @@ dst__pkcs11rsa_init(dst_func_t **funcp) { return (ISC_R_SUCCESS); } -#else /* PKCS11CRYPTO */ +#else /* HAVE_PKCS11 */ #include EMPTY_TRANSLATION_UNIT -#endif /* PKCS11CRYPTO */ +#endif /* HAVE_PKCS11 */ /*! \file */ diff --git a/lib/dns/spnego.c b/lib/dns/spnego.c index 79aa5e60d4..227fab54cd 100644 --- a/lib/dns/spnego.c +++ b/lib/dns/spnego.c @@ -9,6 +9,8 @@ * information regarding copyright ownership. */ +#include + /*! \file * \brief * Portable SPNEGO implementation. @@ -127,8 +129,6 @@ * harmless in any case. */ -#include - #include #include diff --git a/lib/dns/spnego_asn1.c b/lib/dns/spnego_asn1.c index 6fbce55b8f..fb51b0dfcb 100644 --- a/lib/dns/spnego_asn1.c +++ b/lib/dns/spnego_asn1.c @@ -9,6 +9,7 @@ * information regarding copyright ownership. */ +#include /*! \file * \brief Method routines generated from SPNEGO ASN.1 module. diff --git a/lib/dns/tests/Makefile.in b/lib/dns/tests/Makefile.in index becfd1800c..078de59823 100644 --- a/lib/dns/tests/Makefile.in +++ b/lib/dns/tests/Makefile.in @@ -21,7 +21,7 @@ VERSION=@BIND9_VERSION@ CINCLUDES = -I. -Iinclude ${DNS_INCLUDES} ${ISC_INCLUDES} \ @DST_OPENSSL_INC@ -CDEFINES = @CRYPTO@ -DTESTS="\"${top_builddir}/lib/dns/tests/\"" +CDEFINES = -DTESTS="\"${top_builddir}/lib/dns/tests/\"" ISCLIBS = ../../isc/libisc.@A@ @ISC_OPENSSL_LIBS@ ISCDEPLIBS = ../../isc/libisc.@A@ diff --git a/lib/dns/tests/dh_test.c b/lib/dns/tests/dh_test.c index 9fa20ce7b7..734aeac6b2 100644 --- a/lib/dns/tests/dh_test.c +++ b/lib/dns/tests/dh_test.c @@ -30,7 +30,7 @@ #include "dnstest.h" -#if defined(OPENSSL) && !defined(PK11_DH_DISABLE) +#if HAVE_OPENSSL && !defined(PK11_DH_DISABLE) ATF_TC(isc_dh_computesecret); ATF_TC_HEAD(isc_dh_computesecret, tc) { @@ -83,7 +83,7 @@ ATF_TC_BODY(untested, tc) { * Main */ ATF_TP_ADD_TCS(tp) { -#if defined(OPENSSL) && !defined(PK11_DH_DISABLE) +#if HAVE_OPENSSL && !defined(PK11_DH_DISABLE) ATF_TP_ADD_TC(tp, isc_dh_computesecret); #else ATF_TP_ADD_TC(tp, untested); diff --git a/lib/dns/tests/keytable_test.c b/lib/dns/tests/keytable_test.c index b09eeca68c..92a4f8fb86 100644 --- a/lib/dns/tests/keytable_test.c +++ b/lib/dns/tests/keytable_test.c @@ -18,8 +18,6 @@ #include #include -#if defined(OPENSSL) || defined(PKCS11CRYPTO) - #include #include #include @@ -698,24 +696,10 @@ ATF_TC_BODY(nta, tc) { dns_test_end(); } -#else -#include - -ATF_TC(untested); -ATF_TC_HEAD(untested, tc) { - atf_tc_set_md_var(tc, "descr", "skipping keytable test"); -} -ATF_TC_BODY(untested, tc) { - UNUSED(tc); - atf_tc_skip("DNSSEC not available"); -} -#endif - /* * Main */ ATF_TP_ADD_TCS(tp) { -#if defined(OPENSSL) || defined(PKCS11CRYPTO) ATF_TP_ADD_TC(tp, add); ATF_TP_ADD_TC(tp, delete); ATF_TP_ADD_TC(tp, deletekeynode); @@ -723,9 +707,6 @@ ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, issecuredomain); ATF_TP_ADD_TC(tp, dump); ATF_TP_ADD_TC(tp, nta); -#else - ATF_TP_ADD_TC(tp, untested); -#endif return (atf_no_error()); } diff --git a/lib/dns/tests/nsec3_test.c b/lib/dns/tests/nsec3_test.c index 0c4d0841cc..2f88ecfe33 100644 --- a/lib/dns/tests/nsec3_test.c +++ b/lib/dns/tests/nsec3_test.c @@ -23,7 +23,6 @@ #include "dnstest.h" -#if defined(OPENSSL) || defined(PKCS11CRYPTO) /* * Helper functions */ @@ -180,27 +179,13 @@ ATF_TC_BODY(nsec3param_salttotext, tc) { dns_test_end(); } -#else -ATF_TC(untested); -ATF_TC_HEAD(untested, tc) { - atf_tc_set_md_var(tc, "descr", "skipping nsec3 test"); -} -ATF_TC_BODY(untested, tc) { - UNUSED(tc); - atf_tc_skip("DNSSEC not available"); -} -#endif /* * Main */ ATF_TP_ADD_TCS(tp) { -#if defined(OPENSSL) || defined(PKCS11CRYPTO) ATF_TP_ADD_TC(tp, max_iterations); ATF_TP_ADD_TC(tp, nsec3param_salttotext); -#else - ATF_TP_ADD_TC(tp, untested); -#endif return (atf_no_error()); } diff --git a/lib/dns/tests/rsa_test.c b/lib/dns/tests/rsa_test.c index db48e8cd97..79eafd8c85 100644 --- a/lib/dns/tests/rsa_test.c +++ b/lib/dns/tests/rsa_test.c @@ -28,8 +28,6 @@ #include "../dst_internal.h" -#if defined(OPENSSL) || defined(PKCS11CRYPTO) - static unsigned char d[10] = { 0xa, 0x10, 0xbb, 0, 0xfe, 0x15, 0x1, 0x88, 0xcc, 0x7d }; @@ -288,25 +286,12 @@ ATF_TC_BODY(isc_rsa_verify, tc) { dst_key_free(&key); dns_test_end(); } -#else -ATF_TC(untested); -ATF_TC_HEAD(untested, tc) { - atf_tc_set_md_var(tc, "descr", "skipping RSA test"); -} -ATF_TC_BODY(untested, tc) { - UNUSED(tc); - atf_tc_skip("RSA not available"); -} -#endif + /* * Main */ ATF_TP_ADD_TCS(tp) { -#if defined(OPENSSL) || defined(PKCS11CRYPTO) ATF_TP_ADD_TC(tp, isc_rsa_verify); -#else - ATF_TP_ADD_TC(tp, untested); -#endif return (atf_no_error()); } diff --git a/lib/dns/tests/sigs_test.c b/lib/dns/tests/sigs_test.c index f345b3c47b..6e0a4b1827 100644 --- a/lib/dns/tests/sigs_test.c +++ b/lib/dns/tests/sigs_test.c @@ -17,7 +17,6 @@ #include -#if defined(OPENSSL) || defined(PKCS11CRYPTO) #include #include @@ -457,23 +456,9 @@ ATF_TC_BODY(updatesigs, tc) { dns_test_end(); } -#else -ATF_TC(untested); -ATF_TC_HEAD(untested, tc) { - atf_tc_set_md_var(tc, "descr", "skipping dns__zone_updatesigs() test"); -} -ATF_TC_BODY(untested, tc) { - UNUSED(tc); - atf_tc_skip("DNSSEC support not compiled in"); -} -#endif ATF_TP_ADD_TCS(tp) { -#if defined(OPENSSL) || defined(PKCS11CRYPTO) ATF_TP_ADD_TC(tp, updatesigs); -#else - ATF_TP_ADD_TC(tp, untested); -#endif return (atf_no_error()); } diff --git a/lib/dns/tkey.c b/lib/dns/tkey.c index 61b59c9142..91437a6bc1 100644 --- a/lib/dns/tkey.c +++ b/lib/dns/tkey.c @@ -44,7 +44,7 @@ #define TEMP_BUFFER_SZ 8192 #define TKEY_RANDOM_AMOUNT 16 -#ifdef PKCS11CRYPTO +#if HAVE_PKCS11 #include #endif diff --git a/lib/dns/version.c b/lib/dns/version.c index 68ae7fe291..059ae884ca 100644 --- a/lib/dns/version.c +++ b/lib/dns/version.c @@ -11,6 +11,7 @@ /*! \file */ +#include #include diff --git a/lib/dns/win32/DLLMain.c b/lib/dns/win32/DLLMain.c index 8ff101757d..518039596c 100644 --- a/lib/dns/win32/DLLMain.c +++ b/lib/dns/win32/DLLMain.c @@ -9,6 +9,7 @@ * information regarding copyright ownership. */ +#include #include #include diff --git a/lib/dns/win32/version.c b/lib/dns/win32/version.c index 852f70e81b..8bedd7ad5e 100644 --- a/lib/dns/win32/version.c +++ b/lib/dns/win32/version.c @@ -9,6 +9,7 @@ * information regarding copyright ownership. */ +#include #include diff --git a/lib/irs/Makefile.in b/lib/irs/Makefile.in index fc114472df..9705a0bc4a 100644 --- a/lib/irs/Makefile.in +++ b/lib/irs/Makefile.in @@ -21,7 +21,7 @@ CINCLUDES = -I. -I./include -I${srcdir}/include \ ${DNS_INCLUDES} ${ISC_INCLUDES} \ ${ISCCFG_INCLUDES} @ISC_OPENSSL_INC@ -CDEFINES = @CRYPTO@ +CDEFINES = CWARNINGS = # Alphabetically diff --git a/lib/irs/tests/Makefile.in b/lib/irs/tests/Makefile.in index c4e3b7fdb5..f1bd3c01c4 100644 --- a/lib/irs/tests/Makefile.in +++ b/lib/irs/tests/Makefile.in @@ -20,7 +20,7 @@ VERSION=@BIND9_VERSION@ @BIND9_MAKE_INCLUDES@ CINCLUDES = -I. -Iinclude -I../include ${ISC_INCLUDES} ${IRS_INCLUDES} -CDEFINES = -DTESTS="\"${top_builddir}/lib/irs/tests/\"" @CRYPTO@ +CDEFINES = -DTESTS="\"${top_builddir}/lib/irs/tests/\"" CFGLIBS = ../../isccfg/libisccfg.@A@ CFGDEPLIBS = ../../isccfg/libisccfg.@A@ diff --git a/lib/irs/version.c b/lib/irs/version.c index 4e33c7712e..2629d86c93 100644 --- a/lib/irs/version.c +++ b/lib/irs/version.c @@ -9,6 +9,7 @@ * information regarding copyright ownership. */ +#include /*! \file */ diff --git a/lib/irs/win32/DLLMain.c b/lib/irs/win32/DLLMain.c index 8ff101757d..518039596c 100644 --- a/lib/irs/win32/DLLMain.c +++ b/lib/irs/win32/DLLMain.c @@ -9,6 +9,7 @@ * information regarding copyright ownership. */ +#include #include #include diff --git a/lib/irs/win32/version.c b/lib/irs/win32/version.c index 198e12d5dd..a69488b64d 100644 --- a/lib/irs/win32/version.c +++ b/lib/irs/win32/version.c @@ -9,6 +9,7 @@ * information regarding copyright ownership. */ +#include #include diff --git a/lib/isc/Makefile.in b/lib/isc/Makefile.in index 33d871f0e4..64f5f4c911 100644 --- a/lib/isc/Makefile.in +++ b/lib/isc/Makefile.in @@ -24,7 +24,7 @@ CINCLUDES = -I${srcdir}/unix/include \ -I${srcdir}/@ISC_ARCH_DIR@/include \ -I./include \ -I${srcdir}/include ${DNS_INCLUDES} @ISC_OPENSSL_INC@ -CDEFINES = @CRYPTO@ -DPK11_LIB_LOCATION=\"${PROVIDER}\" +CDEFINES = -DPK11_LIB_LOCATION=\"${PROVIDER}\" CWARNINGS = # Alphabetically diff --git a/lib/isc/aes.c b/lib/isc/aes.c index bf53df2529..2c344a8bfb 100644 --- a/lib/isc/aes.c +++ b/lib/isc/aes.c @@ -126,7 +126,7 @@ isc_aes256_crypt(const unsigned char *key, const unsigned char *in, AES_encrypt(in, out, &k); } -#elif PKCS11CRYPTO +#elif HAVE_PKCS11 #include #include diff --git a/lib/isc/fsaccess.c b/lib/isc/fsaccess.c index 296ada28b9..4299b38c04 100644 --- a/lib/isc/fsaccess.c +++ b/lib/isc/fsaccess.c @@ -9,6 +9,7 @@ * information regarding copyright ownership. */ +#include /*! \file * \brief diff --git a/lib/isc/hmacmd5.c b/lib/isc/hmacmd5.c index fb526b3b1f..67c408af36 100644 --- a/lib/isc/hmacmd5.c +++ b/lib/isc/hmacmd5.c @@ -29,7 +29,7 @@ #include #include -#if PKCS11CRYPTO +#if HAVE_PKCS11 #include #include #endif @@ -72,7 +72,7 @@ isc_hmacmd5_sign(isc_hmacmd5_t *ctx, unsigned char *digest) { ctx->ctx = NULL; } -#elif PKCS11CRYPTO +#elif HAVE_PKCS11 #ifndef PK11_MD5_HMAC_REPLACE diff --git a/lib/isc/hmacsha.c b/lib/isc/hmacsha.c index b919d2c158..27b61230ee 100644 --- a/lib/isc/hmacsha.c +++ b/lib/isc/hmacsha.c @@ -27,7 +27,7 @@ #include #include -#if PKCS11CRYPTO +#if HAVE_PKCS11 #include #include #endif @@ -228,7 +228,7 @@ isc_hmacsha512_sign(isc_hmacsha512_t *ctx, unsigned char *digest, size_t len) { isc_safe_memwipe(newdigest, sizeof(newdigest)); } -#elif PKCS11CRYPTO +#elif HAVE_PKCS11 #if defined(PK11_SHA_1_HMAC_REPLACE) || \ defined(PK11_SHA224_HMAC_REPLACE) || \ diff --git a/lib/isc/include/isc/hmacmd5.h b/lib/isc/include/isc/hmacmd5.h index 35207e4c30..83f44db57d 100644 --- a/lib/isc/include/isc/hmacmd5.h +++ b/lib/isc/include/isc/hmacmd5.h @@ -40,7 +40,7 @@ typedef struct { #endif } isc_hmacmd5_t; -#elif PKCS11CRYPTO +#elif HAVE_PKCS11 #include typedef pk11_context_t isc_hmacmd5_t; diff --git a/lib/isc/include/isc/hmacsha.h b/lib/isc/include/isc/hmacsha.h index d5746130d8..1803f19dc1 100644 --- a/lib/isc/include/isc/hmacsha.h +++ b/lib/isc/include/isc/hmacsha.h @@ -47,7 +47,7 @@ typedef isc_hmacsha_t isc_hmacsha256_t; typedef isc_hmacsha_t isc_hmacsha384_t; typedef isc_hmacsha_t isc_hmacsha512_t; -#elif PKCS11CRYPTO +#elif HAVE_PKCS11 #include typedef pk11_context_t isc_hmacsha1_t; diff --git a/lib/isc/include/isc/md5.h b/lib/isc/include/isc/md5.h index e5f46dd9c7..a2ec37f1c8 100644 --- a/lib/isc/include/isc/md5.h +++ b/lib/isc/include/isc/md5.h @@ -58,7 +58,7 @@ typedef struct { #endif } isc_md5_t; -#elif PKCS11CRYPTO +#elif HAVE_PKCS11 #include typedef pk11_context_t isc_md5_t; diff --git a/lib/isc/include/isc/platform.h.in b/lib/isc/include/isc/platform.h.in index 822cbead76..9a74ee64d5 100644 --- a/lib/isc/include/isc/platform.h.in +++ b/lib/isc/include/isc/platform.h.in @@ -18,14 +18,6 @@ ***** Platform-dependent defines. *****/ -/*** - *** Enforce OpenSSL or PKCS#11 cryptography - ***/ - -#if !defined(OPENSSL) && !defined(PKCS11CRYPTO) -#error No cryptography library has been found or provided. -#endif - /*** *** Network. ***/ diff --git a/lib/isc/include/isc/sha1.h b/lib/isc/include/isc/sha1.h index 41476307b1..724ed852ee 100644 --- a/lib/isc/include/isc/sha1.h +++ b/lib/isc/include/isc/sha1.h @@ -39,7 +39,7 @@ typedef struct { #endif } isc_sha1_t; -#elif PKCS11CRYPTO +#elif HAVE_PKCS11 #include typedef pk11_context_t isc_sha1_t; diff --git a/lib/isc/include/isc/sha2.h b/lib/isc/include/isc/sha2.h index c3807496df..8a19b27ccd 100644 --- a/lib/isc/include/isc/sha2.h +++ b/lib/isc/include/isc/sha2.h @@ -90,7 +90,7 @@ typedef struct { typedef isc_sha2_t isc_sha256_t; typedef isc_sha2_t isc_sha512_t; -#elif PKCS11CRYPTO +#elif HAVE_PKCS11 #include typedef pk11_context_t isc_sha256_t; diff --git a/lib/isc/md5.c b/lib/isc/md5.c index 740d863b1b..e3ccf27697 100644 --- a/lib/isc/md5.c +++ b/lib/isc/md5.c @@ -40,7 +40,7 @@ #include #include -#if PKCS11CRYPTO +#if HAVE_PKCS11 #include #include #endif @@ -84,7 +84,7 @@ isc_md5_final(isc_md5_t *ctx, unsigned char *digest) { ctx->ctx = NULL; } -#elif PKCS11CRYPTO +#elif HAVE_PKCS11 void isc_md5_init(isc_md5_t *ctx) { diff --git a/lib/isc/nls/Makefile.in b/lib/isc/nls/Makefile.in index 1acb767561..704deadbea 100644 --- a/lib/isc/nls/Makefile.in +++ b/lib/isc/nls/Makefile.in @@ -16,7 +16,7 @@ CINCLUDES = -I../unix/include \ -I../include \ -I${srcdir}/../include -CDEFINES = @CRYPTO@ +CDEFINES = CWARNINGS = OBJS = msgcat.@O@ diff --git a/lib/isc/nothreads/Makefile.in b/lib/isc/nothreads/Makefile.in index 9f20d59831..c79477363e 100644 --- a/lib/isc/nothreads/Makefile.in +++ b/lib/isc/nothreads/Makefile.in @@ -17,7 +17,7 @@ CINCLUDES = -I${srcdir}/include \ -I${srcdir}/../include \ -I${srcdir}/.. -CDEFINES = @CRYPTO@ +CDEFINES = CWARNINGS = THREADOPTOBJS = condition.@O@ mutex.@O@ diff --git a/lib/isc/pk11.c b/lib/isc/pk11.c index a0e5a7030c..9377b7220b 100644 --- a/lib/isc/pk11.c +++ b/lib/isc/pk11.c @@ -221,7 +221,7 @@ pk11_initialize(isc_mem_t *mctx, const char *engine) { } scan_slots(); -#ifdef PKCS11CRYPTO +#if HAVE_PKCS11 if (rand_token == NULL) { result = PK11_R_NORANDOMSERVICE; goto unlock; @@ -236,7 +236,7 @@ pk11_initialize(isc_mem_t *mctx, const char *engine) { goto unlock; } #endif -#endif /* PKCS11CRYPTO */ +#endif /* HAVE_PKCS11 */ result = ISC_R_SUCCESS; unlock: UNLOCK(&sessionlock); @@ -348,7 +348,7 @@ pk11_get_session(pk11_context_t *ctx, pk11_optype_t optype, pk11_sessionlist_t *freelist; pk11_session_t *sp; isc_result_t ret; -#ifdef PKCS11CRYPTO +#if HAVE_PKCS11 isc_result_t service_ret = ISC_R_SUCCESS; #else UNUSED(need_services); @@ -359,7 +359,7 @@ pk11_get_session(pk11_context_t *ctx, pk11_optype_t optype, ctx->session = CK_INVALID_HANDLE; ret = pk11_initialize(NULL, NULL); -#ifdef PKCS11CRYPTO +#if HAVE_PKCS11 if (ret == PK11_R_NORANDOMSERVICE || ret == PK11_R_NODIGESTSERVICE || ret == PK11_R_NOAESSERVICE) { @@ -368,7 +368,7 @@ pk11_get_session(pk11_context_t *ctx, pk11_optype_t optype, service_ret = ret; } else -#endif /* PKCS11CRYPTO */ +#endif /* HAVE_PKCS11 */ if (ret != ISC_R_SUCCESS) return (ret); @@ -377,7 +377,7 @@ pk11_get_session(pk11_context_t *ctx, pk11_optype_t optype, UNLOCK(&sessionlock); switch(optype) { -#ifdef PKCS11CRYPTO +#if HAVE_PKCS11 case OP_RAND: token = rand_token; break; @@ -401,7 +401,7 @@ pk11_get_session(pk11_context_t *ctx, pk11_optype_t optype, token = ISC_LIST_NEXT(token, link)) if (token->slotid == slot) break; -#ifdef PKCS11CRYPTO +#if HAVE_PKCS11 if ((token == NULL) || ((token->operations & (1 << optype)) == 0)) return (ISC_R_NOTFOUND); @@ -454,7 +454,7 @@ pk11_get_session(pk11_context_t *ctx, pk11_optype_t optype, UNLOCK(&sessionlock); ctx->handle = sp; ctx->session = sp->session; -#ifdef PKCS11CRYPTO +#if HAVE_PKCS11 if (ret == ISC_R_SUCCESS) ret = service_ret; #endif diff --git a/lib/isc/pthreads/Makefile.in b/lib/isc/pthreads/Makefile.in index c3ba6a04e3..af4fd6ec29 100644 --- a/lib/isc/pthreads/Makefile.in +++ b/lib/isc/pthreads/Makefile.in @@ -17,7 +17,7 @@ CINCLUDES = -I${srcdir}/include \ -I${srcdir}/../include \ -I${srcdir}/.. -CDEFINES = @CRYPTO@ +CDEFINES = CWARNINGS = OBJS = condition.@O@ mutex.@O@ thread.@O@ diff --git a/lib/isc/random.c b/lib/isc/random.c index cc6c3a280f..3856adc8c3 100644 --- a/lib/isc/random.c +++ b/lib/isc/random.c @@ -34,14 +34,14 @@ #include #include -#ifdef OPENSSL +#if HAVE_OPENSSL #include #include -#endif /* ifdef OPENSSL */ +#endif /* ifdef HAVE_OPENSSL */ -#ifdef PKCS11CRYPTO +#if HAVE_PKCS11 #include -#endif /* ifdef PKCS11CRYPTO */ +#endif /* if HAVE_PKCS11 */ #if defined(__linux__) # include @@ -164,11 +164,11 @@ isc_random_buf(void *buf, size_t buflen) # endif /* defined(__linux__) */ /* Use crypto library as fallback when no other CSPRNG is available */ -# if defined(OPENSSL) +# if HAVE_OPENSSL if (RAND_bytes(buf, buflen) < 1) { FATAL_ERROR(__FILE__, __LINE__, "RAND_bytes(): %s", ERR_error_string(ERR_get_error(), NULL)); } -# elif defined(PKCS11CRYPTO) +# elif HAVE_PKCS11 RUNTIME_CHECK(pk11_rand_bytes(buf, buflen) == ISC_R_SUCCESS); # endif /* if defined(HAVE_ARC4RANDOM_BUF) */ diff --git a/lib/isc/sha1.c b/lib/isc/sha1.c index 3314c4ee29..66371ece48 100644 --- a/lib/isc/sha1.c +++ b/lib/isc/sha1.c @@ -37,7 +37,7 @@ #include #include -#if PKCS11CRYPTO +#if HAVE_PKCS11 #include #include #endif @@ -90,7 +90,7 @@ isc_sha1_final(isc_sha1_t *context, unsigned char *digest) { context->ctx = NULL; } -#elif PKCS11CRYPTO +#elif HAVE_PKCS11 void isc_sha1_init(isc_sha1_t *ctx) { diff --git a/lib/isc/sha2.c b/lib/isc/sha2.c index 50d87158ed..cb413211a4 100644 --- a/lib/isc/sha2.c +++ b/lib/isc/sha2.c @@ -57,7 +57,7 @@ #include #include -#if PKCS11CRYPTO +#if HAVE_PKCS11 #include #include #endif @@ -259,7 +259,7 @@ isc_sha384_final(isc_uint8_t digest[], isc_sha384_t *context) { context->ctx = NULL; } -#elif PKCS11CRYPTO +#elif HAVE_PKCS11 void isc_sha224_init(isc_sha224_t *context) { @@ -1618,7 +1618,7 @@ isc_sha224_end(isc_sha224_t *context, char buffer[]) { } else { #if defined(ISC_PLATFORM_OPENSSLHASH) && !defined(LIBRESSL_VERSION_NUMBER) EVP_MD_CTX_reset(context->ctx); -#elif PKCS11CRYPTO +#elif HAVE_PKCS11 pk11_return_session(context); #else isc_safe_memwipe(context, sizeof(*context)); @@ -1659,7 +1659,7 @@ isc_sha256_end(isc_sha256_t *context, char buffer[]) { } else { #if defined(ISC_PLATFORM_OPENSSLHASH) && !defined(LIBRESSL_VERSION_NUMBER) EVP_MD_CTX_reset(context->ctx); -#elif PKCS11CRYPTO +#elif HAVE_PKCS11 pk11_return_session(context); #else isc_safe_memwipe(context, sizeof(*context)); @@ -1700,7 +1700,7 @@ isc_sha512_end(isc_sha512_t *context, char buffer[]) { } else { #if defined(ISC_PLATFORM_OPENSSLHASH) && !defined(LIBRESSL_VERSION_NUMBER) EVP_MD_CTX_reset(context->ctx); -#elif PKCS11CRYPTO +#elif HAVE_PKCS11 pk11_return_session(context); #else isc_safe_memwipe(context, sizeof(*context)); @@ -1741,7 +1741,7 @@ isc_sha384_end(isc_sha384_t *context, char buffer[]) { } else { #if defined(ISC_PLATFORM_OPENSSLHASH) && !defined(LIBRESSL_VERSION_NUMBER) EVP_MD_CTX_reset(context->ctx); -#elif PKCS11CRYPTO +#elif HAVE_PKCS11 pk11_return_session(context); #else isc_safe_memwipe(context, sizeof(*context)); diff --git a/lib/isc/strtoul.c b/lib/isc/strtoul.c index 382432a61f..c4c1707a60 100644 --- a/lib/isc/strtoul.c +++ b/lib/isc/strtoul.c @@ -9,6 +9,8 @@ * information regarding copyright ownership. */ +#include + /* * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. diff --git a/lib/isc/tests/Makefile.in b/lib/isc/tests/Makefile.in index ff22d22462..58b3e4f4a6 100644 --- a/lib/isc/tests/Makefile.in +++ b/lib/isc/tests/Makefile.in @@ -20,7 +20,7 @@ VERSION=@BIND9_VERSION@ @BIND9_MAKE_INCLUDES@ CINCLUDES = -I. -Iinclude ${ISC_INCLUDES} @ISC_OPENSSL_INC@ -CDEFINES = @CRYPTO@ -DTESTS="\"${top_builddir}/lib/isc/tests/\"" +CDEFINES = -DTESTS="\"${top_builddir}/lib/isc/tests/\"" ISCLIBS = ../libisc.@A@ @ISC_OPENSSL_LIBS@ ISCDEPLIBS = ../libisc.@A@ diff --git a/lib/isc/unix/Makefile.in b/lib/isc/unix/Makefile.in index f0929c1c84..636c97d9db 100644 --- a/lib/isc/unix/Makefile.in +++ b/lib/isc/unix/Makefile.in @@ -17,7 +17,7 @@ CINCLUDES = -I${srcdir}/include \ -I${srcdir}/../include \ -I${srcdir}/.. @ISC_OPENSSL_INC@ -CDEFINES = @CRYPTO@ +CDEFINES = CWARNINGS = # Alphabetically diff --git a/lib/isc/unix/ifiter_getifaddrs.c b/lib/isc/unix/ifiter_getifaddrs.c index e75ec0a11c..dd115af2af 100644 --- a/lib/isc/unix/ifiter_getifaddrs.c +++ b/lib/isc/unix/ifiter_getifaddrs.c @@ -9,6 +9,7 @@ * information regarding copyright ownership. */ +#include /*! \file * \brief diff --git a/lib/isc/unix/ifiter_ioctl.c b/lib/isc/unix/ifiter_ioctl.c index b8a1fa3cdd..a1700328c7 100644 --- a/lib/isc/unix/ifiter_ioctl.c +++ b/lib/isc/unix/ifiter_ioctl.c @@ -9,6 +9,7 @@ * information regarding copyright ownership. */ +#include #include diff --git a/lib/isc/unix/ifiter_sysctl.c b/lib/isc/unix/ifiter_sysctl.c index 7ff5a00fb2..0d6019b5b9 100644 --- a/lib/isc/unix/ifiter_sysctl.c +++ b/lib/isc/unix/ifiter_sysctl.c @@ -9,6 +9,7 @@ * information regarding copyright ownership. */ +#include /*! \file * \brief diff --git a/lib/isc/version.c b/lib/isc/version.c index 3a83a39fcb..8efdbe68ea 100644 --- a/lib/isc/version.c +++ b/lib/isc/version.c @@ -11,6 +11,7 @@ /*! \file */ +#include #include diff --git a/lib/isc/win32/DLLMain.c b/lib/isc/win32/DLLMain.c index f14260e9f9..5361c9660b 100644 --- a/lib/isc/win32/DLLMain.c +++ b/lib/isc/win32/DLLMain.c @@ -9,6 +9,7 @@ * information regarding copyright ownership. */ +#include #include #include diff --git a/lib/isc/win32/Makefile.in b/lib/isc/win32/Makefile.in index 1c5d56793b..19b46bdec4 100644 --- a/lib/isc/win32/Makefile.in +++ b/lib/isc/win32/Makefile.in @@ -15,7 +15,7 @@ CINCLUDES = -I${srcdir}/.. \ -I./include \ -I${srcdir}/include \ -I${srcdir}/../include -CDEFINES = @CRYPTO@ +CDEFINES = CWARNINGS = # Alphabetically diff --git a/lib/isc/win32/include/isc/platform.h.in b/lib/isc/win32/include/isc/platform.h.in index b34e99b3e2..d7f94a6ff0 100644 --- a/lib/isc/win32/include/isc/platform.h.in +++ b/lib/isc/win32/include/isc/platform.h.in @@ -31,14 +31,6 @@ #endif #endif -/*** - *** Enforce OpenSSL or PKCS#11 cryptography - ***/ - -#if !defined(OPENSSL) && !defined(PKCS11CRYPTO) -#error No cryptography library has been found or provided. -#endif - /*** *** Network. ***/ diff --git a/lib/isc/win32/ipv6.c b/lib/isc/win32/ipv6.c index c2a4ac5b99..048315e7fa 100644 --- a/lib/isc/win32/ipv6.c +++ b/lib/isc/win32/ipv6.c @@ -9,6 +9,7 @@ * information regarding copyright ownership. */ +#include #include #include diff --git a/lib/isc/win32/ntgroups.c b/lib/isc/win32/ntgroups.c index e3a45ca510..217243cad8 100644 --- a/lib/isc/win32/ntgroups.c +++ b/lib/isc/win32/ntgroups.c @@ -9,6 +9,7 @@ * information regarding copyright ownership. */ +#include /* * The NT Groups have two groups that are not well documented and are diff --git a/lib/isc/win32/os.c b/lib/isc/win32/os.c index 0f4023f4a3..f06bcd5419 100644 --- a/lib/isc/win32/os.c +++ b/lib/isc/win32/os.c @@ -9,6 +9,7 @@ * information regarding copyright ownership. */ +#include #include diff --git a/lib/isc/win32/socket.c b/lib/isc/win32/socket.c index 67e626c4e0..e125a7d52d 100644 --- a/lib/isc/win32/socket.c +++ b/lib/isc/win32/socket.c @@ -9,6 +9,8 @@ * information regarding copyright ownership. */ +#include + /* This code uses functions which are only available on Server 2003 and * higher, and Windows XP and higher. * diff --git a/lib/isc/win32/version.c b/lib/isc/win32/version.c index d86c781240..83e292bc60 100644 --- a/lib/isc/win32/version.c +++ b/lib/isc/win32/version.c @@ -9,6 +9,7 @@ * information regarding copyright ownership. */ +#include #include diff --git a/lib/isc/win32/win32os.c b/lib/isc/win32/win32os.c index 9af95c804b..cddb714fed 100644 --- a/lib/isc/win32/win32os.c +++ b/lib/isc/win32/win32os.c @@ -9,6 +9,8 @@ * information regarding copyright ownership. */ +#include + #include #ifndef TESTVERSION diff --git a/lib/isccc/Makefile.in b/lib/isccc/Makefile.in index c34a685cf7..ad8346a524 100644 --- a/lib/isccc/Makefile.in +++ b/lib/isccc/Makefile.in @@ -20,7 +20,7 @@ VERSION=@BIND9_VERSION@ CINCLUDES = -I. ${DNS_INCLUDES} ${ISC_INCLUDES} \ ${ISCCC_INCLUDES} @ISC_OPENSSL_INC@ -CDEFINES = @CRYPTO@ +CDEFINES = CWARNINGS = ISCLIBS = ../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@ diff --git a/lib/isccc/version.c b/lib/isccc/version.c index a3c1d9bc42..0b5aa0c181 100644 --- a/lib/isccc/version.c +++ b/lib/isccc/version.c @@ -12,6 +12,8 @@ /*! \file */ +#include + #include const char isccc_version[] = VERSION; diff --git a/lib/isccc/win32/DLLMain.c b/lib/isccc/win32/DLLMain.c index 8ff101757d..518039596c 100644 --- a/lib/isccc/win32/DLLMain.c +++ b/lib/isccc/win32/DLLMain.c @@ -9,6 +9,7 @@ * information regarding copyright ownership. */ +#include #include #include diff --git a/lib/isccc/win32/version.c b/lib/isccc/win32/version.c index dfdd947a77..c1c967b4f8 100644 --- a/lib/isccc/win32/version.c +++ b/lib/isccc/win32/version.c @@ -9,6 +9,7 @@ * information regarding copyright ownership. */ +#include #include diff --git a/lib/isccfg/Makefile.in b/lib/isccfg/Makefile.in index 62dbef000a..4625fcd97b 100644 --- a/lib/isccfg/Makefile.in +++ b/lib/isccfg/Makefile.in @@ -19,7 +19,7 @@ VERSION=@BIND9_VERSION@ CINCLUDES = -I. ${DNS_INCLUDES} ${ISC_INCLUDES} ${ISCCFG_INCLUDES} -CDEFINES = @CRYPTO@ +CDEFINES = CWARNINGS = ISCLIBS = ../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@ diff --git a/lib/isccfg/tests/Makefile.in b/lib/isccfg/tests/Makefile.in index f1ef64386e..43a58a579a 100644 --- a/lib/isccfg/tests/Makefile.in +++ b/lib/isccfg/tests/Makefile.in @@ -22,7 +22,7 @@ VERSION=@BIND9_VERSION@ CINCLUDES = -I. -Iinclude \ ${DNS_INCLUDES} ${ISC_INCLUDES} ${ISCCFG_INCLUDES} \ @DST_OPENSSL_INC@ -CDEFINES = @CRYPTO@ -DTESTS="\"${top_builddir}/lib/dns/tests/\"" +CDEFINES = -DTESTS="\"${top_builddir}/lib/dns/tests/\"" ISCLIBS = ../../isc/libisc.@A@ @ISC_OPENSSL_LIBS@ ISCDEPLIBS = ../../isc/libisc.@A@ diff --git a/lib/isccfg/version.c b/lib/isccfg/version.c index 51ed4b53e7..ac9b517b47 100644 --- a/lib/isccfg/version.c +++ b/lib/isccfg/version.c @@ -11,6 +11,7 @@ /*! \file */ +#include #include diff --git a/lib/isccfg/win32/DLLMain.c b/lib/isccfg/win32/DLLMain.c index 93c2893b1e..bf0d1ae562 100644 --- a/lib/isccfg/win32/DLLMain.c +++ b/lib/isccfg/win32/DLLMain.c @@ -9,6 +9,7 @@ * information regarding copyright ownership. */ +#include #include #include diff --git a/lib/isccfg/win32/version.c b/lib/isccfg/win32/version.c index 4a69e878f7..82f9027034 100644 --- a/lib/isccfg/win32/version.c +++ b/lib/isccfg/win32/version.c @@ -9,6 +9,7 @@ * information regarding copyright ownership. */ +#include #include diff --git a/lib/ns/Makefile.in b/lib/ns/Makefile.in index 1b26c0cbca..e81eeb3367 100644 --- a/lib/ns/Makefile.in +++ b/lib/ns/Makefile.in @@ -28,7 +28,7 @@ CINCLUDES = -I. -I${top_srcdir}/lib/ns -Iinclude \ ${NS_INCLUDES} ${DNS_INCLUDES} ${ISC_INCLUDES} \ @DST_OPENSSL_INC@ @DST_GSSAPI_INC@ -CDEFINES = @CRYPTO@ +CDEFINES = CWARNINGS = diff --git a/lib/ns/tests/Makefile.in b/lib/ns/tests/Makefile.in index 7da7f8c54e..564181fc48 100644 --- a/lib/ns/tests/Makefile.in +++ b/lib/ns/tests/Makefile.in @@ -21,7 +21,7 @@ VERSION=@BIND9_VERSION@ CINCLUDES = -I. -Iinclude ${NS_INCLUDES} ${DNS_INCLUDES} ${ISC_INCLUDES} \ @DST_OPENSSL_INC@ -CDEFINES = @CRYPTO@ -DTESTS="\"${top_builddir}/lib/ns/tests/\"" +CDEFINES = -DTESTS="\"${top_builddir}/lib/ns/tests/\"" ISCLIBS = ../../isc/libisc.@A@ @ISC_OPENSSL_LIBS@ ISCDEPLIBS = ../../isc/libisc.@A@ diff --git a/lib/ns/version.c b/lib/ns/version.c index 7df021564c..da692b25ce 100644 --- a/lib/ns/version.c +++ b/lib/ns/version.c @@ -10,6 +10,7 @@ */ /*! \file */ +#include #include diff --git a/lib/ns/win32/DLLMain.c b/lib/ns/win32/DLLMain.c index 8ff101757d..518039596c 100644 --- a/lib/ns/win32/DLLMain.c +++ b/lib/ns/win32/DLLMain.c @@ -9,6 +9,7 @@ * information regarding copyright ownership. */ +#include #include #include diff --git a/lib/ns/win32/version.c b/lib/ns/win32/version.c index f506fa1ddb..c4e8c5ac50 100644 --- a/lib/ns/win32/version.c +++ b/lib/ns/win32/version.c @@ -10,6 +10,7 @@ */ /*! \file */ +#include #include diff --git a/lib/samples/Makefile-postinstall.in b/lib/samples/Makefile-postinstall.in index 8d5421f98c..cf114da6a1 100644 --- a/lib/samples/Makefile-postinstall.in +++ b/lib/samples/Makefile-postinstall.in @@ -11,7 +11,7 @@ srcdir = @srcdir@ #prefix = @prefix@ #exec_prefix = @exec_prefix@ -CDEFINES = @CRYPTO@ +CDEFINES = CWARNINGS = DNSLIBS = -ldns @DNS_CRYPTO_LIBS@ diff --git a/lib/samples/Makefile.in b/lib/samples/Makefile.in index 7c8827ca25..1c6542c405 100644 --- a/lib/samples/Makefile.in +++ b/lib/samples/Makefile.in @@ -20,7 +20,7 @@ CINCLUDES = -I${srcdir}/include -I../dns/include \ -I${top_srcdir}/lib/irs/include \ -I../../lib/irs/include @ISC_OPENSSL_INC@ -CDEFINES = @CRYPTO@ -DVERSION=\"${VERSION}\" \ +CDEFINES = -DVERSION=\"${VERSION}\" \ -DSYSCONFDIR=\"${sysconfdir}\" CWARNINGS = diff --git a/lib/win32/bindevt/bindevt.c b/lib/win32/bindevt/bindevt.c index d74a2f1c3d..ec4ec03eef 100644 --- a/lib/win32/bindevt/bindevt.c +++ b/lib/win32/bindevt/bindevt.c @@ -9,7 +9,6 @@ * information regarding copyright ownership. */ - /* * bindevt.c : Defines the entry point for event log viewer DLL. */ diff --git a/util/mksymtbl.pl b/util/mksymtbl.pl index 47941da7d8..a7068f5325 100755 --- a/util/mksymtbl.pl +++ b/util/mksymtbl.pl @@ -103,6 +103,7 @@ sub lhex { } print TBLFILE "/*\n * Generated by $rev \n */\n"; +print TBLFILE "#include \n"; print TBLFILE "#include \n"; print TBLFILE "const int isc__backtrace_nsymbols = $nsyms;\n"; print TBLFILE "const isc_backtrace_symmap_t isc__backtrace_symtable[] = {\n"; diff --git a/win32utils/Configure b/win32utils/Configure index 88e80e1b0b..62e965ff35 100644 --- a/win32utils/Configure +++ b/win32utils/Configure @@ -201,6 +201,7 @@ my @substdefh = ("AES_CC", "HAVE_GEOIP_CITY_V6", "HAVE_GEOIP_V6", "HAVE_LIBXML2", + "HAVE_OPENSSL", "HAVE_OPENSSL_AES", "HAVE_OPENSSL_DSA", "HAVE_OPENSSL_ECDSA", @@ -208,6 +209,7 @@ my @substdefh = ("AES_CC", "HAVE_OPENSSL_ED448", "HAVE_OPENSSL_EVP_AES", "HAVE_OPENSSL_GOST", + "HAVE_PKCS11", "HAVE_PKCS11_ECDSA", "HAVE_PKCS11_ED25519", "HAVE_PKCS11_ED448", @@ -1321,6 +1323,7 @@ if ($enable_native_pkcs11 eq "yes") { } } $configdefd{"CRYPTO"} = "PKCS11CRYPTO"; + $configdefh{"HAVE_PKCS11"} = 1; if ($use_ecdsa eq "no") { if ($verbose) { print "no ECDSA support in native PKCS#11\n"; @@ -1514,6 +1517,7 @@ if ($use_openssl eq "yes") { $configinc{"OPENSSL_INC"} = "$openssl_inc"; $configlib{"OPENSSL_LIB"} = "$openssl_lib"; $configdll{"OPENSSL_DLL"} = "$openssl_dll"; + $configdefh{"HAVE_OPENSSL"} = 1; if (-f File::Spec->catfile($openssl_inc, "openssl", "dsa.h")) { $configdefh{"HAVE_OPENSSL_DSA"} = 1; } elsif ($verbose) { @@ -1955,7 +1959,11 @@ if ($cookie_algorithm eq "sha1") { die "Unrecognized cookie algorithm: $cookie_algorithm\n"; } -print "Cryptographic library for DNSSEC: $cryptolib\n"; +if ($cryptolib ne "") { + print "Cryptographic library for DNSSEC: $cryptolib\n"; +} else { + die "No cryptography library has been found or provided." +} # enable-openssl-hash if ($enable_openssl_hash eq "yes") {