]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
address win32 build issues
authorOndřej Surý <ondrej@sury.org>
Tue, 22 May 2018 13:24:37 +0000 (15:24 +0200)
committerEvan Hunt <each@isc.org>
Tue, 22 May 2018 23:32:21 +0000 (16:32 -0700)
- Replace external -DOPENSSL/-DPKCS11CRYPTO with properly AC_DEFINEd
  HAVE_OPENSSL/HAVE_PKCS11
- Don't enforce the crypto provider from platform.h, just from dst_api.c
  and configure scripts

137 files changed:
bin/check/Makefile.in
bin/confgen/Makefile.in
bin/confgen/ddns-confgen.c
bin/confgen/unix/Makefile.in
bin/delv/Makefile.in
bin/dig/Makefile.in
bin/dig/dighost.c
bin/dnssec/Makefile.in
bin/dnssec/dnssec-cds.c
bin/dnssec/dnssec-dsfromkey.c
bin/dnssec/dnssec-importkey.c
bin/dnssec/dnssec-keyfromlabel.c
bin/dnssec/dnssec-keygen.c
bin/dnssec/dnssec-revoke.c
bin/dnssec/dnssec-settime.c
bin/dnssec/dnssec-signzone.c
bin/dnssec/dnssec-verify.c
bin/named/Makefile.in
bin/named/main.c
bin/named/unix/Makefile.in
bin/nsupdate/Makefile.in
bin/pkcs11/Makefile.in
bin/rndc/Makefile.in
bin/tests/Makefile.in
bin/tests/optional/Makefile.in
bin/tests/pkcs11/Makefile.in
bin/tests/pkcs11/benchmarks/Makefile.in
bin/tests/system/Makefile.in
bin/tests/system/dlzexternal/Makefile.in
bin/tests/system/dyndb/driver/Makefile.in
bin/tests/system/pipelined/Makefile.in
bin/tests/system/rndc/Makefile.in
bin/tests/system/rpz/Makefile.in
bin/tests/system/rsabigexponent/Makefile.in
bin/tests/system/rsabigexponent/bigkey.c
bin/tests/system/tkey/Makefile.in
bin/tests/virtual-time/vtwrapper.c
bin/tools/Makefile.in
bin/win32/BINDInstall/BINDInstallDlg.cpp
config.h.in
config.h.win32
configure
configure.in
contrib/dlz/bin/dlzbdb/Makefile.in
lib/bind9/Makefile.in
lib/bind9/version.c
lib/bind9/win32/DLLMain.c
lib/bind9/win32/version.c
lib/dns/Makefile.in
lib/dns/compress.c
lib/dns/dst_api.c
lib/dns/dst_internal.h
lib/dns/openssl_link.c
lib/dns/openssldh_link.c
lib/dns/openssldsa_link.c
lib/dns/opensslecdsa_link.c
lib/dns/openssleddsa_link.c
lib/dns/opensslgost_link.c
lib/dns/opensslrsa_link.c
lib/dns/pkcs11.c
lib/dns/pkcs11dh_link.c
lib/dns/pkcs11dsa_link.c
lib/dns/pkcs11ecdsa_link.c
lib/dns/pkcs11eddsa_link.c
lib/dns/pkcs11gost_link.c
lib/dns/pkcs11rsa_link.c
lib/dns/spnego.c
lib/dns/spnego_asn1.c
lib/dns/tests/Makefile.in
lib/dns/tests/dh_test.c
lib/dns/tests/keytable_test.c
lib/dns/tests/nsec3_test.c
lib/dns/tests/rsa_test.c
lib/dns/tests/sigs_test.c
lib/dns/tkey.c
lib/dns/version.c
lib/dns/win32/DLLMain.c
lib/dns/win32/version.c
lib/irs/Makefile.in
lib/irs/tests/Makefile.in
lib/irs/version.c
lib/irs/win32/DLLMain.c
lib/irs/win32/version.c
lib/isc/Makefile.in
lib/isc/aes.c
lib/isc/fsaccess.c
lib/isc/hmacmd5.c
lib/isc/hmacsha.c
lib/isc/include/isc/hmacmd5.h
lib/isc/include/isc/hmacsha.h
lib/isc/include/isc/md5.h
lib/isc/include/isc/platform.h.in
lib/isc/include/isc/sha1.h
lib/isc/include/isc/sha2.h
lib/isc/md5.c
lib/isc/nls/Makefile.in
lib/isc/nothreads/Makefile.in
lib/isc/pk11.c
lib/isc/pthreads/Makefile.in
lib/isc/random.c
lib/isc/sha1.c
lib/isc/sha2.c
lib/isc/strtoul.c
lib/isc/tests/Makefile.in
lib/isc/unix/Makefile.in
lib/isc/unix/ifiter_getifaddrs.c
lib/isc/unix/ifiter_ioctl.c
lib/isc/unix/ifiter_sysctl.c
lib/isc/version.c
lib/isc/win32/DLLMain.c
lib/isc/win32/Makefile.in
lib/isc/win32/include/isc/platform.h.in
lib/isc/win32/ipv6.c
lib/isc/win32/ntgroups.c
lib/isc/win32/os.c
lib/isc/win32/socket.c
lib/isc/win32/version.c
lib/isc/win32/win32os.c
lib/isccc/Makefile.in
lib/isccc/version.c
lib/isccc/win32/DLLMain.c
lib/isccc/win32/version.c
lib/isccfg/Makefile.in
lib/isccfg/tests/Makefile.in
lib/isccfg/version.c
lib/isccfg/win32/DLLMain.c
lib/isccfg/win32/version.c
lib/ns/Makefile.in
lib/ns/tests/Makefile.in
lib/ns/version.c
lib/ns/win32/DLLMain.c
lib/ns/win32/version.c
lib/samples/Makefile-postinstall.in
lib/samples/Makefile.in
lib/win32/bindevt/bindevt.c
util/mksymtbl.pl
win32utils/Configure

index e47a9135385b6d4bb93d2f9fceeeb2a937a22f94..1f527b4ac6bb77e2f26c4a5ca40101119b006200 100644 (file)
@@ -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@
index 83daebfe4a31b4e611a2555a8e4d419971dcbfc9..d2a6b692b331158706df629d47f6aa8245fa75e5 100644 (file)
@@ -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@
index bf8664dafa45e855f4d42d6accc921a368c0a680..7571ab2ba7b376c5660e9116bb956a2183534ff1 100644 (file)
@@ -36,7 +36,7 @@
 #include <isc/time.h>
 #include <isc/util.h>
 
-#ifdef PKCS11CRYPTO
+#if HAVE_PKCS11
 #include <pk11/result.h>
 #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();
index af1452dbb3b99b39a9c4c6f3ffb5631c89eb5c14..64e3cb8bb5b6509a67af5c5e1953b61131074200 100644 (file)
@@ -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@
index 26512dede3645f5d892ab94d551efe5536bdd285..34adffdf69df2d2a777aeb12b781f4ffd3c82a29 100644 (file)
@@ -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 =
 
index 0ddd9b0f7a6d070ef3ab56c00aa4289bda306752..69d540ffe8b756c86e76ca7821bfde09dbfcf327 100644 (file)
@@ -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@
index ef8ceb6c1e6ab7200f2cce810262d8993be70d79..e980bd3c88a1c85b47bb30c4a74edbaa5e72d592 100644 (file)
@@ -86,7 +86,7 @@
 
 #include <dig/dig.h>
 
-#ifdef PKCS11CRYPTO
+#if HAVE_PKCS11
 #include <pk11/result.h>
 #endif
 
@@ -1340,7 +1340,7 @@ setup_libs(void) {
 
        debug("setup_libs()");
 
-#ifdef PKCS11CRYPTO
+#if HAVE_PKCS11
        pk11_result_register();
 #endif
        dns_result_register();
index afdb717c6c853cc3cd990b1aaf16cb358802f397..84cb2a9b8fba922f20ca3878a7e8e0ddecd52534 100644 (file)
@@ -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@
index ed111d423c7a3224175351ded465edae01e85e45..dc825d8eda64fdb724b55c44d275f4eef231a6fd 100644 (file)
@@ -53,7 +53,7 @@
 
 #include <dst/dst.h>
 
-#ifdef PKCS11CRYPTO
+#if HAVE_PKCS11
 #include <pk11/result.h>
 #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();
index 026a1a5309e1c7d3f17ef284631cc1a71826d10f..36165f586bc188737a33a3e608c9f9b2e72e6709 100644 (file)
@@ -41,7 +41,7 @@
 
 #include <dst/dst.h>
 
-#ifdef PKCS11CRYPTO
+#if HAVE_PKCS11
 #include <pk11/result.h>
 #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();
index 1920e070b420d642c3edb61c62e09bf16b056c17..c0d1c9acc55754bb7b0114290b51a262f2fd4173 100644 (file)
@@ -41,7 +41,7 @@
 
 #include <dst/dst.h>
 
-#ifdef PKCS11CRYPTO
+#if HAVE_PKCS11
 #include <pk11/result.h>
 #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();
index 0977a0cad173052209acdaeef0d7039d1f30e42a..2dc104ab30cbb9cd79ff078e452570d93d047460 100644 (file)
@@ -37,7 +37,7 @@
 
 #include <dst/dst.h>
 
-#ifdef PKCS11CRYPTO
+#if HAVE_PKCS11
 #include <pk11/result.h>
 #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 <engine>:\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,
index 935e1e4a86678879f83ad24919f88cfbb6c560c5..9a3a9197700e7dac60d3bbcb3d7215b4ac98d288 100644 (file)
@@ -52,7 +52,7 @@
 
 #include <dst/dst.h>
 
-#ifdef PKCS11CRYPTO
+#if HAVE_PKCS11
 #include <pk11/result.h>
 #endif
 
@@ -106,7 +106,7 @@ usage(void) {
        fprintf(stderr, "    -c <class>: (default: IN)\n");
        fprintf(stderr, "    -d <digest bits> (0 => max, default)\n");
        fprintf(stderr, "    -E <engine>:\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();
index 99954dad0b763d03691840534b990227b8dd04f7..170dd04b9ad671df6448bf908a9114e0c01d192d 100644 (file)
@@ -30,7 +30,7 @@
 
 #include <dst/dst.h>
 
-#ifdef PKCS11CRYPTO
+#if HAVE_PKCS11
 #include <pk11/result.h>
 #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();
index e2fcc4122779b2aefde42514fc0561f4f225862d..d5216626227c96de52e6399225f6f74277ba3cae 100644 (file)
@@ -33,7 +33,7 @@
 
 #include <dst/dst.h>
 
-#ifdef PKCS11CRYPTO
+#if HAVE_PKCS11
 #include <pk11/result.h>
 #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();
index 4ce8e9c9833a5c78728f744701377451102b2293..e22e6d391bb2b9b5cea91f4db2f0eed4706ef9f2 100644 (file)
@@ -79,7 +79,7 @@
 
 #include <dst/dst.h>
 
-#ifdef PKCS11CRYPTO
+#if HAVE_PKCS11
 #include <pk11/result.h>
 #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();
index b4a3339c0ad1aa4e349882b1cf54cde27273d68c..09e8e30c2d5266eb0a8ecc280fbb0c31ae709960 100644 (file)
@@ -61,7 +61,7 @@
 
 #include <dst/dst.h>
 
-#ifdef PKCS11CRYPTO
+#if HAVE_PKCS11
 #include <pk11/result.h>
 #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();
index db8e5464ef848e4ec75faec96b6b5f6ed90f88cd..f48e74928af4d796487e6793cba6dcc439930b16 100644 (file)
@@ -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 =
 
index 21c4f5e4e2805ae90b04d6e03bd6f5d71f74dc1a..a5f2c6d6441c6c9dcd8cb78c3b441218e4ffbbd7 100644 (file)
@@ -44,7 +44,7 @@
 #include <dns/view.h>
 
 #include <dst/result.h>
-#ifdef PKCS11CRYPTO
+#if HAVE_PKCS11
 #include <pk11/result.h>
 #endif
 
@@ -75,7 +75,7 @@
 #include <named/smf_globals.h>
 #endif
 
-#ifdef OPENSSL
+#if HAVE_OPENSSL
 #include <openssl/opensslv.h>
 #include <openssl/crypto.h>
 #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
 
index 30075e611b54e3b32de39b9ec0f4e46b3a134469..08d9dcd053bada7f0dbc20f67750b7dde71dcab3 100644 (file)
@@ -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@
index 81cdb1c5fe454c6c8ab175e7ddb7237d7e802604..60d0600c85bec1ec9d78863023053f92a660b388 100644 (file)
@@ -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@
index e93251894399300a03e98785d7e60504273e3f57..d33fc2094ac3dfd18ed0d98d2d5de74892794202 100644 (file)
@@ -15,7 +15,7 @@ top_srcdir =  @top_srcdir@
 
 CINCLUDES =    ${ISC_INCLUDES}
 
-CDEFINES =     @CRYPTO@
+CDEFINES =
 
 ISCLIBS =      ../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
 
index 51983483a959f00ad5b19d719d1a0f2f0b20b109..ba68e781f84415470df3ab862ab686a2fb8fb5db 100644 (file)
@@ -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@
index cf2e1bf0d45a75662845778954f7722adf68f00c..dd22d4e911c018d8a52c7a0d85e777caafd151af 100644 (file)
@@ -16,7 +16,7 @@ top_srcdir =  @top_srcdir@
 CINCLUDES =    ${DNS_INCLUDES} ${ISC_INCLUDES} ${ISCCFG_INCLUDES} \
                @DST_OPENSSL_INC@
 
-CDEFINES =     @CRYPTO@
+CDEFINES =
 CWARNINGS =
 BACKTRACECFLAGS = @BACKTRACECFLAGS@
 
index c0736eb17f42210b7f962fa4c5f4054dcdb26dda..ca0616b889fcca44d842a0bffd204e223fb043cb 100644 (file)
@@ -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@
index 29b1f3f0c706e20dc4693032c74c7040c5498ade..73e059670509c0c6693a4f652615e7993cc27d69 100644 (file)
@@ -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@
 
index 3ee3821eec927e7b2adaad97546117ddaf4a88e5..15f5460044bed439a92e48259b25a42f6ab9a5cd 100644 (file)
@@ -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@
 
index d40917fab7541d2242b29b331a6323c72350ce3d..a552f4667e04325d5485c4e64eedebf39f1c70d5 100644 (file)
@@ -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 =
index dd04bd7d6acb8493debd87878f4da5ac4cca53a7..db402cbe5d6a49829d0cd74105333529a1de3529 100644 (file)
@@ -16,7 +16,7 @@ VERSION=@BIND9_VERSION@
 @BIND9_MAKE_INCLUDES@
 
 CINCLUDES =    ${DNS_INCLUDES} ${ISC_INCLUDES} @DST_OPENSSL_INC@
-CDEFINES =     @CRYPTO@
+CDEFINES =
 CWARNINGS =
 
 LIBS =         @LIBS@
index c23e66430290ed91e407ccd63c010e7621ce9c20..b48f9017cebca1ddbad57b4bf262625117b09ac3 100644 (file)
@@ -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@
index f140d525db5775507e42702ce9665fb907850a0e..5392b2956e98558cccbab806aef862de1947523f 100644 (file)
@@ -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@
index 000958b21fe15f13c77f3347463567c0c0086508..999c1e6e9ff12ab087f1553bf7c204911012712c 100644 (file)
@@ -17,7 +17,7 @@ VERSION=@BIND9_VERSION@
 
 CINCLUDES =    ${ISC_INCLUDES}
 
-CDEFINES =     @CRYPTO@
+CDEFINES =
 CWARNINGS =
 
 ISCLIBS =      ../../../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
index f44619dfc25225eb749b1b5c0ae173f919d5ddc5..9ec63448cda68bc7e6388d8fc688f8d6f392090b 100644 (file)
@@ -17,7 +17,7 @@ VERSION=@BIND9_VERSION@
 
 CINCLUDES =     ${ISC_INCLUDES} ${DNS_INCLUDES}
 
-CDEFINES =     @CRYPTO@
+CDEFINES =
 CWARNINGS =
 
 DNSLIBS =
index 817522e6a704990d9b5135e212ccbf8d4168f235..378f48a56f189fa870d23aed891e967d2ad7b69f 100644 (file)
@@ -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@
index 4f7ea74fad4b682b922827df94e666409062e58c..9a0a4f2a651498ae17b15b45a31e4a4bf4878a9c 100644 (file)
@@ -12,8 +12,6 @@
 
 #include <config.h>
 
-#if defined(OPENSSL) || defined(PKCS11CRYPTO)
-
 #include <stdio.h>
 #include <stdlib.h>
 
@@ -40,7 +38,7 @@
 #include <dst/dst.h>
 #include <dst/result.h>
 
-#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 <openssl/err.h>
 #include <openssl/objects.h>
 #include <openssl/rsa.h>
@@ -220,20 +218,4 @@ main(int argc, char **argv) {
 }
 #endif
 
-#else /* OPENSSL || PKCS11CRYPTO */
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#include <isc/util.h>
-
-int
-main(int argc, char **argv) {
-       UNUSED(argc);
-       UNUSED(argv);
-       fprintf(stderr, "Compiled without Crypto\n");
-       exit(1);
-}
-
-#endif /* OPENSSL || PKCS11CRYPTO */
 /*! \file */
index 8a5dc7e0860f1f5ae3dccc5b46e1de58eee15a1c..750a7ffc37b55645cfe2af525d3ad5f326903c43 100644 (file)
@@ -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@
index 36471f2ef080dde96302e68387d544df7c7d1444..123805d068aeca836c4e0831253d949444574991 100644 (file)
@@ -9,6 +9,7 @@
  * information regarding copyright ownership.
  */
 
+#include <config.h>
 
 #define _GNU_SOURCE
 #include <sys/syscall.h>
index 861759283813ac7c7be2cadca0e45cf1898e0599..3ca94f53935d864b43128a13915a3aa6a88420c1 100644 (file)
@@ -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@
index 8f91f556d53322b84d0dd2a199ee285d629c765d..48a33fcb5ee90f3f3fa4c3b5cf42c2a79e900988 100644 (file)
@@ -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
index 5590de4e4f6e177ad9683afd99030cf8d913fe89..69e3c1fd3153b0e4c3d900903fc445b26d717957 100644 (file)
@@ -377,6 +377,9 @@ int sigwait(const unsigned int *set, int *sig);
 /* Define to 1 if you have the <net/route.h> 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
 
index 10f91bc6e6f6e1d9573376b34fe2c41b36a41406..4356a1a1998bfc53be6df4c5e5a48ad0b36df20a 100644 (file)
@@ -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@
 
index 3e345c0286efaace655a6c617a6cf63cbd1f4199..28840a8a9ca7543212be5b5e0ad7d9cfef70bc7a 100755 (executable)
--- 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.
index 88f28f4c68fca562295fef79ef39f63340339e93..9594c01630cc6d49f9d4cf35a120efc18d4c4b9a 100644 (file)
@@ -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 <openssl/opensslv.h>
@@ -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)
index 8c9823c97a0ee3297d1f3906ab68b6245e764238..abda98d107bfdde1b58fb59ffbb2f750f3e131c9 100644 (file)
@@ -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@
index 2a27b7e82e8680f2debd15554268947a13260b4e..2019e96d1c43813f0526a712ec7b2701699bfcf4 100644 (file)
@@ -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@
index 89003c73db83d3c6d8b7f4d3c2f4145279be2706..e365d9a0e9a53ca3115f3d569827d9379b20bca4 100644 (file)
@@ -11,6 +11,7 @@
 
 
 /*! \file */
+#include <config.h>
 
 #include <bind9/version.h>
 
index 8ff101757d0678de193c93453a4860e749c4bbd8..518039596c2fdec4a2323839f7cd469b2d5b7de1 100644 (file)
@@ -9,6 +9,7 @@
  * information regarding copyright ownership.
  */
 
+#include <config.h>
 
 #include <windows.h>
 #include <signal.h>
index 68ce9925bb95432f180ce5eae0b6869f82b0ab0d..2838b9d9ee54b49434dba2f50cec6892cbaa93ef 100644 (file)
@@ -9,6 +9,7 @@
  * information regarding copyright ownership.
  */
 
+#include <config.h>
 
 #include <versions.h>
 
index ab9428fa4e5c2392bdaa738b5b2ee556e0486df7..313c532474d412830bd376f2c2c0e3206e4ebd03 100644 (file)
@@ -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 =
 
index 8352a4265281748f2d952775780d7c1471702a79..0a66569ae5ea5019015242f270105cb76153caf8 100644 (file)
@@ -9,12 +9,12 @@
  * information regarding copyright ownership.
  */
 
+#include <config.h>
+
 /*! \file */
 
 #define DNS_NAME_USEINLINE 1
 
-#include <config.h>
-
 #include <isc/mem.h>
 #include <isc/string.h>
 #include <isc/util.h>
index 8f7e075b8d4e030705734d88616b859b30339a1e..3192d6f14dc633780ec4a328cb7c9f5bdb69886b 100644 (file)
@@ -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);
 }
 
index 732865fdf3c1d9ed2a340d63990d6d666bcf016e..534ae744c521d34190a370e632efd267226046ae 100644 (file)
@@ -47,7 +47,7 @@
 
 #include <dst/dst.h>
 
-#ifdef OPENSSL
+#if HAVE_OPENSSL
 #ifndef PK11_DH_DISABLE
 #include <openssl/dh.h>
 #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;
index 3be7b203532f6a30354517f790d585a58d377ca9..be36f098365592708da9e841ac5fe9a9092a6fd5 100644 (file)
  * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-#ifdef OPENSSL
-
 #include <config.h>
 
+#if HAVE_OPENSSL
+
 #include <isc/mem.h>
 #include <isc/mutex.h>
 #include <isc/mutexblock.h>
@@ -367,5 +367,5 @@ dst__openssl_getengine(const char *engine) {
 }
 #endif
 
-#endif /* OPENSSL */
+#endif /* HAVE_OPENSSL */
 /*! \file */
index b86d111dc3537988e695b24f9a18cfdf67c8e169..ade77076a1fca231c3f30da071251a244d627e1a 100644 (file)
  * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-#ifdef OPENSSL
-
 #include <config.h>
 
+#if HAVE_OPENSSL
+
 #include <pk11/site.h>
 
 #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 <isc/util.h>
 
 EMPTY_TRANSLATION_UNIT
 
-#endif /* OPENSSL */
+#endif /* HAVE_OPENSSL */
 /*! \file */
index 94279fb58e474d39b90d17db0827c55fe44108d0..cd5a60e82ce74974cd6909fce9fe1bcc4de261db 100644 (file)
  * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-#ifdef OPENSSL
-
 #include <config.h>
 
+#if HAVE_OPENSSL
+
 #include <pk11/site.h>
 
 #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 <isc/util.h>
 
 EMPTY_TRANSLATION_UNIT
 
-#endif /* OPENSSL */
+#endif /* HAVE_OPENSSL */
 /*! \file */
index 53cc9d52e432c3987714d7fb7e6a0f02c4efa2bf..1b803044ca503bb65497a6275f1c1c8b352946cc 100644 (file)
@@ -11,7 +11,7 @@
 
 #include <config.h>
 
-#if defined(OPENSSL) && defined(HAVE_OPENSSL_ECDSA)
+#if HAVE_OPENSSL && HAVE_OPENSSL_ECDSA
 
 #include <isc/mem.h>
 #include <isc/safe.h>
@@ -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 <isc/util.h>
 
 EMPTY_TRANSLATION_UNIT
 
-#endif /* HAVE_OPENSSL_ECDSA */
+#endif /* HAVE_OPENSSL && HAVE_OPENSSL_ECDSA */
 /*! \file */
index 3dd08afbc59ef65932597ab4421469fe53732279..be14f4180b6dc63c2d8179f87ea1ba22c83e3188 100644 (file)
@@ -11,8 +11,7 @@
 
 #include <config.h>
 
-#if defined(OPENSSL) && \
-    (defined(HAVE_OPENSSL_ED25519) || defined(HAVE_OPENSSL_ED448))
+#if HAVE_OPENSSL && (HAVE_OPENSSL_ED25519 || HAVE_OPENSSL_ED448)
 
 #include <isc/mem.h>
 #include <isc/safe.h>
@@ -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 <isc/util.h>
 
 EMPTY_TRANSLATION_UNIT
 
-#endif /* HAVE_OPENSSL_EDxxx */
+#endif /* HAVE_OPENSSL && (HAVE_OPENSSL_ED25519 || HAVE_OPENSSL_ED448) */
 /*! \file */
index 46a660bfddd0e89a91a26026496ec76df7982f24..847106b81505eb3e82fb1e14b0721be1c69092d9 100644 (file)
@@ -11,7 +11,7 @@
 
 #include <config.h>
 
-#if defined(OPENSSL) && defined(HAVE_OPENSSL_GOST)
+#if HAVE_OPENSSL && HAVE_OPENSSL_GOST
 
 #include <isc/mem.h>
 #include <isc/safe.h>
@@ -617,11 +617,11 @@ dst__opensslgost_init(dst_func_t **funcp) {
        return (ret);
 }
 
-#else /* HAVE_OPENSSL_GOST */
+#else /* HAVE_OPENSSL && HAVE_OPENSSL_GOST */
 
 #include <isc/util.h>
 
 EMPTY_TRANSLATION_UNIT
 
-#endif /* HAVE_OPENSSL_GOST */
+#endif /* HAVE_OPENSSL && HAVE_OPENSSL_GOST */
 /*! \file */
index 37d0362f61bb806d8ad9c3f9a7939934fc290862..0c7091e86d48dae62dbcd0531f5c3a1a88a8a84a 100644 (file)
@@ -9,9 +9,10 @@
  * information regarding copyright ownership.
  */
 
-#ifdef OPENSSL
 #include <config.h>
 
+#if HAVE_OPENSSL
+
 #include <isc/md5.h>
 #include <isc/mem.h>
 #include <isc/safe.h>
@@ -1188,11 +1189,11 @@ dst__opensslrsa_init(dst_func_t **funcp, unsigned char algorithm) {
        return (ISC_R_SUCCESS);
 }
 
-#else /* OPENSSL */
+#else /* HAVE_OPENSSL */
 
 #include <isc/util.h>
 
 EMPTY_TRANSLATION_UNIT
 
-#endif /* OPENSSL */
+#endif /* HAVE_OPENSSL */
 /*! \file */
index 714175356f8f67a1bbe88605a6988acec1b58853..c7e0072e0a54f9211fcccef10f22d5048d0da19c 100644 (file)
@@ -9,10 +9,10 @@
  * information regarding copyright ownership.
  */
 
-#ifdef PKCS11CRYPTO
-
 #include <config.h>
 
+#if HAVE_PKCS11
+
 #include <isc/util.h>
 
 #include <dns/log.h>
@@ -37,5 +37,5 @@ dst__pkcs11_toresult(const char *funcname, const char *file, int line,
        return (fallback);
 }
 
-#endif /* PKCS11CRYPTO */
+#endif /* HAVE_PKCS11 */
 /*! \file */
index c192b53e2f5d3b4e365eb7249f4edbd7ffb86892..9a55c06d1f85712cae197bb065a36c3149b7d9b5 100644 (file)
@@ -9,10 +9,10 @@
  * information regarding copyright ownership.
  */
 
-#ifdef PKCS11CRYPTO
-
 #include <config.h>
 
+#if HAVE_PKCS11
+
 #include <pk11/site.h>
 
 #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 <isc/util.h>
 
 EMPTY_TRANSLATION_UNIT
 
-#endif /* PKCS11CRYPTO */
+#endif /* HAVE_PKCS11 */
 /*! \file */
index 13a96567de3235b5b1aae34c09e9042ca2355876..23f383b1092a8d32f5c8b033874a044c58181f40 100644 (file)
@@ -9,10 +9,10 @@
  * information regarding copyright ownership.
  */
 
-#ifdef PKCS11CRYPTO
-
 #include <config.h>
 
+#if HAVE_PKCS11
+
 #include <pk11/site.h>
 
 #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 <isc/util.h>
 
 EMPTY_TRANSLATION_UNIT
 
-#endif /* PKCS11CRYPTO */
+#endif /* HAVE_PKCS11 */
 /*! \file */
index 308d9d3c9da7b95105302b957d8ebb7105754e7e..048eeede44293d6ff152d41a4104ac568a48303c 100644 (file)
@@ -11,7 +11,7 @@
 
 #include <config.h>
 
-#if defined(PKCS11CRYPTO) && defined(HAVE_PKCS11_ECDSA)
+#if HAVE_PKCS11 && defined(HAVE_PKCS11_ECDSA)
 
 #include <isc/mem.h>
 #include <isc/safe.h>
@@ -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 <isc/util.h>
 
 EMPTY_TRANSLATION_UNIT
 
-#endif /* PKCS11CRYPTO && HAVE_PKCS11_ECDSA */
+#endif /* HAVE_PKCS11 && HAVE_PKCS11_ECDSA */
 /*! \file */
index 6644338e5d15d72dbaf043a7cb2fd1dec8b1202c..342088ed4715d80c78438788334379ffb4819650 100644 (file)
@@ -11,7 +11,7 @@
 
 #include <config.h>
 
-#if defined(PKCS11CRYPTO) && \
+#if HAVE_PKCS11 && \
     defined(HAVE_PKCS11_ED25519) || defined(HAVE_PKCS11_ED448)
 
 #include <isc/mem.h>
@@ -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 <isc/util.h>
 
 EMPTY_TRANSLATION_UNIT
 
-#endif /* PKCS11CRYPTO && HAVE_PKCS11_EDxxx */
+#endif /* HAVE_PKCS11 && HAVE_PKCS11_EDxxx */
 /*! \file */
index 7a2f1397a426703c23771f75c516c9f491d4f6d6..48d51067dba67677504eb9bd1bc812337695efa5 100644 (file)
@@ -11,7 +11,7 @@
 
 #include <config.h>
 
-#if defined(PKCS11CRYPTO) && defined(HAVE_PKCS11_GOST)
+#if HAVE_PKCS11 && defined(HAVE_PKCS11_GOST)
 
 #include <isc/mem.h>
 #include <isc/safe.h>
@@ -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 <isc/util.h>
 
 EMPTY_TRANSLATION_UNIT
 
-#endif /* PKCS11CRYPTO && HAVE_PKCS11_GOST */
+#endif /* HAVE_PKCS11 && HAVE_PKCS11_GOST */
 /*! \file */
index 163517df26f4bb42febfa1aaf6f8417eda4e599a..30fd7eb0b6a5952b661468e6a3abc9ef750cf5eb 100644 (file)
@@ -9,11 +9,10 @@
  * information regarding copyright ownership.
  */
 
-
-#ifdef PKCS11CRYPTO
-
 #include <config.h>
 
+#if HAVE_PKCS11
+
 #include <isc/md5.h>
 #include <isc/sha1.h>
 #include <isc/sha2.h>
@@ -2225,11 +2224,11 @@ dst__pkcs11rsa_init(dst_func_t **funcp) {
        return (ISC_R_SUCCESS);
 }
 
-#else /* PKCS11CRYPTO */
+#else /* HAVE_PKCS11 */
 
 #include <isc/util.h>
 
 EMPTY_TRANSLATION_UNIT
 
-#endif /* PKCS11CRYPTO */
+#endif /* HAVE_PKCS11 */
 /*! \file */
index 79aa5e60d4c7cbe78a4a75593d15b0003b9fd002..227fab54cd472f04ce7da921800bfb7123d25b3e 100644 (file)
@@ -9,6 +9,8 @@
  * information regarding copyright ownership.
  */
 
+#include <config.h>
+
 /*! \file
  * \brief
  * Portable SPNEGO implementation.
  * harmless in any case.
  */
 
-#include <config.h>
-
 #include <stdlib.h>
 #include <errno.h>
 
index 6fbce55b8ff135f88efbb82b5e46c3235ed42440..fb51b0dfcb75d15526952b781e0911c80d4274a9 100644 (file)
@@ -9,6 +9,7 @@
  * information regarding copyright ownership.
  */
 
+#include <config.h>
 
 /*! \file
  * \brief Method routines generated from SPNEGO ASN.1 module.
index becfd1800ccb88fce040e48aed53480849afdef0..078de5982359e7cc3a3709a1ac80e199dc1571fc 100644 (file)
@@ -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@
index 9fa20ce7b767b2bd72b793133101897236726986..734aeac6b249724d83e04a65f507f64f3c4cebf6 100644 (file)
@@ -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);
index b09eeca68c49921f26c386839baa8fc8f90aa5f9..92a4f8fb865399ca336c6d44c65b01d5b15827f6 100644 (file)
@@ -18,8 +18,6 @@
 #include <unistd.h>
 #include <stdio.h>
 
-#if defined(OPENSSL) || defined(PKCS11CRYPTO)
-
 #include <isc/base64.h>
 #include <isc/buffer.h>
 #include <isc/util.h>
@@ -698,24 +696,10 @@ ATF_TC_BODY(nta, tc) {
        dns_test_end();
 }
 
-#else
-#include <isc/util.h>
-
-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());
 }
index 0c4d0841cc29b378a6637b53ce4e9a4f3ae62db8..2f88ecfe338a83ac03537c6a2a660d966554db7f 100644 (file)
@@ -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());
 }
index db48e8cd97ef442e6cc37599fed52288a62cac43..79eafd8c855ccbfe4576a88d60029c7041973e4f 100644 (file)
@@ -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());
 }
 
index f345b3c47b8677f981c08f709a363e7abb03e16a..6e0a4b182741ad0188426d3120b504fa4384e6ef 100644 (file)
@@ -17,7 +17,6 @@
 
 #include <isc/util.h>
 
-#if defined(OPENSSL) || defined(PKCS11CRYPTO)
 #include <string.h>
 
 #include <dns/db.h>
@@ -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());
 }
index 61b59c914276af869377371bcb23ce9a7b001b87..91437a6bc1e39ed7036dd1974ae9b4119b999cba 100644 (file)
@@ -44,7 +44,7 @@
 #define TEMP_BUFFER_SZ 8192
 #define TKEY_RANDOM_AMOUNT 16
 
-#ifdef PKCS11CRYPTO
+#if HAVE_PKCS11
 #include <pk11/pk11.h>
 #endif
 
index 68ae7fe291819545db8117f2a06960fb007bc30b..059ae884caad9c240c9645c3dab693058812aa33 100644 (file)
@@ -11,6 +11,7 @@
 
 
 /*! \file */
+#include <config.h>
 
 #include <dns/version.h>
 
index 8ff101757d0678de193c93453a4860e749c4bbd8..518039596c2fdec4a2323839f7cd469b2d5b7de1 100644 (file)
@@ -9,6 +9,7 @@
  * information regarding copyright ownership.
  */
 
+#include <config.h>
 
 #include <windows.h>
 #include <signal.h>
index 852f70e81b558fff790b301223e926f253e194b8..8bedd7ad5eac1eebfb8fa041d4a22aea8b98f054 100644 (file)
@@ -9,6 +9,7 @@
  * information regarding copyright ownership.
  */
 
+#include <config.h>
 
 #include <versions.h>
 
index fc114472df0da94be8914faea8ed87c57bc31e6e..9705a0bc4a0a46ad134ef5894e396d405a4633ad 100644 (file)
@@ -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
index c4e3b7fdb54b0824a68a4cd4e73a72ae0f1f24be..f1bd3c01c483c7b9e15288803287991279c4c8bc 100644 (file)
@@ -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@
index 4e33c7712e64c6764b69dc686dd7aa1315d1fd1d..2629d86c93fbe42974552878aa48fc71e4e18bd0 100644 (file)
@@ -9,6 +9,7 @@
  * information regarding copyright ownership.
  */
 
+#include <config.h>
 
 /*! \file */
 
index 8ff101757d0678de193c93453a4860e749c4bbd8..518039596c2fdec4a2323839f7cd469b2d5b7de1 100644 (file)
@@ -9,6 +9,7 @@
  * information regarding copyright ownership.
  */
 
+#include <config.h>
 
 #include <windows.h>
 #include <signal.h>
index 198e12d5dd7432b9084337e8f02261ef0eb8cd26..a69488b64d2239218f1682be37a7bf3e36adfa75 100644 (file)
@@ -9,6 +9,7 @@
  * information regarding copyright ownership.
  */
 
+#include <config.h>
 
 #include <versions.h>
 
index 33d871f0e4ca8e56c13aa91a0a70a43ac47dbbdf..64f5f4c9110c48d6b697261f7a1a994905784069 100644 (file)
@@ -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
index bf53df2529665caba475516fcc56395a27505c4a..2c344a8bfb32366f3f9df316f48d025f95fe8dea 100644 (file)
@@ -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 <pk11/pk11.h>
 #include <pk11/internal.h>
index 296ada28b917b2fe5b57aaa36b588e53c7fbcdee..4299b38c046ab3c0bc9d713ca955d5979dba9839 100644 (file)
@@ -9,6 +9,7 @@
  * information regarding copyright ownership.
  */
 
+#include <config.h>
 
 /*! \file
  * \brief
index fb526b3b1ffcbcd57da614ba78e0c6f6086ee46c..67c408af36b8d39a02b688e5f56d7678e1d816d5 100644 (file)
@@ -29,7 +29,7 @@
 #include <isc/types.h>
 #include <isc/util.h>
 
-#if PKCS11CRYPTO
+#if HAVE_PKCS11
 #include <pk11/internal.h>
 #include <pk11/pk11.h>
 #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
 
index b919d2c158b3c317e6049cb0cc901af7693aa16f..27b61230ee6c5fc5f07399583aa2cbbb61c07ef5 100644 (file)
@@ -27,7 +27,7 @@
 #include <isc/types.h>
 #include <isc/util.h>
 
-#if PKCS11CRYPTO
+#if HAVE_PKCS11
 #include <pk11/internal.h>
 #include <pk11/pk11.h>
 #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) || \
index 35207e4c3026a8492d4cbc6e5e739f53e61b9439..83f44db57dc3e9242901c16ab4bd62b44f05e8f2 100644 (file)
@@ -40,7 +40,7 @@ typedef struct {
 #endif
 } isc_hmacmd5_t;
 
-#elif PKCS11CRYPTO
+#elif HAVE_PKCS11
 #include <pk11/pk11.h>
 
 typedef pk11_context_t isc_hmacmd5_t;
index d5746130d8abb24ea133649e93fcc04e0d7ca341..1803f19dc1eedea9a88ea60cf8f4ca34697d122f 100644 (file)
@@ -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 <pk11/pk11.h>
 
 typedef pk11_context_t isc_hmacsha1_t;
index e5f46dd9c76cf8472c49011ad6dc924f0aa3fa7a..a2ec37f1c87af5cfa5aa12be37956220ff494788 100644 (file)
@@ -58,7 +58,7 @@ typedef struct {
 #endif
 } isc_md5_t;
 
-#elif PKCS11CRYPTO
+#elif HAVE_PKCS11
 #include <pk11/pk11.h>
 
 typedef pk11_context_t isc_md5_t;
index 822cbead76b1e66f935d098e0219457563338ee5..9a74ee64d53a36478b6fadefaf30026d1b844aed 100644 (file)
  ***** 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.
  ***/
index 41476307b1a1e14949ca9befdd6bbce009802389..724ed852ee35789c22e160f45cf7a3223fdd5bae 100644 (file)
@@ -39,7 +39,7 @@ typedef struct {
 #endif
 } isc_sha1_t;
 
-#elif PKCS11CRYPTO
+#elif HAVE_PKCS11
 #include <pk11/pk11.h>
 
 typedef pk11_context_t isc_sha1_t;
index c3807496dfadf8fbf3ed50eeeb2ad77cc863219e..8a19b27ccd67f990789950834d32c5ec82d273d4 100644 (file)
@@ -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 <pk11/pk11.h>
 
 typedef pk11_context_t isc_sha256_t;
index 740d863b1ba00715f0cf4d4a00b926556e566c1d..e3ccf27697f0e9309f4ed68bc9e39a995ef7e170 100644 (file)
@@ -40,7 +40,7 @@
 #include <isc/string.h>
 #include <isc/types.h>
 
-#if PKCS11CRYPTO
+#if HAVE_PKCS11
 #include <pk11/internal.h>
 #include <pk11/pk11.h>
 #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) {
index 1acb767561d500727dfa9ba28fe673f10bb01373..704deadbea5025ba5bf95f1a4997a19b0ff980e8 100644 (file)
@@ -16,7 +16,7 @@ CINCLUDES =   -I../unix/include \
                -I../include \
                -I${srcdir}/../include
 
-CDEFINES =     @CRYPTO@
+CDEFINES =
 CWARNINGS =
 
 OBJS =         msgcat.@O@
index 9f20d59831feb2c3a19b6d3971d4a364fc7d7e8b..c79477363e6ccdf789ff4aa17ecee8e684b09fca 100644 (file)
@@ -17,7 +17,7 @@ CINCLUDES =   -I${srcdir}/include \
                -I${srcdir}/../include \
                -I${srcdir}/..
 
-CDEFINES =     @CRYPTO@
+CDEFINES =
 CWARNINGS =
 
 THREADOPTOBJS = condition.@O@ mutex.@O@
index a0e5a7030c4c694d290b6fed69b069f89c99dfb3..9377b7220be3751b310aeeff240c36de6cb05497 100644 (file)
@@ -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
index c3ba6a04e3566cfc598ab65326ca6211494f5610..af4fd6ec2994fbc17a8b28c93b5e3d84a3c4bcb1 100644 (file)
@@ -17,7 +17,7 @@ CINCLUDES =   -I${srcdir}/include \
                -I${srcdir}/../include \
                -I${srcdir}/..
 
-CDEFINES =     @CRYPTO@
+CDEFINES =
 CWARNINGS =
 
 OBJS =         condition.@O@ mutex.@O@ thread.@O@
index cc6c3a280f32e191f3b41b44543829355221976b..3856adc8c3e8e474149f74e9880edacbc6f8bc8b 100644 (file)
 #include <stdlib.h>
 #include <unistd.h>
 
-#ifdef OPENSSL
+#if HAVE_OPENSSL
 #include <openssl/rand.h>
 #include <openssl/err.h>
-#endif /* ifdef OPENSSL */
+#endif /* ifdef HAVE_OPENSSL */
 
-#ifdef PKCS11CRYPTO
+#if HAVE_PKCS11
 #include <pk11/pk11.h>
-#endif /* ifdef PKCS11CRYPTO */
+#endif /* if HAVE_PKCS11 */
 
 #if defined(__linux__)
 # include <errno.h>
@@ -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) */  
 
