mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-29 04:23:34 +00:00
RSA: conditionally call useBestEngine() when getEngine() is called
This commit is contained in:
parent
eb971aaaac
commit
301aad4764
@ -935,6 +935,9 @@ abstract class RSA extends AsymmetricKey
|
||||
*/
|
||||
public function getEngine()
|
||||
{
|
||||
if (!isset(self::$engines['PHP'])) {
|
||||
self::useBestEngine();
|
||||
}
|
||||
return self::$engines['OpenSSL'] && self::$defaultExponent == 65537 ?
|
||||
'OpenSSL' :
|
||||
'PHP';
|
||||
|
Loading…
Reference in New Issue
Block a user