mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 14:13:29 +00:00
Add support for CAA records
This commit is contained in:
@@ -152,3 +152,5 @@ Added support for editing TLSA (SSL Certificate) records.
|
||||
Added support for editing SSHFP (SSH Public Key) records.
|
||||
---- Changes since 1.880 ----
|
||||
Before a zone is updated, BIND will be told to freeze it and thaw afterwards. This ensures that dynamic updates are preserved.
|
||||
---- Changes since 1.930 ----
|
||||
Added support for CAA records.
|
||||
|
||||
@@ -1298,6 +1298,20 @@ elsif ($type eq "NSEC3PARAM") {
|
||||
&ui_textbox("value3", $v[3], 20));
|
||||
|
||||
}
|
||||
elsif ($type eq "CAA") {
|
||||
# CAA records have a flag, tag and issuer domain
|
||||
print &ui_table_row($text{'value_CAA0'},
|
||||
&ui_yesno_radio("value0", $v[0] || 0));
|
||||
|
||||
print &ui_table_row($text{'value_CAA1'},
|
||||
&ui_select("value1", $v[1],
|
||||
[ [ "issue", $text{'value_caa_issue'} ],
|
||||
[ "issuewild", $text{'value_caa_issuewild'} ],
|
||||
[ "iodef", $text{'value_caa_iodef'} ] ]));
|
||||
|
||||
print &ui_table_row($text{'value_CAA2'},
|
||||
&ui_textbox("value2", $v[2], 40));
|
||||
}
|
||||
else {
|
||||
# All other types just have a text box
|
||||
print &ui_table_row($text{'value_other'},
|
||||
@@ -2968,7 +2982,7 @@ $slave_error = $_[0];
|
||||
|
||||
sub get_forward_record_types
|
||||
{
|
||||
return ("A", "NS", "CNAME", "MX", "HINFO", "TXT", "SPF", "DMARC", "WKS", "RP", "PTR", "LOC", "SRV", "KEY", "TLSA", "SSHFP", "NSEC3PARAM", $config{'support_aaaa'} ? ( "AAAA" ) : ( ), @extra_forward);
|
||||
return ("A", "NS", "CNAME", "MX", "HINFO", "TXT", "SPF", "DMARC", "WKS", "RP", "PTR", "LOC", "SRV", "KEY", "TLSA", "SSHFP", "CAA", "NSEC3PARAM", $config{'support_aaaa'} ? ( "AAAA" ) : ( ), @extra_forward);
|
||||
}
|
||||
|
||||
sub get_reverse_record_types
|
||||
|
||||
@@ -89,7 +89,7 @@ else {
|
||||
my %hmap;
|
||||
if (@recs) {
|
||||
@recs = &sort_records(@recs);
|
||||
foreach my $v (keys %text) {
|
||||
foreach my $v (sort { $a cmp $b } keys %text) {
|
||||
if ($v =~ /^value_([A-Z0-9]+)(\d+)/) {
|
||||
$hmap{$1}->[$2-1] = $text{$v};
|
||||
}
|
||||
@@ -238,6 +238,14 @@ for(my $i=0; $i<@_; $i++) {
|
||||
$v = $v ? $v." (".$r->{'values'}->[$j].")"
|
||||
: $r->{'values'}->[$j];
|
||||
}
|
||||
elsif ($in{'type'} eq "CAA") {
|
||||
if ($j == 0) {
|
||||
$v = $v ? $text{'yes'} : $text{'no'};
|
||||
}
|
||||
elsif ($j == 1) {
|
||||
$v = $text{'value_caa_'.$v} || $v;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (length($v) > 80) {
|
||||
$v = substr($v, 0, 80)." ...";
|
||||
|
||||
@@ -310,10 +310,12 @@ edit_ensec3value3=Missing or non-base64 salt
|
||||
edit_edmarcpct=Percentage of messages must be an integer between 0 and 100
|
||||
edit_edmarcrua=Missing aggregate feedback address
|
||||
edit_edmarcruf=Missing forensic information address
|
||||
edit_ecaavalue2=Missing or invalid-looking domain name
|
||||
|
||||
text_title=Edit Records File
|
||||
text_title2=View Records File
|
||||
text_desc3=This form allows you to manually edit the DNS records file $1. No syntax checking will be done by Webmin.
|
||||
text_desc3=This form allows you to manually edit the DNS records file $1. No syntax checking will be done by Webmin.
|
||||
text_desc2=This page shows the DNS records file $1, created by BIND when the zone was transferred from the master server.
|
||||
text_undo=Undo
|
||||
text_ecannot=You are not allowed to edit record files
|
||||
@@ -399,6 +401,7 @@ type_LOC=Location
|
||||
type_SRV=Service Address
|
||||
type_ALL=All Record Types
|
||||
type_KEY=Public Key
|
||||
type_CAA=Certificate Authority
|
||||
|
||||
edit_A=Address
|
||||
edit_AAAA=IPv6 Address
|
||||
@@ -418,6 +421,7 @@ edit_KEY=Public Key
|
||||
edit_NSEC3PARAM=DNSSEC Parameters
|
||||
edit_TLSA=SSL Certificate
|
||||
edit_SSHFP=SSH Public Key
|
||||
edit_CAA=Certificate Authority
|
||||
|
||||
recs_defttl=Default TTL
|
||||
recs_A=Address
|
||||
@@ -439,6 +443,7 @@ recs_KEY=Public Key
|
||||
recs_NSEC3PARAM=DNSSEC Parameters
|
||||
recs_TLSA=SSL Certificate
|
||||
recs_SSHFP=SSH Public Key
|
||||
recs_CAA=Certificate Authority
|
||||
recs_delete=Delete Selected
|
||||
|
||||
value_A1=Address
|
||||
@@ -511,6 +516,12 @@ value_dmarcnop=Same as this domain
|
||||
value_dmarcaspf=Require strict SPF alignment
|
||||
value_dmarcadkim=Require strict DKIM alignment
|
||||
value_dmarcnor=Don't send
|
||||
value_CAA1=Require enforcement?
|
||||
value_CAA2=Authorization type
|
||||
value_CAA3=CA domain name
|
||||
value_caa_issue=Single domain cert
|
||||
value_caa_issuewild=Wildcard cert
|
||||
value_caa_iodef=Policy violation URL
|
||||
|
||||
tlsa_usage0=Certificate authority
|
||||
tlsa_usage1=End entity
|
||||
@@ -1223,7 +1234,6 @@ zonekey_other=Other size (in bits)
|
||||
zonekey_enable=Create and Add Key
|
||||
zonekey_err=Failed to create DNSSEC key
|
||||
zonekey_esize=Key size must be a number of bits between $1 and $2
|
||||
zonekey_efactor=Key size must be a multiple of $1
|
||||
zonekey_creating=Creating DNSSEC key for $1 ..
|
||||
zonekey_ecreate=.. creation failed : $1
|
||||
zonekey_done=.. done
|
||||
|
||||
@@ -427,6 +427,12 @@ else {
|
||||
$in{'value2'},
|
||||
$in{'value3'}, ")");
|
||||
}
|
||||
elsif ($in{'type'} eq 'CAA') {
|
||||
$in{'value2'} =~ /^\S+$/ ||
|
||||
&error($text{'edit_ecaavalue2'});
|
||||
$vals = join(" ", $in{'value0'}, $in{'value1'},
|
||||
"\"$in{'value2'}\"");
|
||||
}
|
||||
else {
|
||||
# For other record types, just save the lines
|
||||
$in{'values'} =~ s/\r//g;
|
||||
|
||||
Reference in New Issue
Block a user