Revision 2002cf66
Added by Jim Pingle over 8 years ago
src/etc/inc/openvpn.inc | ||
---|---|---|
400 | 400 |
function openvpn_get_cipherlist() { |
401 | 401 |
|
402 | 402 |
$ciphers = array(); |
403 |
$cipher_out = shell_exec('/usr/local/sbin/openvpn --show-ciphers | /usr/bin/grep "default key" | /usr/bin/awk \'{print $1, "(" $2 "-" $3 ")";}\'');
|
|
403 |
$cipher_out = shell_exec('/usr/local/sbin/openvpn --show-ciphers | /usr/bin/grep \'(.*key\' | sed \'s/, TLS client\/server mode only//\'');
|
|
404 | 404 |
$cipher_lines = explode("\n", trim($cipher_out)); |
405 | 405 |
sort($cipher_lines); |
406 | 406 |
foreach ($cipher_lines as $line) { |
407 |
$words = explode(' ', $line); |
|
407 |
$words = explode(' ', $line, 2);
|
|
408 | 408 |
$ciphers[$words[0]] = "{$words[0]} {$words[1]}"; |
409 | 409 |
} |
410 | 410 |
$ciphers["none"] = gettext("None (No Encryption)"); |
Also available in: Unified diff
Adjust parsing of OpenVPN ciphers to new output format. Fixes #6849