mirror of
https://github.com/danog/tgseclib.git
synced 2024-11-30 04:39:02 +01:00
- fixed bug in setPublicKey function (thanks nicklong!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@110 21d32557-59b3-4da0-833f-c5933fad653e
This commit is contained in:
parent
94f48a97d4
commit
dff1ab92d6
@ -62,7 +62,7 @@
|
||||
* @author Jim Wigginton <terrafrost@php.net>
|
||||
* @copyright MMIX Jim Wigginton
|
||||
* @license http://www.gnu.org/licenses/lgpl.txt
|
||||
* @version $Id: RSA.php,v 1.15 2010-04-10 15:57:02 terrafrost Exp $
|
||||
* @version $Id: RSA.php,v 1.16 2010-06-19 12:01:21 terrafrost Exp $
|
||||
* @link http://phpseclib.sourceforge.net
|
||||
*/
|
||||
|
||||
@ -1002,10 +1002,14 @@ class Crypt_RSA {
|
||||
function setPublicKey($key, $type = CRYPT_RSA_PUBLIC_FORMAT_PKCS1)
|
||||
{
|
||||
$components = $this->_parseKey($key, $type);
|
||||
if (empty($this->modulus) || !$this->modulus->equals($components['modulus'])) {
|
||||
if ($components === false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->modulus = $components['modulus'];
|
||||
$this->publicExponent = $components['publicExponent'];
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user