From 6ff421d3547bdb2a79b1014d660a508a2a37c9c3 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Sat, 18 Jun 2016 23:28:33 -0500 Subject: [PATCH] BigInteger/RSA: don't compare openssl versions > 1.0 --- phpseclib/Crypt/RSA.php | 1 + phpseclib/Math/BigInteger.php | 1 + 2 files changed, 2 insertions(+) diff --git a/phpseclib/Crypt/RSA.php b/phpseclib/Crypt/RSA.php index 5552a3bd..16d21dcb 100644 --- a/phpseclib/Crypt/RSA.php +++ b/phpseclib/Crypt/RSA.php @@ -539,6 +539,7 @@ class Crypt_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', CRYPT_RSA_MODE_OPENSSL); break; default: diff --git a/phpseclib/Math/BigInteger.php b/phpseclib/Math/BigInteger.php index d09677ac..cd495a2a 100644 --- a/phpseclib/Math/BigInteger.php +++ b/phpseclib/Math/BigInteger.php @@ -286,6 +286,7 @@ class Math_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: