SSL cert and key can alsobe defined for an IP address, so force use of the ones at the top level

This commit is contained in:
Jamie Cameron
2015-09-07 20:28:36 -07:00
parent 4d39b7233c
commit 24d15b1444
2 changed files with 6 additions and 6 deletions

View File

@ -10,7 +10,7 @@ print &ui_table_start($text{'ssl_header'}, "width=100%", 4);
# SSL cert and key files
if (&find_value("ssl_cert", $conf, 2)) {
$cert = &find_value("ssl_cert", $conf);
$cert = &find_value("ssl_cert", $conf, 0, "");
$cert =~ s/^<//;
}
else {
@ -21,7 +21,7 @@ print &ui_table_row($text{'ssl_cert'},
[ undef, "nowrap" ]);
if (&find_value("ssl_key", $conf, 2)) {
$key = &find_value("ssl_key", $conf);
$key = &find_value("ssl_key", $conf, 0, "");
$key =~ s/^<//;
}
else {
@ -39,7 +39,7 @@ print &ui_table_row($text{'ssl_pass'},
# SSL CA file
if (&find_value("ssl_ca", $conf, 2)) {
$ca = &find_value("ssl_ca", $conf);
$ca = &find_value("ssl_ca", $conf, 0, "");
$ca =~ s/^<//;
}
else {

View File

@ -13,7 +13,7 @@ $in{'cert_def'} || -r $in{'cert'} || $in{'cert'} =~ /^[<>\|]/ ||
if (&find_value("ssl_cert", $conf, 2)) {
$in{'cert'} = "<".$in{'cert'} if ($in{'cert'} =~ /^\//);
&save_directive($conf, "ssl_cert",
$in{'cert_def'} ? undef : $in{'cert'});
$in{'cert_def'} ? undef : $in{'cert'}, "");
}
else {
&save_directive($conf, "ssl_cert_file",
@ -24,7 +24,7 @@ $in{'key_def'} || -r $in{'key'} || $in{'key'} =~ /^[<>\|]/ ||
if (&find_value("ssl_key", $conf, 2)) {
$in{'key'} = "<".$in{'key'} if ($in{'key'} =~ /^\//);
&save_directive($conf, "ssl_key",
$in{'key_def'} ? undef : $in{'key'});
$in{'key_def'} ? undef : $in{'key'}, "");
}
else {
&save_directive($conf, "ssl_key_file",
@ -37,7 +37,7 @@ $in{'ca_def'} || -r $in{'ca'} || $in{'ca'} =~ /^[<>\|]/ ||
if (&find_value("ssl_ca", $conf, 2)) {
$in{'ca'} = "<".$in{'ca'} if ($in{'ca'} =~ /^\//);
&save_directive($conf, "ssl_ca",
$in{'ca_def'} ? undef : $in{'ca'});
$in{'ca_def'} ? undef : $in{'ca'}, "");
}
else {
&save_directive($conf, "ssl_ca_file",