php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #70438 Add IV parameter for openssl_seal and openssl_open
Submitted: 2015-09-06 17:16 UTC Modified: 2015-09-06 18:15 UTC
From: bukka@php.net Assigned: bukka (profile)
Status: Closed Package: OpenSSL related
PHP Version: 7.0.0RC2 OS: any
Private report: No CVE-ID: None
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
29 + 35 = ?
Subscribe to this entry?

 
 [2015-09-06 17:16 UTC] 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.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-09-06 17:17 UTC] bukka@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: bukka
 [2015-09-06 18:15 UTC] bukka@php.net
-Status: Assigned +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Oct 15 12:01:27 2024 UTC