Commit 7ee8a7e6 authored by Ondřej Surý's avatar Ondřej Surý Committed by Evan Hunt
Browse files

address win32 build issues

- 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
parent 9b6b11f0
......@@ -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@
......
......@@ -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@
......
......@@ -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();
......
......@@ -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@
......
......@@ -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 =
......
......@@ -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@
......
......@@ -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();
......
......@@ -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@
......
......@@ -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();
......
......@@ -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();
......
......@@ -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();
......
......@@ -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,
......
......@@ -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();
......
......@@ -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();
......
......@@ -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();
......
......@@ -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();
......
......@@ -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();
......
......@@ -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 =
......
......@@ -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
......
......@@ -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@
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment