mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-18 02:25:05 +00:00
system: modularise crypto devices
Suggested by: @oparoz
This commit is contained in:
parent
ff6f234102
commit
b41fc6188d
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user