mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-25 11:20:03 +00:00
SSH2: rm unsupported algorithms if OpenSSL is being used
This commit is contained in:
parent
cf17141930
commit
5a91539148
@ -1091,7 +1091,9 @@ class Net_SSH2
|
||||
$identifier = 'SSH-2.0-phpseclib_0.3';
|
||||
|
||||
$ext = array();
|
||||
if (extension_loaded('mcrypt')) {
|
||||
if (extension_loaded('openssl')) {
|
||||
$ext[] = 'openssl';
|
||||
} elseif (extension_loaded('mcrypt')) {
|
||||
$ext[] = 'mcrypt';
|
||||
}
|
||||
|
||||
@ -1164,6 +1166,14 @@ class Net_SSH2
|
||||
//'none' // OPTIONAL no encryption; NOT RECOMMENDED
|
||||
);
|
||||
|
||||
if (extension_loaded('openssl')) {
|
||||
// OpenSSL does not support arcfour256
|
||||
$encryption_algorithms = array_diff(
|
||||
$encryption_algorithms,
|
||||
array('arcfour256')
|
||||
);
|
||||
}
|
||||
|
||||
if (phpseclib_resolve_include_path('Crypt/RC4.php') === false) {
|
||||
$encryption_algorithms = array_diff(
|
||||
$encryption_algorithms,
|
||||
|
Loading…
Reference in New Issue
Block a user