return ret;
}
+string DNSCryptoKeyEngine::listSupportedAlgoNames()
+{
+ set<unsigned int> algos;
+ auto pairs = DNSCryptoKeyEngine::listAllAlgosWithBackend();
+ for (const auto& pair : pairs) {
+ algos.insert(pair.first);
+ }
+ string ret;
+ bool first = true;
+ for (auto algo : algos) {
+ if (!first) {
+ ret.append(" ");
+ }
+ else {
+ first = false;
+ }
+ ret.append(DNSSECKeeper::algorithm2name(algo));
+ if (isAlgorithmSwitchedOff(algo)) {
+ ret.append("(disabled)");
+ }
+ }
+ ret.append("\n");
+ return ret;
+}
+
void DNSCryptoKeyEngine::report(unsigned int algo, maker_t* maker, bool fallback)
{
getAllMakers()[algo].push_back(maker);
static bool testOne(int algo);
static bool verifyOne(unsigned int algo);
static void testVerify(unsigned int algo, maker_t* verifier);
+ static string listSupportedAlgoNames();
private:
using makers_t = std::map<unsigned int, maker_t *>;
Shows a list of supported commands understood by the running
:program:`pdns_recursor`
+list-dnssec-algos
+ List supported (and potentially disabled) DNSSEC algorithms.
+
ping
Check if server is alive.
if (!::arg()["dnssec-disabled-algorithms"].empty()) {
automatic = false;
stringtok(nums, ::arg()["dnssec-disabled-algorithms"], ", ");
- for (auto num: nums) {
+ for (const auto& num: nums) {
DNSCryptoKeyEngine::switchOffAlgorithm(pdns::checked_stoi<unsigned int>(num));
}
} else {
"get-remotelogger-stats get remote logger statistics\n"
"hash-password [work-factor] ask for a password then return the hashed version\n"
"help get this list\n"
+ "list-dnssec-algos list supported DNSSEC algorithms\n"
"ping check that all threads are alive\n"
"quit stop the recursor daemon\n"
"quit-nicely stop the recursor daemon nicely\n"
if (cmd == "get-remotelogger-stats") {
return {0, getRemoteLoggerStats()};
}
+ if (cmd == "list-dnssec-algos") {
+ return {0, DNSCryptoKeyEngine::listSupportedAlgoNames() };
+ }
return {1, "Unknown command '" + cmd + "', try 'help'\n"};
}