Skip to content

Commit

Permalink
Merge pull request #6382 from rgacogne/dnsdist-nodnscrypt
Browse files Browse the repository at this point in the history
dnsdist: Fix building when DNSCrypt support is not enabled
  • Loading branch information
rgacogne committed Mar 24, 2018
2 parents c298c4d + 501983c commit 231f69a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pdns/dnsdist-lua.cc
Expand Up @@ -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;

Expand All @@ -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();
Expand Down

0 comments on commit 231f69a

Please sign in to comment.