mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-16 02:07:09 +00:00
RSA: only use OpenSSL if openssl.cnf file exists
This commit is contained in:
parent
95f40d9c8f
commit
11a6b1a1af
@ -465,7 +465,7 @@ class Crypt_RSA {
|
|||||||
|
|
||||||
if ( !defined('CRYPT_RSA_MODE') ) {
|
if ( !defined('CRYPT_RSA_MODE') ) {
|
||||||
switch (true) {
|
switch (true) {
|
||||||
case extension_loaded('openssl') && version_compare(PHP_VERSION, '4.2.0', '>='):
|
case extension_loaded('openssl') && version_compare(PHP_VERSION, '4.2.0', '>=') && file_exists($this->configFile):
|
||||||
define('CRYPT_RSA_MODE', CRYPT_RSA_MODE_OPENSSL);
|
define('CRYPT_RSA_MODE', CRYPT_RSA_MODE_OPENSSL);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user