From 4b7f05f6a8d7db01a5956996946474d217acbe7d Mon Sep 17 00:00:00 2001 From: Willem Toorop Date: Wed, 30 Nov 2016 13:45:13 +0100 Subject: [PATCH] Fix pos. of USE_DANE and USE_DANE_VERIFY #ifdef's --- examples/ldns-dane.c | 5 +++++ ldns/dane.h | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/examples/ldns-dane.c b/examples/ldns-dane.c index 242ff325..56ca3683 100644 --- a/examples/ldns-dane.c +++ b/examples/ldns-dane.c @@ -1932,6 +1932,7 @@ main(int argc, char* const* argv) verify_server_name, name); break; +#ifdef USE_DANE_VERIFY case VERIFY: #if OPENSSL_VERSION_NUMBER < 0x10100000 if (! dane_verify(tlsas, address, @@ -1946,6 +1947,7 @@ main(int argc, char* const* argv) ssl_interact(ssl); } break; +#endif /* USE_DANE_VERIFY */ default: break; /* suppress warning */ } @@ -2003,6 +2005,9 @@ main(int argc, char **argv) int main(int argc, char **argv) { + (void)argc; + (void)argv; + fprintf(stderr, "dane support was disabled with this build of ldns, " "and has not been compiled in\n"); return 1; diff --git a/ldns/dane.h b/ldns/dane.h index 38892e37..142afb8d 100644 --- a/ldns/dane.h +++ b/ldns/dane.h @@ -22,7 +22,6 @@ #ifndef LDNS_DANE_H #define LDNS_DANE_H -#if LDNS_BUILD_CONFIG_USE_DANE #include #include @@ -116,6 +115,7 @@ enum ldns_enum_dane_transport typedef enum ldns_enum_dane_transport ldns_dane_transport; +#if LDNS_BUILD_CONFIG_USE_DANE /** * Creates a dname consisting of the given name, prefixed by the service port * and type of transport: _port._transport.name. @@ -280,11 +280,11 @@ ldns_status ldns_dane_verify(const ldns_rr_list* tlsas, X509* cert, STACK_OF(X509)* extra_certs, X509_STORE* pkix_validation_store); #endif /* LDNS_BUILD_CONFIG_HAVE_SSL */ +#endif /* LDNS_BUILD_CONFIG_USE_DANE */ #ifdef __cplusplus } #endif -#endif /* LDNS_BUILD_CONFIG_USE_DANE */ #endif /* LDNS_DANE_H */ -- 2.47.3