1
0
mirror of https://github.com/danog/phpseclib.git synced 2024-12-04 18:48:24 +01:00

EC/Keys/PKCS8: publicKey parameter should be optional

This commit is contained in:
terrafrost 2021-11-14 00:52:37 -06:00
parent 014b3a95a1
commit 4eb9cbd0c8

View File

@ -128,8 +128,9 @@ abstract class PKCS8 extends Progenitor
$temp = new BigInteger($key['privateKey'], 256); $temp = new BigInteger($key['privateKey'], 256);
$components['dA'] = $components['curve']->convertInteger($temp); $components['dA'] = $components['curve']->convertInteger($temp);
$components['QA'] = isset($key['publicKey']) ?
$components['QA'] = self::extractPoint($key['publicKey'], $components['curve']); self::extractPoint($key['publicKey'], $components['curve']) :
$components['curve']->multiplyPoint($components['curve']->getBasePoint(), $components['dA']);
return $components; return $components;
} }