index 3314c4ee296d6a725ddc913c7289cb853441a1fd..66371ece48061b453296db34eaf8340b425c7989 100644 (file)
@@ -37,7 +37,7 @@
 #include <isc/types.h>
 #include <isc/util.h>
 
-#if PKCS11CRYPTO
+#if HAVE_PKCS11
 #include <pk11/internal.h>
 #include <pk11/pk11.h>
 #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) {
index 50d87158ed74e4a5254fdb65ab91a9153a38e2c8..cb413211a41256ece5bff15c790edc449620a256 100644 (file)
@@ -57,7 +57,7 @@
 #include <isc/string.h>
 #include <isc/util.h>
 
-#if PKCS11CRYPTO
+#if HAVE_PKCS11
 #include <pk11/internal.h>
 #include <pk11/pk11.h>
 #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));
index 382432a61fee89c4fa398ff050256406a95e6356..c4c1707a60715aeb1a8477fcd97a67c0c8790ee3 100644 (file)
@@ -9,6 +9,8 @@
  * information regarding copyright ownership.
  */
 
+#include <config.h>
+
 /*
  * Copyright (c) 1990, 1993
  *     The Regents of the University of California.  All rights reserved.
index ff22d2246252ebc0892ad35984bbf1e13fe503b1..58b3e4f4a675f15d6455b1268e3f763449d98e0c 100644 (file)
@@ -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@
index f0929c1c842824801eae4e0b9c01e7e00648aa5e..636c97d9dbdf3ca1b7ae987df72176884b090a81 100644 (file)
@@ -17,7 +17,7 @@ CINCLUDES =   -I${srcdir}/include \
                -I${srcdir}/../include \
                -I${srcdir}/.. @ISC_OPENSSL_INC@
 
-CDEFINES =     @CRYPTO@
+CDEFINES =
 CWARNINGS =
 
 # Alphabetically
index e75ec0a11c69994c6349df3f096019c3b2bd6924..dd115af2afce2ee3556d6431f094e3bcad52d7f7 100644 (file)
@@ -9,6 +9,7 @@
  * information regarding copyright ownership.
  */
 
