mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 00:54:41 +00:00
openvpn: improve the cipher parsing
It had verbose text in it. Sort better while here.
This commit is contained in:
parent
c5c622fd77
commit
00062ae8f8
@ -271,13 +271,13 @@ function openvpn_get_cipherlist()
|
||||
$ciphers = array();
|
||||
exec('/usr/local/sbin/openvpn --show-ciphers', $lines);
|
||||
foreach ($lines as $line) {
|
||||
if (strstr($line, '(') !== false) {
|
||||
if (strstr($line, ' (') !== false) {
|
||||
$cipher = explode(' ', $line)[0];
|
||||
$ciphers[$cipher] = $line;
|
||||
}
|
||||
}
|
||||
ksort($ciphers);
|
||||
$ciphers["none"] = gettext("None (No Encryption)");
|
||||
ksort($ciphers, SORT_STRING | SORT_FLAG_CASE);
|
||||
$ciphers['none'] = gettext('None (No Encryption)');
|
||||
return $ciphers;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user