mirror of
https://github.com/phpseclib/phpseclib.git
synced 2025-01-12 01:45:47 +00:00
Merge branch '1.0' into 2.0
This commit is contained in:
commit
ca7ae97d31
@ -1396,9 +1396,14 @@ class RSA
|
||||
$this->components = array();
|
||||
|
||||
$xml = xml_parser_create('UTF-8');
|
||||
xml_set_object($xml, $this);
|
||||
xml_set_element_handler($xml, '_start_element_handler', '_stop_element_handler');
|
||||
xml_set_character_data_handler($xml, '_data_handler');
|
||||
if (version_compare(PHP_VERSION, '8.4.0', '>=')) {
|
||||
xml_set_element_handler($xml, array($this, '_start_element_handler'), array($this, '_stop_element_handler'));
|
||||
xml_set_character_data_handler($xml, array($this, '_data_handler'));
|
||||
} else {
|
||||
xml_set_object($xml, $this);
|
||||
xml_set_element_handler($xml, '_start_element_handler', '_stop_element_handler');
|
||||
xml_set_character_data_handler($xml, '_data_handler');
|
||||
}
|
||||
// add <xml></xml> to account for "dangling" tags like <BitStrength>...</BitStrength> that are sometimes added
|
||||
if (!xml_parse($xml, '<xml>' . $key . '</xml>')) {
|
||||
xml_parser_free($xml);
|
||||
|
@ -252,7 +252,8 @@ class BigInteger
|
||||
{
|
||||
if (!defined('MATH_BIGINTEGER_MODE')) {
|
||||
switch (true) {
|
||||
case extension_loaded('gmp'):
|
||||
// PHP 8.4.0 and 8.4.1 don't work with GMP per https://github.com/php/php-src/issues/16870
|
||||
case extension_loaded('gmp') && !(version_compare(PHP_VERSION, '8.4.0', '>=') && version_compare(PHP_VERSION, '8.4.1', '<=')):
|
||||
define('MATH_BIGINTEGER_MODE', self::MODE_GMP);
|
||||
break;
|
||||
case extension_loaded('bcmath'):
|
||||
|
Loading…
Reference in New Issue
Block a user