+#include <config.h>
 
 /*! \file
  * \brief
index b8a1fa3cdd1a3d7909297c5355e57080725fc518..a1700328c711aa7e16d800dceefc594f5bdb3a71 100644 (file)
@@ -9,6 +9,7 @@
  * information regarding copyright ownership.
  */
 
+#include <config.h>
 
 #include <isc/print.h>
 
index 7ff5a00fb2ba163e20d3cdd4d924dcd67966979c..0d6019b5b95883ca67318ea8ac308a057da4daa2 100644 (file)
@@ -9,6 +9,7 @@
  * information regarding copyright ownership.
  */
 
+#include <config.h>
 
 /*! \file
  * \brief
index 3a83a39fcb349db97e7481eef4d78a8c5067ccfb..8efdbe68ea29fedf967fa0daf2f31376012e8e48 100644 (file)
@@ -11,6 +11,7 @@
 
 
 /*! \file */
+#include <config.h>
 
 #include <isc/version.h>
 
index f14260e9f96ed35ff34f59426286aa7f3ecede4f..5361c9660b90e9583b24669a55cd190df21c6ba1 100644 (file)
@@ -9,6 +9,7 @@
  * information regarding copyright ownership.
  */
 
+#include <config.h>
 
 #include <windows.h>
 #include <stdio.h>
