Add support to display tag, algo and digests in table #2245

This commit is contained in:
Ilia Ross
2024-08-01 13:01:30 +03:00
parent f499c62da4
commit 8236fb2fd8
2 changed files with 25 additions and 1 deletions

View File

@ -68,8 +68,28 @@ if (@keyrecs) {
my $ds = &get_ds_record($zone);
if ($ds) {
print $text{'zonekey_ds'},"<br>\n";
print &ui_textarea("ds", join("\n".$desc, split(/$desc/, $ds)), 2, 80, "off", 0,
# Split DS records in string into a list
my @ds = split(/\s(?=\S+\.\s+\d+\s+IN\s+DS\s+\d+\s+
\d+\s+\d+\s+[0-9A-Fa-f]{16,})/x, $ds);
print &ui_textarea("ds", join("\n", @ds), 2, 80, "off", 0,
"readonly style='width:90%'"),"<br>\n";
print &ui_columns_start([
$text{'zonekey_ds_keytag'},
$text{'zonekey_ds_alg'},
$text{'zonekey_ds_type'},
$text{'zonekey_ds_digest'},
]);
foreach my $r (@ds) {
if ($r =~ /
\bDS\s+(?<key_tag>\d+)\s+(?<algorithm>\d+)\s+
(?<digest_type>\d+)\s+
(?<digest>[0-9A-Fa-f]+)\b/x) {
print &ui_columns_row([
$+{key_tag}, $+{algorithm},
$+{digest_type}, $+{digest}]);
}
}
print &ui_columns_end();
}
# Offer to disable

View File

@ -1282,6 +1282,10 @@ zonekey_private=Private key details :
zonekey_privatefile=Private key file : $1
zonekey_algorithm=DNSSEC algorithm : $1
zonekey_ds=DS record for parent zone :
zonekey_ds_keytag=Key tag
zonekey_ds_alg=Algorithm
zonekey_ds_type=Digest type
zonekey_ds_digest=Digest string
zonekey_expandksk=Show public and private key-signing-key details ..
zonekey_expandzone=Show public and private zone-key details ..
zonekey_noprivate=However, Webmin could not find the private key associated with the zone, and so will not be able to re-sign it.