mirror of
https://github.com/danog/phpseclib.git
synced 2024-12-03 10:08:04 +01: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 = ASN1::encodeDER($params, Maps\DSAParams::MAP);
|
||||||
$params = new ASN1\Element($params);
|
$params = new ASN1\Element($params);
|
||||||
$key = ASN1::encodeDER($x, Maps\DSAPublicKey::MAP);
|
$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 = PKCS1::savePrivateKey($n, $e, $d, $primes, $exponents, $coefficients);
|
||||||
$key = ASN1::extractBER($key);
|
$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 = PKCS1::savePrivateKey($n, $e, $d, $primes, $exponents, $coefficients);
|
||||||
$key = ASN1::extractBER($key);
|
$key = ASN1::extractBER($key);
|
||||||
$params = self::savePSSParams($options);
|
$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