mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Assume a default value of 1 for cert_depth to disallow chaining.
This commit is contained in:
parent
77ed2f4c9f
commit
ea9a4cc867
@ -438,6 +438,8 @@ function openvpn_reconfigure($mode, $settings) {
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (!isset($settings['cert_depth']) && (strstr($settings['mode'], 'tls')))
|
||||
$settings['cert_depth'] = 1;
|
||||
if (is_numeric($settings['cert_depth'])) {
|
||||
$sed = "";
|
||||
$cert = lookup_cert($settings['certref']);
|
||||
|
||||
@ -95,6 +95,7 @@ if($_GET['act']=="new"){
|
||||
$pconfig['interface'] = "wan";
|
||||
$pconfig['local_port'] = openvpn_port_next('UDP');
|
||||
$pconfig['pool_enable'] = "yes";
|
||||
$pconfig['cert_depth'] = 1;
|
||||
}
|
||||
|
||||
if($_GET['act']=="edit"){
|
||||
@ -123,7 +124,10 @@ if($_GET['act']=="edit"){
|
||||
$pconfig['crlref'] = $a_server[$id]['crlref'];
|
||||
$pconfig['certref'] = $a_server[$id]['certref'];
|
||||
$pconfig['dh_length'] = $a_server[$id]['dh_length'];
|
||||
$pconfig['cert_depth'] = $a_server[$id]['cert_depth'];
|
||||
if (isset($a_server[$id]['cert_depth']))
|
||||
$pconfig['cert_depth'] = $a_server[$id]['cert_depth'];
|
||||
else
|
||||
$pconfig['cert_depth'] = 1;
|
||||
if ($pconfig['mode'] == "server_tls_user")
|
||||
$pconfig['strictusercn'] = $a_server[$id]['strictusercn'];
|
||||
} else
|
||||
|
||||
Loading…
Reference in New Issue
Block a user