Implement CAA DNS record for letsencrypt.org

This commit is contained in:
Marc-André Kolly
2019-07-27 17:36:31 +02:00
parent d5e4182878
commit d4e5e32c14
9 changed files with 86 additions and 0 deletions

View File

@@ -130,6 +130,12 @@ class Dns
}
}
// additional required records for CAA if activated
if ($domain['caa'] == '1') {
// check for CAA content later
self::addRequiredEntry('@', 'CAA', $required_entries);
}
// additional required records for SPF and DKIM if activated
if ($domain['isemaildomain'] == '1') {
if (Settings::Get('spf.use_spf') == '1') {
@@ -278,6 +284,11 @@ class Dns
}
}
}
// CAA
if (array_key_exists("CAA", $required_entries)) {
$zonerecords[] = new DnsEntry('@', 'CAA', '0 issue "letsencrypt.org"');
}
}
if (empty($primary_ns)) {

View File

@@ -214,6 +214,19 @@ return array(
),
'value' => array()
),
'caa' => array(
'visible' => (\Froxlor\Settings::Get('system.leenabled') == '1' ? ($ssl_ipsandports != '' ? true : false) : false),
'label' => $lng['admin']['caa']['title'],
'desc' => $lng['admin']['caa']['description'],
'type' => 'checkbox',
'values' => array(
array(
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array()
),
'http2' => array(
'visible' => ($ssl_ipsandports != '' ? true : false) && \Froxlor\Settings::Get('system.webserver') != 'lighttpd' && \Froxlor\Settings::Get('system.http2_support') == '1',
'label' => $lng['admin']['domain_http2']['title'],

View File

@@ -250,6 +250,21 @@ return array(
$result['letsencrypt']
)
),
'caa' => array(
'visible' => (\Froxlor\Settings::Get('system.leenabled') == '1' ? ($ssl_ipsandports != '' ? true : false) : false),
'label' => $lng['admin']['caa']['title'],
'desc' => $lng['admin']['caa']['description'],
'type' => 'checkbox',
'values' => array(
array(
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array(
$result['caa']
)
),
'http2' => array(
'visible' => ($ssl_ipsandports != '' ? true : false) && \Froxlor\Settings::Get('system.webserver') != 'lighttpd' && \Froxlor\Settings::Get('system.http2_support') == '1',
'label' => $lng['admin']['domain_http2']['title'],

View File

@@ -108,6 +108,19 @@ return array(
),
'value' => array()
),
'caa' => array(
'visible' => \Froxlor\Settings::Get('system.leenabled') == '1' ? true : false,
'label' => $lng['customer']['caa']['title'],
'desc' => $lng['customer']['caa']['description'],
'type' => 'checkbox',
'values' => array(
array(
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array()
),
'hsts_maxage' => array(
'label' => $lng['admin']['domain_hsts_maxage']['title'],
'desc' => $lng['admin']['domain_hsts_maxage']['description'],

View File

@@ -128,6 +128,21 @@ return array(
$result['letsencrypt']
)
),
'caa' => array(
'visible' => \Froxlor\Settings::Get('system.leenabled') == '1' ? true : false,
'label' => $lng['customer']['caa']['title'],
'desc' => $lng['customer']['caa']['description'],
'type' => 'checkbox',
'values' => array(
array(
'label' => $lng['panel']['yes'],
'value' => '1'
)
),
'value' => array(
$result['caa']
)
),
'hsts_maxage' => array(
'label' => $lng['admin']['domain_hsts_maxage']['title'],
'desc' => $lng['admin']['domain_hsts_maxage']['description'],