From c115b70fec1b28c1084718f09ee599e77d294c53 Mon Sep 17 00:00:00 2001 From: Shreyas Zare Date: Sat, 6 Nov 2021 13:31:25 +0530 Subject: [PATCH] zone.js: added support for DNSSEC records. --- DnsServerCore/www/js/zone.js | 83 ++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) diff --git a/DnsServerCore/www/js/zone.js b/DnsServerCore/www/js/zone.js index 25d2d02a..0b24d103 100644 --- a/DnsServerCore/www/js/zone.js +++ b/DnsServerCore/www/js/zone.js @@ -912,6 +912,89 @@ function showEditZone(domain) { "data-record-port=\"" + htmlEncode(records[i].rData.port) + "\" "; break; + case "DS": + tableHtmlRows += "Key Tag: " + htmlEncode(records[i].rData.keyTag) + + "
Algorithm: " + htmlEncode(records[i].rData.algorithm) + + "
Digest Type: " + htmlEncode(records[i].rData.digestType) + + "
Digest: " + htmlEncode(records[i].rData.digest); + + if ((records[i].comments != null) && (records[i].comments.length > 0)) + tableHtmlRows += "

Comments:
" + htmlEncode(records[i].comments) + "
"; + + tableHtmlRows += ""; + + additionalDataAttributes = "data-record-key-tag=\"" + htmlEncode(records[i].rData.keyTag) + "\" " + + "data-record-algorithm=\"" + htmlEncode(records[i].rData.algorithm) + "\" " + + "data-record-digest-type=\"" + htmlEncode(records[i].rData.digestType) + "\" " + + "data-record-digest=\"" + htmlEncode(records[i].rData.digest) + "\" "; + break; + + case "RRSIG": + tableHtmlRows += "Type Covered: " + htmlEncode(records[i].rData.typeCovered) + + "
Algorithm: " + htmlEncode(records[i].rData.algorithm) + + "
Labels: " + htmlEncode(records[i].rData.labels) + + "
Original TTL: " + htmlEncode(records[i].rData.originalTtl) + + "
Signature Expiration: " + htmlEncode(records[i].rData.signatureExpiration) + + "
Signature Inception: " + htmlEncode(records[i].rData.signatureInception) + + "
Key Tag: " + htmlEncode(records[i].rData.keyTag) + + "
Signer's Name: " + htmlEncode(records[i].rData.signersName) + + "
Signature: " + htmlEncode(records[i].rData.signature); + + if ((records[i].comments != null) && (records[i].comments.length > 0)) + tableHtmlRows += "

Comments:
" + htmlEncode(records[i].comments) + "
"; + + tableHtmlRows += ""; + + additionalDataAttributes = "data-record-type-covered=\"" + htmlEncode(records[i].rData.typeCovered) + "\" " + + "data-record-algorithm=\"" + htmlEncode(records[i].rData.algorithm) + "\" " + + "data-record-labels=\"" + htmlEncode(records[i].rData.labels) + "\" " + + "data-record-original-ttl=\"" + htmlEncode(records[i].rData.originalTtl) + "\" " + + "data-record-signature-expiration=\"" + htmlEncode(records[i].rData.signatureExpiration) + "\" " + + "data-record-signature-inception=\"" + htmlEncode(records[i].rData.signatureInception) + "\" " + + "data-record-key-tag=\"" + htmlEncode(records[i].rData.keyTag) + "\" " + + "data-record-signers-name=\"" + htmlEncode(records[i].rData.signersName) + "\" " + + "data-record-signature=\"" + htmlEncode(records[i].rData.signature) + "\" "; + break; + + case "NSEC": + var nsecTypes = null; + + for (var j = 0; j < records[i].rData.types.length; j++) { + if (nsecTypes == null) + nsecTypes = records[i].rData.types[j]; + else + nsecTypes += ", " + records[i].rData.types[j]; + } + + tableHtmlRows += "Next Domain Name: " + htmlEncode(records[i].rData.nextDomainName) + + "
Types: " + htmlEncode(nsecTypes); + + if ((records[i].comments != null) && (records[i].comments.length > 0)) + tableHtmlRows += "

Comments:
" + htmlEncode(records[i].comments) + "
"; + + tableHtmlRows += ""; + + additionalDataAttributes = "data-record-next-domain-name=\"" + htmlEncode(records[i].rData.nextDomainName) + "\" " + + "data-record-types=\"" + htmlEncode(nsecTypes) + "\" "; + break; + + case "DNSKEY": + tableHtmlRows += "Flags: " + htmlEncode(records[i].rData.flags) + + "
Protocol: " + htmlEncode(records[i].rData.protocol) + + "
Algorithm: " + htmlEncode(records[i].rData.algorithm) + + "
Public Key: " + htmlEncode(records[i].rData.publicKey); + + if ((records[i].comments != null) && (records[i].comments.length > 0)) + tableHtmlRows += "

Comments:
" + htmlEncode(records[i].comments) + "
"; + + tableHtmlRows += ""; + + additionalDataAttributes = "data-record-flags=\"" + htmlEncode(records[i].rData.flags) + "\" " + + "data-record-protocol=\"" + htmlEncode(records[i].rData.protocol) + "\" " + + "data-record-algorithm=\"" + htmlEncode(records[i].rData.algorithm) + "\" " + + "data-record-public-key=\"" + htmlEncode(records[i].rData.publicKey) + "\" "; + break; + case "CAA": tableHtmlRows += "Flags: " + htmlEncode(records[i].rData.flags) + "
Tag: " + htmlEncode(records[i].rData.tag) +