mirror of
https://github.com/danog/phpseclib.git
synced 2024-12-02 17:52:59 +01:00
- fixed a PHP5.3 warning in Net/SSH2.php
- fixed a bug introduced in the rewritten addition function git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@77 21d32557-59b3-4da0-833f-c5933fad653e
This commit is contained in:
parent
a8f0567527
commit
3ec7bdfcba
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
echo "ZZZ\r\n";
|
||||||
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
|
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -67,7 +68,7 @@
|
|||||||
* @author Jim Wigginton <terrafrost@php.net>
|
* @author Jim Wigginton <terrafrost@php.net>
|
||||||
* @copyright MMVI Jim Wigginton
|
* @copyright MMVI Jim Wigginton
|
||||||
* @license http://www.gnu.org/licenses/lgpl.txt
|
* @license http://www.gnu.org/licenses/lgpl.txt
|
||||||
* @version $Id: BigInteger.php,v 1.24 2010-01-21 00:52:11 terrafrost Exp $
|
* @version $Id: BigInteger.php,v 1.25 2010-01-21 07:33:04 terrafrost Exp $
|
||||||
* @link http://pear.php.net/package/Math_BigInteger
|
* @link http://pear.php.net/package/Math_BigInteger
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -836,9 +837,10 @@ class Math_BigInteger {
|
|||||||
MATH_BIGINTEGER_SIGN => false
|
MATH_BIGINTEGER_SIGN => false
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
$temp = $this->_subtract($x_value, $x_negative, $y_value, $y_negative);
|
|
||||||
$temp[MATH_BIGINTEGER_SIGN] = $this->_compare($x_value, $x_negative, $y_value, $y_negative) > 0 ?
|
$temp = $this->_subtract($x_value, false, $y_value, false);
|
||||||
!$y_negative : $y_negative;
|
$temp[MATH_BIGINTEGER_SIGN] = $this->_compare($x_value, false, $y_value, false) > 0 ?
|
||||||
|
$x_negative : $y_negative;
|
||||||
|
|
||||||
return $temp;
|
return $temp;
|
||||||
}
|
}
|
||||||
@ -966,7 +968,7 @@ class Math_BigInteger {
|
|||||||
return $temp;
|
return $temp;
|
||||||
}
|
}
|
||||||
|
|
||||||
$diff = $this->_compare($x_value, $x_negative, $y_value, $x_negative);
|
$diff = $this->_compare($x_value, $x_negative, $y_value, $y_negative);
|
||||||
|
|
||||||
if ( !$diff ) {
|
if ( !$diff ) {
|
||||||
return array(
|
return array(
|
||||||
@ -981,9 +983,7 @@ class Math_BigInteger {
|
|||||||
$x_value = $y_value;
|
$x_value = $y_value;
|
||||||
$y_value = $temp;
|
$y_value = $temp;
|
||||||
|
|
||||||
$temp = $x_negative;
|
$x_negative = !$x_negative;
|
||||||
$x_negative = $y_negative;
|
|
||||||
$y_negative = $temp;
|
|
||||||
|
|
||||||
$x_size = count($x_value);
|
$x_size = count($x_value);
|
||||||
$y_size = count($y_value);
|
$y_size = count($y_value);
|
||||||
|
@ -60,7 +60,7 @@
|
|||||||
* @author Jim Wigginton <terrafrost@php.net>
|
* @author Jim Wigginton <terrafrost@php.net>
|
||||||
* @copyright MMVII Jim Wigginton
|
* @copyright MMVII Jim Wigginton
|
||||||
* @license http://www.gnu.org/licenses/lgpl.txt
|
* @license http://www.gnu.org/licenses/lgpl.txt
|
||||||
* @version $Id: SSH2.php,v 1.33 2009-12-31 06:11:07 terrafrost Exp $
|
* @version $Id: SSH2.php,v 1.34 2010-01-21 07:33:05 terrafrost Exp $
|
||||||
* @link http://phpseclib.sourceforge.net
|
* @link http://phpseclib.sourceforge.net
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -1273,7 +1273,7 @@ class Net_SSH2 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// although PHP5's get_class() preserves the case, PHP4's does not
|
// although PHP5's get_class() preserves the case, PHP4's does not
|
||||||
if (strtolower(get_class($password)) == 'crypt_rsa') {
|
if (is_object($password) && strtolower(get_class($password)) == 'crypt_rsa') {
|
||||||
return $this->_privatekey_login($username, $password);
|
return $this->_privatekey_login($username, $password);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user