index 1c5d56793bcb0ce4963e26e8aa0faffca28e0883..19b46bdec4b8191743bb871160cc121dda00b56c 100644 (file)
@@ -15,7 +15,7 @@ CINCLUDES =   -I${srcdir}/.. \
                -I./include \
                -I${srcdir}/include \
                -I${srcdir}/../include
-CDEFINES =     @CRYPTO@
+CDEFINES =
 CWARNINGS =
 
 # Alphabetically
index b34e99b3e25ffd2479ea89150a5169f73cd416da..d7f94a6ff09e1c602f6c446b8838b38d662f570d 100644 (file)
 #endif
 #endif
 
-/***
- *** Enforce OpenSSL or PKCS#11 cryptography
- ***/
-
-#if !defined(OPENSSL) && !defined(PKCS11CRYPTO)
-#error No cryptography library has been found or provided.
-#endif
-
 /***
  *** Network.
  ***/
index c2a4ac5b991a43317dab63fc1854684f39638323..048315e7fa20500d4087711bb8ed6523c9d1a3b0 100644 (file)
@@ -9,6 +9,7 @@
  * information regarding copyright ownership.
  */
 
+#include <config.h>
 
 #include <isc/net.h>
 #include <isc/platform.h>
index e3a45ca5108651034ad4b3bbc01e729e75934536..217243cad86fe8e889cb2d2684a9f9665ada2125 100644 (file)
@@ -9,6 +9,7 @@
  * information regarding copyright ownership.
  */
 
