Req #70438 [NEW]: Add IV parameter for openssl_seal and openssl_open
| From: | bukka@php.net | Date: | Sun, 06 Sep 2015 17:16:55 +0000 |
| Subject: | Req #70438 [NEW]: Add IV parameter for openssl_seal and openssl_open | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-195807@lists.php.net to get a copy of this message | ||
From: bukka
Operating system: any
PHP version: 7.0.0RC2
Package: OpenSSL related
Bug Type: Feature/Change Request
Bug description:Add IV parameter for openssl_seal and openssl_open
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 bug report at https://bugs.php.net/bug.php?id=70438&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=70438&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=70438&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=70438&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=70438&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=70438&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=70438&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=70438&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=70438&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=70438&r=support
Expected behavior: https://bugs.php.net/fix.php?id=70438&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=70438&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=70438&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=70438&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=70438&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=70438&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=70438&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=70438&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=70438&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=70438&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=70438&r=mysqlcfg