]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Fix building with DoQ but without DoH or DoT 13524/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 21 Nov 2023 13:59:22 +0000 (14:59 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 21 Nov 2023 13:59:22 +0000 (14:59 +0100)
Reported by Oto Šťáva on the mailing-list, thanks!

pdns/dnsdist-lua.cc
pdns/dnsdistdist/configure.ac

index 157076025c22fad38bb4a5b63aaac04e137b87a8..396ba3e9d9035cb85ffe6add69210d4ce606fa59 100644 (file)
@@ -130,7 +130,7 @@ static void parseLocalBindVars(boost::optional<localbind_t>& vars, bool& reusePo
   }
 }
 
-#if defined(HAVE_DNS_OVER_TLS) || defined(HAVE_DNS_OVER_HTTPS)
+#if defined(HAVE_DNS_OVER_TLS) || defined(HAVE_DNS_OVER_HTTPS) || defined(HAVE_DNS_OVER_QUIC)
 static bool loadTLSCertificateAndKeys(const std::string& context, std::vector<TLSCertKeyPair>& pairs, const boost::variant<std::string, std::shared_ptr<TLSCertKeyPair>, LuaArray<std::string>, LuaArray<std::shared_ptr<TLSCertKeyPair>>>& certFiles, const LuaTypeOrArrayOf<std::string>& keyFiles)
 {
   if (certFiles.type() == typeid(std::string) && keyFiles.type() == typeid(std::string)) {
index 8de53ba3689ce2a5de80788ffe63d4cad26da96a..9b3055c496ef0dc4f0863f7d9c6d40457aa8af84 100644 (file)
@@ -83,9 +83,11 @@ PDNS_ENABLE_DNS_OVER_TLS
 DNSDIST_ENABLE_DNS_OVER_HTTPS
 DNSDIST_ENABLE_DNS_OVER_QUIC
 
-AS_IF([test "x$enable_dns_over_tls" != "xno" -o "x$enable_dns_over_https" != "xno"], [
+AS_IF([test "x$enable_dns_over_tls" != "xno" -o "x$enable_dns_over_https" != "xno" -o "x$enable_dns_over_quic" != "xno" ], [
   PDNS_WITH_LIBSSL
-  PDNS_WITH_GNUTLS
+  AS_IF([test "x$enable_dns_over_tls" != "xno" -o "x$enable_dns_over_https" != "xno"], [
+    PDNS_WITH_GNUTLS
+  ])
 ])
 
 AS_IF([test "x$enable_dns_over_tls" != "xno"], [
@@ -111,6 +113,9 @@ AS_IF([test "x$enable_dns_over_quic" != "xno"], [
   AS_IF([test "x$HAVE_QUICHE" != "x1"], [
     AC_MSG_ERROR([DNS over QUIC support requested but quiche was not found])
   ])
+  AS_IF([test "x$HAVE_LIBSSL" != "x1"], [
+    AC_MSG_ERROR([DNS over QUIC support requested but OpenSSL is not available])
+  ])
 ])
 
 DNSDIST_WITH_CDB