From 12236865d7ee48647d4282bcc9cbd54a5afe8bd7 Mon Sep 17 00:00:00 2001 From: Frank Berger Date: Sun, 27 Sep 2020 17:16:02 +0200 Subject: [PATCH 1/2] openssl_seal has up to 6 parameter openssl_seal can have up to 6 parameters, depending on the algorithm used, an $iv has to be given or is returned as reference. see as well: https://www.php.net/manual/en/function.openssl-seal.php proof of concept: https://phpstan.org/r/e7f47fab-99c0-4e61-8573-0fd5128ca1c8 --- resources/functionMap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/functionMap.php b/resources/functionMap.php index bbe85313d1..1e1bbfdc02 100644 --- a/resources/functionMap.php +++ b/resources/functionMap.php @@ -8118,7 +8118,7 @@ 'openssl_public_decrypt' => ['bool', 'data'=>'string', '&w_decrypted'=>'string', 'key'=>'string|resource', 'padding='=>'int'], 'openssl_public_encrypt' => ['bool', 'data'=>'string', '&w_crypted'=>'string', 'key'=>'string|resource', 'padding='=>'int'], 'openssl_random_pseudo_bytes' => ['string|false', 'length'=>'int', '&w_crypto_strong='=>'bool'], -'openssl_seal' => ['int|false', 'data'=>'string', '&w_sealed_data'=>'string', '&w_env_keys'=>'array', 'pub_key_ids'=>'array', 'method='=>'string'], +'openssl_seal' => ['int|false', 'data'=>'string', '&w_sealed_data'=>'string', '&w_env_keys'=>'array', 'pub_key_ids'=>'array', 'method='=>'string', '&iv'=>'string'], 'openssl_sign' => ['bool', 'data'=>'string', '&w_signature'=>'string', 'priv_key_id'=>'resource|string', 'signature_alg='=>'int|string'], 'openssl_spki_export' => ['string|null', 'spkac'=>'string'], 'openssl_spki_export_challenge' => ['string|null', 'spkac'=>'string'], From 8e04b842eaa83cafce88ca8b90c840ee3e1bc583 Mon Sep 17 00:00:00 2001 From: Frank Berger Date: Sun, 27 Sep 2020 17:38:13 +0200 Subject: [PATCH 2/2] specified rw for the iv parameter --- resources/functionMap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/functionMap.php b/resources/functionMap.php index 1e1bbfdc02..14954d27d8 100644 --- a/resources/functionMap.php +++ b/resources/functionMap.php @@ -8118,7 +8118,7 @@ 'openssl_public_decrypt' => ['bool', 'data'=>'string', '&w_decrypted'=>'string', 'key'=>'string|resource', 'padding='=>'int'], 'openssl_public_encrypt' => ['bool', 'data'=>'string', '&w_crypted'=>'string', 'key'=>'string|resource', 'padding='=>'int'], 'openssl_random_pseudo_bytes' => ['string|false', 'length'=>'int', '&w_crypto_strong='=>'bool'], -'openssl_seal' => ['int|false', 'data'=>'string', '&w_sealed_data'=>'string', '&w_env_keys'=>'array', 'pub_key_ids'=>'array', 'method='=>'string', '&iv'=>'string'], +'openssl_seal' => ['int|false', 'data'=>'string', '&w_sealed_data'=>'string', '&w_env_keys'=>'array', 'pub_key_ids'=>'array', 'method='=>'string', '&rw_iv'=>'string'], 'openssl_sign' => ['bool', 'data'=>'string', '&w_signature'=>'string', 'priv_key_id'=>'resource|string', 'signature_alg='=>'int|string'], 'openssl_spki_export' => ['string|null', 'spkac'=>'string'], 'openssl_spki_export_challenge' => ['string|null', 'spkac'=>'string'],