RSA: only use OpenSSL if openssl.cnf file exists

This commit is contained in:
terrafrost 2013-03-21 10:43:27 -05:00
parent 95f40d9c8f
commit 11a6b1a1af

View File

@ -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: