]> granicus.if.org Git - pdns/commitdiff
dnsdist: Be a bit more explicit about what failed in testCrypto()
authorRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 4 Jul 2019 11:43:11 +0000 (13:43 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 4 Jul 2019 11:43:11 +0000 (13:43 +0200)
pdns/dnsdist-lua.cc

index 9165ab1eed75e93f80c1db87cff5c12bf687e33a..883e5194b9b7c4f0100638dc446bd7e78f0c22f9 100644 (file)
@@ -897,8 +897,10 @@ void setupLuaConfig(bool client)
        if(testmsg == decrypted)
         g_outputBuffer="Everything is ok!\n";
        else
-        g_outputBuffer="Crypto failed..\n";
-
+        g_outputBuffer="Crypto failed.. (the decoded value does not match the cleartext one)\n";
+     }
+     catch(const std::exception& e) {
+       g_outputBuffer="Crypto failed: "+std::string(e.what())+"\n";
      }
      catch(...) {
        g_outputBuffer="Crypto failed..\n";