diff --git a/phpseclib/Crypt/RSA.php b/phpseclib/Crypt/RSA.php index 77414ee0..260e2123 100644 --- a/phpseclib/Crypt/RSA.php +++ b/phpseclib/Crypt/RSA.php @@ -494,6 +494,7 @@ class RSA case !isset($versions['Header']): case !isset($versions['Library']): case $versions['Header'] == $versions['Library']: + case version_compare($versions['Header'], '1.0.0') >= 0 && version_compare($versions['Library'], '1.0.0') >= 0: define('CRYPT_RSA_MODE', self::MODE_OPENSSL); break; default: diff --git a/phpseclib/Math/BigInteger.php b/phpseclib/Math/BigInteger.php index 2d3d34a8..008f1649 100644 --- a/phpseclib/Math/BigInteger.php +++ b/phpseclib/Math/BigInteger.php @@ -292,6 +292,7 @@ class BigInteger case !isset($versions['Header']): case !isset($versions['Library']): case $versions['Header'] == $versions['Library']: + case version_compare($versions['Header'], '1.0.0') >= 0 && version_compare($versions['Library'], '1.0.0') >= 0: define('MATH_BIGINTEGER_OPENSSL_ENABLED', true); break; default: