mirror of
https://github.com/danog/phpseclib.git
synced 2024-12-04 18:48:24 +01:00
EC: don't call loadCurveByParams if params is null
This commit is contained in:
parent
a7b1d031bb
commit
c4e07725aa
@ -106,6 +106,9 @@ abstract class PKCS8 extends Progenitor
|
||||
|
||||
$decoded = ASN1::decodeBER($key[$type . 'Algorithm']['parameters']->element);
|
||||
$params = ASN1::asn1map($decoded[0], Maps\ECParameters::MAP);
|
||||
if (!$params) {
|
||||
throw new \RuntimeException('Unable to decode the parameters using Maps\ECParameters');
|
||||
}
|
||||
|
||||
$components = [];
|
||||
$components['curve'] = self::loadCurveByParam($params);
|
||||
|
Loading…
Reference in New Issue
Block a user