Commit b41fc618 authored by Franco Fichtner's avatar Franco Fichtner

system: modularise crypto devices

Suggested by: @oparoz
parent ff6f2341
......@@ -382,15 +382,9 @@ function load_crypto()
{
global $config;
$crypto_modules = array('glxsb', 'aesni');
if (!isset($config['system']['crypto_hardware']) || !in_array($config['system']['crypto_hardware'], $crypto_modules)) {
return false;
}
if (!empty($config['system']['crypto_hardware']) && !is_module_loaded($config['system']['crypto_hardware'])) {
log_error("Loading {$config['system']['crypto_hardware']} cryptographic accelerator module.");
mwexec("/sbin/kldload {$config['system']['crypto_hardware']}");
log_error(sprintf(gettext('Loading %s cryptographic accelerator module.'), $config['system']['crypto_hardware']));
mwexecf('/sbin/kldload %s', $config['system']['crypto_hardware']);
}
}
......
......@@ -38,16 +38,20 @@ require_once("pfsense-utils.inc");
require_once("services.inc");
require_once("interfaces.inc");
$crypto_modules = array('glxsb' => gettext("AMD Geode LX Security Block"),
'aesni' => gettext("AES-NI CPU-based Acceleration")
$crypto_modules = array(
'aesni' => gettext('AES-NI CPU-based Acceleration'),
'glxsb' => gettext('AMD Geode LX Security Block'),
'hifn' => gettext('Hifn 7751/7951/7811/7955/7956 Crypto Accelerator'),
'padlock' => gettext('Crypto and RNG in VIA C3, C7 and Eden Processors'),
'save' => gettext('SafeNet Crypto Accelerator'),
'ubsec' => gettext('Broadcom and BlueSteel uBsec 5x0x crypto accelerator'),
);
$thermal_hardware_modules = array('coretemp' => gettext("Intel Core* CPU on-die thermal sensor"),
'amdtemp' => gettext("AMD K8, K10 and K11 CPU on-die thermal sensor")
$thermal_hardware_modules = array(
'coretemp' => gettext('Intel Core* CPU on-die thermal sensor'),
'amdtemp' => gettext('AMD K8, K10 and K11 CPU on-die thermal sensor'),
);
if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$pconfig = array();
$pconfig['proxyurl'] = !empty($config['system']['proxyurl']) ? $config['system']['proxyurl'] : null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment