mirror of
https://github.com/danog/phpseclib.git
synced 2024-12-12 09:09:39 +01:00
EC/Keys/PKCS8: publicKey parameter should be optional
This commit is contained in:
parent
014b3a95a1
commit
4eb9cbd0c8
@ -128,8 +128,9 @@ abstract class PKCS8 extends Progenitor
|
||||
|
||||
$temp = new BigInteger($key['privateKey'], 256);
|
||||
$components['dA'] = $components['curve']->convertInteger($temp);
|
||||
|
||||
$components['QA'] = self::extractPoint($key['publicKey'], $components['curve']);
|
||||
$components['QA'] = isset($key['publicKey']) ?
|
||||
self::extractPoint($key['publicKey'], $components['curve']) :
|
||||
$components['curve']->multiplyPoint($components['curve']->getBasePoint(), $components['dA']);
|
||||
|
||||
return $components;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user