]> granicus.if.org Git - pdns/commitdiff
dnsdist: Build without DNSCrypt support
authorRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 23 Mar 2018 17:58:57 +0000 (18:58 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 23 Mar 2018 17:58:57 +0000 (18:58 +0100)
pdns/dnsdist-lua.cc

index 0e573f16d172cdf79aa0d720c0be4df31c8a6b49..72d25d7df7633a59e68de838b884be8f7c832f16 100644 (file)
@@ -1029,9 +1029,9 @@ void setupLuaConfig(bool client)
 #endif
     });
 
+#ifdef HAVE_DNSCRYPT
   g_lua.writeFunction("generateDNSCryptCertificate", [](const std::string& providerPrivateKeyFile, const std::string& certificateFile, const std::string privateKeyFile, uint32_t serial, time_t begin, time_t end, boost::optional<DNSCryptExchangeVersion> version) {
       setLuaNoSideEffect();
-#ifdef HAVE_DNSCRYPT
       DNSCryptPrivateKey privateKey;
       DNSCryptCert cert;
 
@@ -1045,10 +1045,8 @@ void setupLuaConfig(bool client)
         errlog(e.what());
         g_outputBuffer="Error: "+string(e.what())+"\n";
       }
-#else
-      g_outputBuffer="Error: DNSCrypt support is not enabled.\n";
-#endif
     });
+#endif
 
   g_lua.writeFunction("showPools", []() {
       setLuaNoSideEffect();