From 661de3e7923ccc5e63fc50671464624cf421ff33 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Tue, 21 Jul 2015 21:18:30 +0545 Subject: Unset old CA and Cert in system config This looked odd. Why would we leave behind the old "ca" and "cert" section in $config["system"]? I guess it would do no harm, but seems confusing for the future to have some unused entries like this remaining in the config. Should a piece of code be put into the latest upgrade function to clean out these in any current config? --- etc/inc/upgrade_config.inc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'etc/inc') diff --git a/etc/inc/upgrade_config.inc b/etc/inc/upgrade_config.inc index 188c08f..596088a 100644 --- a/etc/inc/upgrade_config.inc +++ b/etc/inc/upgrade_config.inc @@ -2547,9 +2547,11 @@ function upgrade_066_to_067() { global $config; if (isset($config['system']['ca'])) { $config['ca'] = $config['system']['ca']; + unset($config['system']['ca']); } if (isset($config['system']['cert'])) { $config['cert'] = $config['system']['cert']; + unset($config['system']['cert']); } } -- cgit v1.1 From 564f135646c66fb3a051fb6d076ba8afd568cd0b Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Tue, 21 Jul 2015 23:50:44 +0545 Subject: Unset old CA and Cert in left system config Unset any old CA and Cert in the system section that might still be there from when upgrade_066_to_067 did not unset them. That will tidy up old configs that had the conversion done originally but these old sections were left behind. --- etc/inc/upgrade_config.inc | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'etc/inc') diff --git a/etc/inc/upgrade_config.inc b/etc/inc/upgrade_config.inc index 596088a..267c0d6 100644 --- a/etc/inc/upgrade_config.inc +++ b/etc/inc/upgrade_config.inc @@ -3754,6 +3754,14 @@ function upgrade_116_to_117() { function upgrade_117_to_118() { global $config; + // Unset any old CA and Cert in the system section that might still be there from when upgrade_066_to_067 did not unset them. + if (isset($config['system']['ca'])) { + unset($config['system']['ca']); + } + if (isset($config['system']['cert'])) { + unset($config['system']['cert']); + } + if (!isset($config['ipsec']['phase1'])) { return; } -- cgit v1.1