SSH2: replace _is_includable() with stream_resolve_include_path

This commit is contained in:
terrafrost 2014-06-16 09:47:13 -05:00
parent 638e6c78ec
commit 4401b7e21e

View File

@ -1107,31 +1107,31 @@ class Net_SSH2
'none' // OPTIONAL no encryption; NOT RECOMMENDED
);
if (!$this->_is_includable('Crypt/RC4.php')) {
if (stream_resolve_include_path('Crypt/RC4.php') === false) {
$encryption_algorithms = array_diff(
$encryption_algorithms,
array('arcfour256', 'arcfour128', 'arcfour')
);
}
if (!$this->_is_includable('Crypt/Rijndael.php')) {
if (stream_resolve_include_path('Crypt/Rijndael.php') === false) {
$encryption_algorithms = array_diff(
$encryption_algorithms,
array('aes128-ctr', 'aes192-ctr', 'aes256-ctr', 'aes128-cbc', 'aes192-cbc', 'aes256-cbc')
);
}
if (!$this->_is_includable('Crypt/Twofish.php')) {
if (stream_resolve_include_path('Crypt/Twofish.php') === false) {
$encryption_algorithms = array_diff(
$encryption_algorithms,
array('twofish128-ctr', 'twofish192-ctr', 'twofish256-ctr', 'twofish128-cbc', 'twofish192-cbc', 'twofish256-cbc', 'twofish-cbc')
);
}
if (!$this->_is_includable('Crypt/Blowfish.php')) {
if (stream_resolve_include_path('Crypt/Blowfish.php') === false) {
$encryption_algorithms = array_diff(
$encryption_algorithms,
array('blowfish-ctr', 'blowfish-cbc')
);
}
if (!$this->_is_includable('Crypt/TripleDES.php')) {
if (stream_resolve_include_path('Crypt/TripleDES.php') === false) {
$encryption_algorithms = array_diff(
$encryption_algorithms,
array('3des-ctr', '3des-cbc')