diff options
author | Matthew Grooms <mgrooms@pfsense.org> | 2008-09-09 04:08:22 +0000 |
---|---|---|
committer | Matthew Grooms <mgrooms@pfsense.org> | 2008-09-09 04:08:22 +0000 |
commit | fb1266d3a1314ade3ac9bd30dee3acdf762cbef9 (patch) | |
tree | 8976ef916392268e7e69cebaf17e09dc9d3b2058 /etc/inc/config.inc | |
parent | b28278a261f42ea409eaf49b143e9792fb0261e4 (diff) | |
download | pfsense-fb1266d3a1314ade3ac9bd30dee3acdf762cbef9.zip pfsense-fb1266d3a1314ade3ac9bd30dee3acdf762cbef9.tar.gz |
Moves the protocol and certificate options out of the general config page
to the Advanced admin access tab. The thought is that they should be next
to each other. The certificate management has also been modified to use
the centralized certificate manager. I took the liberty of removing the
default certificate/key definitions from the web server configuration
function as it is now trivial to create these locally.
The global SSH authorized keys have also been removed. Any existing key
data will be migrated to the admin account. I also added some new checks
to ensure the sshd process is only restarted when its configuration has
actually changed.
Diffstat (limited to 'etc/inc/config.inc')
-rw-r--r-- | etc/inc/config.inc | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/etc/inc/config.inc b/etc/inc/config.inc index da5bea6..62a6a89 100644 --- a/etc/inc/config.inc +++ b/etc/inc/config.inc @@ -1926,6 +1926,42 @@ endif; $config['version'] = "5.2"; } + /* Convert 5.2 -> 5.3 */ + if ($config['version'] <= 5.2) { + + if (!is_array($config['system']['ca'])) + $config['system']['ca'] = array(); + if (!is_array($config['system']['cert'])) + $config['system']['cert'] = array(); + + /* migrate advanced admin page webui ssl to certifcate mngr */ + if ($config['system']['webgui']['certificate'] && + $config['system']['webgui']['private-key']) { + + /* create cert entry */ + $cert = array(); + $cert['refid'] = uniqid(); + $cert['name'] = "webConfigurator SSL Certificate"; + $cert['crt'] = $config['system']['webgui']['certificate']; + $cert['prv'] = $config['system']['webgui']['private-key']; + $config['system']['cert'][] = $cert; + + /* create cert reference */ + unset($config['system']['webgui']['certificate']); + unset($config['system']['webgui']['private-key']); + $config['system']['webgui']['ssl-certref'] = $cert['refid']; + } + + /* migrate advanced admin page ssh keys to user manager */ + if ($config['system']['ssh']['authorizedkeys']) { + $admin_user =& getUserEntryByUID(0); + $admin_user['authorizedkeys'] = $config['system']['ssh']['authorizedkeys']; + unset($config['system']['ssh']['authorizedkeys']); + } + + $config['version'] = "5.3"; + } + $now = date("H:i:s"); log_error("Ended Configuration upgrade at $now"); |