mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-16 02:07:09 +00:00
PKCS8: fix private key creation
This commit is contained in:
parent
f5858a6a1d
commit
dc488f967f
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user