PKCS8: fix private key creation

This commit is contained in:
terrafrost 2022-02-14 18:54:45 -06:00
parent f5858a6a1d
commit dc488f967f
3 changed files with 3 additions and 3 deletions

View File

@ -141,7 +141,7 @@ abstract class PKCS8 extends Progenitor
$params = ASN1::encodeDER($params, Maps\DSAParams::MAP);
$params = new ASN1\Element($params);
$key = ASN1::encodeDER($x, Maps\DSAPublicKey::MAP);
return self::wrapPrivateKey($key, [], $params, $password, $options);
return self::wrapPrivateKey($key, [], $params, $password, null, '', $options);
}
/**

View File

@ -128,7 +128,7 @@ abstract class PKCS8 extends Progenitor
{
$key = PKCS1::savePrivateKey($n, $e, $d, $primes, $exponents, $coefficients);
$key = ASN1::extractBER($key);
return self::wrapPrivateKey($key, [], null, $password, $options);
return self::wrapPrivateKey($key, [], null, $password, null, '', $options);
}
/**

View File

@ -181,7 +181,7 @@ abstract class PSS extends Progenitor
$key = PKCS1::savePrivateKey($n, $e, $d, $primes, $exponents, $coefficients);
$key = ASN1::extractBER($key);
$params = self::savePSSParams($options);
return self::wrapPrivateKey($key, [], $params, $password, $options);
return self::wrapPrivateKey($key, [], $params, $password, null, '', $options);
}
/**