Req #70438 [Asn->Csd]: Add IV parameter for openssl_seal and openssl_open
| From: | bukka@php.net | Date: | Sun, 06 Sep 2015 18:16:00 +0000 |
| Subject: | Req #70438 [Asn->Csd]: Add IV parameter for openssl_seal and openssl_open | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-195811@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=70438&edit=1
ID: 70438
Updated by: bukka@php.net
Reported by: bukka@php.net
Summary: Add IV parameter for openssl_seal and openssl_open
-Status: Assigned
+Status: Closed
Type: Feature/Change Request
Package: OpenSSL related
Operating System: any
PHP Version: 7.0.0RC2
Assigned To: bukka
Block user comment: N
Private report: N
New Comment:
Fixed in http://git.php.net/?p=php-src.git;a=commit;h=e235cb65fbb2b16eb6ee35c0786d9f42f1a74e2c
Previous Comments:
------------------------------------------------------------------------
[2015-09-06 17:16:53] bukka@php.net
Description:
------------
The openssl_seal and openssl_open cannot be used with cipher algorithms requiring IV (e.g.
AES-128-CBC)
Test script:
---------------
<?php
$data = "openssl_seal() test";
$cipher = 'AES-128-CBC';
// if in ext/openssl/tests
$pub_key = "file://" . dirname(__FILE__) . "/public.key";
$priv_key = "file://" . dirname(__FILE__) . "/private.key";
openssl_seal($data, $sealed, $ekeys, array($pub_key, $pub_key), $cipher, $iv);
openssl_open($sealed, $decrypted, $ekeys[0], $priv_key, $cipher, $iv);
echo $decrypted;
Expected result:
----------------
openssl_seal() test
Actual result:
--------------
Warning that ciphers with IV are not supported.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=70438&edit=1