]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
Fix pos. of USE_DANE and USE_DANE_VERIFY #ifdef's
authorWillem Toorop <willem@nlnetlabs.nl>
Wed, 30 Nov 2016 12:45:13 +0000 (13:45 +0100)
committerWillem Toorop <willem@nlnetlabs.nl>
Wed, 30 Nov 2016 12:45:13 +0000 (13:45 +0100)
examples/ldns-dane.c
ldns/dane.h

index 242ff3257711876f8feb2af18485f474b14b37a1..56ca368317052d5e74258de3c1d58f673b0a0dc7 100644 (file)
@@ -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;
index 38892e374a086d6fd159fd7d2ca8b9f83ec34537..142afb8d21b54422febbc7cb6b77b6d58ae958ad 100644 (file)
@@ -22,7 +22,6 @@
 
 #ifndef LDNS_DANE_H
 #define LDNS_DANE_H
-#if LDNS_BUILD_CONFIG_USE_DANE
 
 #include <ldns/common.h>
 #include <ldns/rdata.h>
@@ -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: _<EM>port</EM>._<EM>transport</EM>.<EM>name</EM>.
@@ -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 */