diff --git a/phpseclib/Crypt/RSA.php b/phpseclib/Crypt/RSA.php index c102efde..b3cb0ba6 100644 --- a/phpseclib/Crypt/RSA.php +++ b/phpseclib/Crypt/RSA.php @@ -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';