SSH2: when building algo list look at if crypto engine is set

This commit is contained in:
terrafrost 2020-07-31 08:05:31 -05:00
parent c7d7b36018
commit 40b4f1d557
1 changed files with 9 additions and 5 deletions

View File

@ -4610,11 +4610,15 @@ class Net_SSH2
//'none' // OPTIONAL no encryption; NOT RECOMMENDED
);
$engines = array(
CRYPT_ENGINE_OPENSSL,
CRYPT_ENGINE_MCRYPT,
CRYPT_ENGINE_INTERNAL
);
if ($this->crypto_engine) {
$engines = array($this->crypto_engine);
} else {
$engines = array(
CRYPT_ENGINE_OPENSSL,
CRYPT_ENGINE_MCRYPT,
CRYPT_ENGINE_INTERNAL
);
}
$ciphers = array();
foreach ($engines as $engine) {