Bug #69271 [Com]: ext/phar/tests/zip/phar_setsignaturealgo2.phpt fails
| From: | ondrej@php.net | Date: | Fri, 20 Mar 2015 15:38:10 +0000 |
| Subject: | Bug #69271 [Com]: ext/phar/tests/zip/phar_setsignaturealgo2.phpt fails | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-191490@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=69271&edit=1
ID: 69271
Comment by: ondrej@php.net
Reported by: ondrej@php.net
Summary: ext/phar/tests/zip/phar_setsignaturealgo2.phpt fails
Status: Open
Type: Bug
Package: PHAR related
Operating System: Debian wheezy
PHP Version: 5.4.39
Block user comment: N
Private report: N
New Comment:
I can reproduce the bug when running tests as a part of Debian package building process, however I
cannot reproduce this when running this separately.
I will try to get some more useful information during next week (unless somebody has an idea what
might be happening...)
Previous Comments:
------------------------------------------------------------------------
[2015-03-20 15:05:11] ondrej@php.net
Description:
------------
It looks like there's something fishy going on in phar/zip, as the test fails with the SHA-512
output listed twice instead of one SHA-512 and one OpenSSL.
Rerunning the test manually (copying out the script part from .phpt) works fine:
php -n -d phar.require_hash=0 -d phar.readonly=0 phar_setsignaturealgo2.php
[...see Expected results...]
so this might happen only in a very rare cases, but I don't recall this happening before, so it
might have been introduced in 5.4.39.
Looks like this might happen if signing with openssl fails (the SHA-512 signature is retained),
related bug: https://bugs.php.net/bug.php?id=61906
Unfortunately no warnings were provided this time and I cannot reproduce the issue except this one
build.
Test script:
---------------
Standard test as found in ext/phar/tests/zip/phar_setsignaturealgo2.phpt
Expected result:
----------------
array(2) {
["hash"]=>
string(32) "41F52A687D44E275EDD28190A95BA9A7"
["hash_type"]=>
string(3) "MD5"
}
array(2) {
["hash"]=>
string(32) "41F52A687D44E275EDD28190A95BA9A7"
["hash_type"]=>
string(3) "MD5"
}
array(2) {
["hash"]=>
string(40) "BB20CA7A9336A23FABA77DF462D249AA17EF8BA1"
["hash_type"]=>
string(5) "SHA-1"
}
array(2) {
["hash"]=>
string(64) "2B70E40D73E36B241804714D2F66DE10A00763AE17911EB0385181F98841CB3A"
["hash_type"]=>
string(7) "SHA-256"
}
array(2) {
["hash"]=>
string(128)
"624BECAE7FE58642594E0A2ECDE2729D86E35955E6461CE287C1A1A5D040CF902CE2EA2DB1EB5D76B2B64F5F7DDA9613FE63C15A46435120408FE92ED67F104A"
["hash_type"]=>
string(7) "SHA-512"
}
array(2) {
["hash"]=>
string(256)
"CD8B9E756A7096EE51420C130814AA8585E05E8004DA05EE6B1E035087CB05574BF5C40D8353E432EE2C904E99D1E77F71F6942E2F2CB747695CE6C7C46EC3F3E41DE636C7077DAC54E7049A4F361C1C9B39EA8E535B816AB3D8794DAD5915A09D1A505FD4C165ACAF46D78D9A6CDDBE7AFE6FC65C67AB7684A0EC593B8361AF"
["hash_type"]=>
string(7) "OpenSSL"
}
Actual result:
--------------
array(2) {
["hash"]=>
string(40) "3D26CC3B912BBB02C55F649706E8B39883C60E88"
["hash_type"]=>
string(5) "SHA-1"
}
array(2) {
["hash"]=>
string(32) "B8B09BC157C79208E9E8FF6D65C22591"
["hash_type"]=>
string(3) "MD5"
}
array(2) {
["hash"]=>
string(40) "3D26CC3B912BBB02C55F649706E8B39883C60E88"
["hash_type"]=>
string(5) "SHA-1"
}
array(2) {
["hash"]=>
string(64) "ED774B2ACAC8AE2C806CC0C205B26EF3E757C5F5893AC59B7F0B432D8F777939"
["hash_type"]=>
string(7) "SHA-256"
}
array(2) {
["hash"]=>
string(128)
"F6A3978098FA4ED528FB354C5AC026F82C7A33561C1D7A89753830B33666BB304EAB062C4C9A808547F5C220F0B13CBD7F548D401489F8645BB12302F689D09E"
["hash_type"]=>
string(7) "SHA-512"
}
array(2) {
["hash"]=>
string(128)
"F6A3978098FA4ED528FB354C5AC026F82C7A33561C1D7A89753830B33666BB304EAB062C4C9A808547F5C220F0B13CBD7F548D401489F8645BB12302F689D09E"
["hash_type"]=>
string(7) "SHA-512"
}
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=69271&edit=1