From: Peter van Dijk Date: Thu, 16 May 2013 12:36:48 +0000 (+0200) Subject: add DS digest type 4 to show-zone output; add algorithm names. Based on a patch by... X-Git-Tag: auth-3.3-rc1~49 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e0ad7bb1f8b5837f6030289cba35d1ad1a5d5ada;p=thirdparty%2Fpdns.git add DS digest type 4 to show-zone output; add algorithm names. Based on a patch by @cmouse, closes #744 --- diff --git a/pdns/pdnssec.cc b/pdns/pdnssec.cc index 796eb5c9cf..c93561f195 100644 --- a/pdns/pdnssec.cc +++ b/pdns/pdnssec.cc @@ -42,6 +42,49 @@ string humanTime(time_t t) return ret; } +static void algorithm2name(uint8_t algo, string &name) { + switch(algo) { + case 0: + name = "Reserved"; return; + case 1: + name = "RSAMD5"; return; + case 2: + name = "DH"; return; + case 3: + name = "DSA"; return; + case 4: + name = "ECC"; return; + case 5: + name = "RSASHA1"; return; + case 6: + name = "DSA-NSEC3-SHA1"; return; + case 7: + name = "RSASHA1-NSEC3-SHA1"; return; + case 8: + name = "RSASHA256"; return; + case 9: + name = "Reserved"; return; + case 10: + name = "RSASHA512"; return; + case 11: + name = "Reserved"; return; + case 12: + name = "ECC-GOST"; return; + case 13: + name = "ECDSAP256SHA256"; return; + case 14: + name = "ECDSAP384SHA384"; return; + case 252: + name = "INDIRECT"; return; + case 253: + name = "PRIVATEDNS"; return; + case 254: + name = "PRIVATEOID"; return; + default: + name = "Unallocated/Reserved"; return; + } +}; + static int shorthand2algorithm(const string &algorithm) { if (!algorithm.compare("rsamd5")) return 1; @@ -559,15 +602,24 @@ void showZone(DNSSECKeeper& dk, const std::string& zone) cout << "keys: "<