diff options
author | Ermal Luçi <eri@pfsense.org> | 2008-08-04 19:14:42 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2008-08-04 19:14:42 +0000 |
commit | 11f869eaa344706af3c8b09902495c0b4bb3de78 (patch) | |
tree | cab9036f64394ec4716932b3e69a31e80f53ccaf /etc/inc | |
parent | 7d9dca1ca26e28f5033e30a936efa36b5287eec9 (diff) | |
download | pfsense-11f869eaa344706af3c8b09902495c0b4bb3de78.zip pfsense-11f869eaa344706af3c8b09902495c0b4bb3de78.tar.gz |
Fix openvpn upgrade code.
Diffstat (limited to 'etc/inc')
-rw-r--r-- | etc/inc/config.inc | 43 |
1 files changed, 24 insertions, 19 deletions
diff --git a/etc/inc/config.inc b/etc/inc/config.inc index cd9e13d..5c348f5 100644 --- a/etc/inc/config.inc +++ b/etc/inc/config.inc @@ -37,6 +37,11 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +/* + * XXX: Hack around the cvs syntax checks. + * DISABLE_PHP_LINT_CHECKING + */ + if($g['booting']) echo "."; @@ -1182,36 +1187,36 @@ function convert_config() { if (!isset($config['openvpn']['keys'])) $config['openvpn']['keys'] = array(); $ncfg =& $config['openvpn']['keys']; - foreach ($ocfg as $id => $cfg) { + foreach ($ocfg as $id => &$cfg) { if ($cfg['auth_method'] == 'shared_key') { $ncfg["converted{$id}"]['shared.key'] = $cfg['shared_key']; $ncfg["converted{$id}"]['existing'] = "yes"; $ncfg["converted{$id}"]['auth_method'] = "shared_key"; - $ocfg['cipher'] = "converted{$id}"; - unset($ocfg['shared_key']); + $cfg['cipher'] = "converted{$id}"; + unset($cfg['shared_key']); } else { - if (isset($ocfg['ca_cert'])) { - $ncfg["converted{$id}"]['ca.crt'] = $ocfg['ca_cert']; - unset($ocfg['ca_cert']); + if (isset($cfg['ca_cert'])) { + $ncfg["converted{$id}"]['ca.crt'] = $cfg['ca_cert']; + unset($cfg['ca_cert']); } - if (isset($ocfg['server_cert'])) { - $ncfg["converted{$id}"]['server.crt'] = $ocfg['server_cert']; - unset($ocfg['server_cert']); + if (isset($cfg['server_cert'])) { + $ncfg["converted{$id}"]['server.crt'] = $cfg['server_cert']; + unset($cfg['server_cert']); } - if (isset($ocfg['server_key'])) { - $ncfg["converted{$id}"]['server.key'] = $ocfg['server_key']; - unset($ocfg['ca_cert']); + if (isset($cfg['server_key'])) { + $ncfg["converted{$id}"]['server.key'] = $cfg['server_key']; + unset($cfg['ca_cert']); } - if (isset($ocfg['dh_params'])) { - $ncfg["converted{$id}"]['dh_params.dh'] = $ocfg['dh_params']; - unset($ocfg['dh_params']); + if (isset($cfg['dh_params'])) { + $ncfg["converted{$id}"]['dh_params.dh'] = $cfg['dh_params']; + unset($cfg['dh_params']); } - if (isset($ocfg['crl'])) { - $ncfg["converted{$id}"]['crl'] = $ocfg['crl']; - unset($ocfg['crl']); + if (isset($cfg['crl'])) { + $ncfg["converted{$id}"]['crl'] = $cfg['crl']; + unset($cfg['crl']); } $ncfg["converted{$id}"]['existing'] = "yes"; - $ocfg['cipher'] = "converted{$id}"; + $cfg['cipher'] = "converted{$id}"; } } |