mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-26 11:37:33 +00:00
- fix issues with partially generated RSA keys (thanks, Ben!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@141 21d32557-59b3-4da0-833f-c5933fad653e
This commit is contained in:
parent
029b61bc5e
commit
80bf62d6fc
@ -492,16 +492,16 @@ class Crypt_RSA {
|
||||
$timeout-= time() - $start;
|
||||
$start = time();
|
||||
if ($timeout <= 0) {
|
||||
return serialize(array(
|
||||
return array(
|
||||
'privatekey' => '',
|
||||
'publickey' => '',
|
||||
'partialkey' => array(
|
||||
'partialkey' => serialize(array(
|
||||
'primes' => $primes,
|
||||
'coefficients' => $coefficients,
|
||||
'lcm' => $lcm,
|
||||
'exponents' => $exponents
|
||||
)
|
||||
));
|
||||
))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -519,7 +519,7 @@ class Crypt_RSA {
|
||||
return array(
|
||||
'privatekey' => '',
|
||||
'publickey' => '',
|
||||
'partialkey' => empty($primes) ? '' : serialize(array(
|
||||
'partialkey' => count($primes) == 1 ? '' : serialize(array(
|
||||
'primes' => array_slice($primes, 0, $i - 1),
|
||||
'coefficients' => $coefficients,
|
||||
'lcm' => $lcm,
|
||||
|
Loading…
Reference in New Issue
Block a user