From: Willem Toorop Date: Wed, 30 Nov 2016 12:45:13 +0000 (+0100) Subject: Fix pos. of USE_DANE and USE_DANE_VERIFY #ifdef's X-Git-Tag: release-1.7.0-rc1~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4b7f05f6a8d7db01a5956996946474d217acbe7d;p=thirdparty%2Fldns.git Fix pos. of USE_DANE and USE_DANE_VERIFY #ifdef's --- 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 */