+#include <config.h>
 
 /*
  * The NT Groups have two groups that are not well documented and are
index 0f4023f4a3e104ef6d2c2cf84ee6bce78846ee85..f06bcd54191917003d23040c331078d91fff75ae 100644 (file)
@@ -9,6 +9,7 @@
  * information regarding copyright ownership.
  */
 
+#include <config.h>
 
 #include <windows.h>
 
index 67e626c4e0dd2e17491a2543b109510423fde655..e125a7d52dbf391755ac1d95c91529caf64ee2b8 100644 (file)
@@ -9,6 +9,8 @@
  * information regarding copyright ownership.
  */
 
+#include <config.h>
+
 /* This code uses functions which are only available on Server 2003 and
  * higher, and Windows XP and higher.
  *
index d86c7812401560ef8d42cb84d59b23bab8191373..83e292bc60ecf41ed9f7dc6aa4ede7e603e222f2 100644 (file)
@@ -9,6 +9,7 @@
  * information regarding copyright ownership.
  */
 
+#include <config.h>
 
 #include <versions.h>
 
index 9af95c804b4f2af7206a00d88bc7e66eb1cc0789..cddb714fed95f0982282d696207226e18028cfb2 100644 (file)
@@ -9,6 +9,8 @@
  * information regarding copyright ownership.
  */
 
+#include <config.h>
+
 #include <windows.h>
 
 #ifndef TESTVERSION
index c34a685cf74341babb23c39b0f2cc8eda3f468fb..ad8346a52454758da49960c19a09c8497e08aa84 100644 (file)
@@ -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@
index a3c1d9bc42ff481567af6e7da6182b4609c0cd79..0b5aa0c1818a8ef30821269dee97caa4953cf92e 100644 (file)
@@ -12,6 +12,8 @@
 
 /*! \file */
 
+#include <config.h>
+
 #include <isccc/version.h>
 
 const char isccc_version[] = VERSION;
index 8ff101757d0678de193c93453a4860e749c4bbd8..518039596c2fdec4a2323839f7cd469b2d5b7de1 100644 (file)
@@ -9,6 +9,7 @@
  * information regarding copyright ownership.
  */
 
+#include <config.h>
 
 #include <windows.h>
 #include <signal.h>
index dfdd947a77c18147188127403ec10b51f44006a5..c1c967b4f83dcbc631d410cf7e688f98909ece65 100644 (file)
@@ -9,6 +9,7 @@
  * information regarding copyright ownership.
  */
 
+#include <config.h>
 
 #include <versions.h>
 
index 62dbef000a4bbd8d9cf96f2a5d9ac7b14140e1e0..4625fcd97b26dcb63c48ef04feabd1cdd4a9f630 100644 (file)
@@ -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@
index f1ef64386e36fb56735b4152e9fa33a08e363643..43a58a579a69713359e60780d2697f59fba7cf1f 100644 (file)
@@ -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@
index 51ed4b53e7244b34d9ca979586387737fc316513..ac9b517b47b4c9799de6376b84bd5e10d04a738d 100644 (file)
@@ -11,6 +11,7 @@
 
 
 /*! \file */
+#include <config.h>
 
 #include <isccfg/version.h>
 
index 93c2893b1e04cba71a67983570f41ad79effca39..bf0d1ae562638c9d622746184a00ab36a2f01fc1 100644 (file)
@@ -9,6 +9,7 @@
  * information regarding copyright ownership.
  */
 
+#include <config.h>
 
 #include <windows.h>
 #include <signal.h>
index 4a69e878f7d2231ac41ee9f3f0a9e86639cc9942..82f9027034b3222d0901bb499999904b975741e5 100644 (file)
@@ -9,6 +9,7 @@
  * information regarding copyright ownership.
  */
 
+#include <config.h>
 
 #include <versions.h>
 
index 1b26c0cbca3d8458ab12d9810fc4e8fba513fbf7..e81eeb33673111e69ecc2f1f9d163803ac85ca9a 100644 (file)
@@ -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 =
 
index 7da7f8c54eb5a0f7f95871ef6fa5b60ade8af6f4..564181fc4800913ea0d2b2633035b0743bf7b39e 100644 (file)
@@ -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@
index 7df021564c9773e8c5d1d7e38c3eff2dcdfafe16..da692b25ce9c908eeb0fbfef58267322e6eb92aa 100644 (file)
@@ -10,6 +10,7 @@
  */
 
 /*! \file */
+#include <config.h>
 
 #include <ns/version.h>
 
index 8ff101757d0678de193c93453a4860e749c4bbd8..518039596c2fdec4a2323839f7cd469b2d5b7de1 100644 (file)
@@ -9,6 +9,7 @@
  * information regarding copyright ownership.
  */
 
+#include <config.h>
 
 #include <windows.h>
 #include <signal.h>
index f506fa1ddb8fa2ce0fdf81a6dfd98f9cef657f2d..c4e8c5ac50fe57e665214c512dc562e17e1b27c9 100644 (file)
@@ -10,6 +10,7 @@
  */
 
 /*! \file */
+#include <config.h>
 
 #include <versions.h>
 
index 8d5421f98c92090812a1202e4c78f72b159a5ec9..cf114da6a15956f596a04ea8408bcf599fa02e95 100644 (file)
@@ -11,7 +11,7 @@ srcdir =      @srcdir@
 #prefix =      @prefix@
 #exec_prefix = @exec_prefix@
 
-CDEFINES =     @CRYPTO@
+CDEFINES =
 CWARNINGS =
 
 DNSLIBS =      -ldns @DNS_CRYPTO_LIBS@
index 7c8827ca253612ccbc2210e82302c4b2238fd0d9..1c6542c405bd7322cdcc8675e0ed60cd2a14b91b 100644 (file)
@@ -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 =
 
index d74a2f1c3d548bbb669f8315b813d000ac1922a5..ec4ec03eef509534cda9dcd83186ccec78f10da3 100644 (file)
@@ -9,7 +9,6 @@
  * information regarding copyright ownership.
  */
 
-
 /*
  * bindevt.c : Defines the entry point for event log viewer DLL.
  */
index 47941da7d836a6bd8a982ee9569e07cc5717e73b..a7068f53255effb34b3d70e3b0120dfeb32d91a4 100755 (executable)
@@ -103,6 +103,7 @@ sub lhex {
 }
 
 print TBLFILE "/*\n * Generated by $rev \n */\n";
+print TBLFILE "#include <config.h>\n";
 print TBLFILE "#include <isc/backtrace.h>\n";
 print TBLFILE "const int isc__backtrace_nsymbols = $nsyms;\n";
 print TBLFILE "const isc_backtrace_symmap_t isc__backtrace_symtable[] = {\n";
index 88e80e1b0b9b2902ffc6e7a14b0eb2cc0dada6d6..62e965ff35393f6a25a992b1a8532f55f08b7e71 100644 (file)
@@ -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") {