From 7d3dbccd72d6315a1702cce7d38e0ade8d1c0ee2 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Mon, 14 Feb 2022 21:19:29 -0600 Subject: [PATCH] DH/PKCS8: encryption options couldn't be set for PKCS8 private keys --- phpseclib/Crypt/DH/Formats/Keys/PKCS8.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpseclib/Crypt/DH/Formats/Keys/PKCS8.php b/phpseclib/Crypt/DH/Formats/Keys/PKCS8.php index 5120a8ba..b06aba34 100644 --- a/phpseclib/Crypt/DH/Formats/Keys/PKCS8.php +++ b/phpseclib/Crypt/DH/Formats/Keys/PKCS8.php @@ -130,7 +130,7 @@ abstract class PKCS8 extends Progenitor $params = ASN1::encodeDER($params, Maps\DHParameter::MAP); $params = new ASN1\Element($params); $key = ASN1::encodeDER($privateKey, ['type' => ASN1::TYPE_INTEGER]); - return self::wrapPrivateKey($key, [], $params, $password, $options); + return self::wrapPrivateKey($key, [], $params, $password, null, '', $options); } /**