mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-31 21:21:55 +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()
|
public function getEngine()
|
||||||
{
|
{
|
||||||
|
if (!isset(self::$engines['PHP'])) {
|
||||||
|
self::useBestEngine();
|
||||||
|
}
|
||||||
return self::$engines['OpenSSL'] && self::$defaultExponent == 65537 ?
|
return self::$engines['OpenSSL'] && self::$defaultExponent == 65537 ?
|
||||||
'OpenSSL' :
|
'OpenSSL' :
|
||||||
'PHP';
|
'PHP';
|
||||||
|
Loading…
Reference in New Issue
Block a user