php IHDR w Q )Ba pHYs sRGB gAMA a IDATxMk\U s&uo,mD )Xw+e?tw.oWp;QHZnw`gaiJ9̟灙a=nl[ ʨ G;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ y H@E7j 1j+OFRg}ܫ;@Ea~ j`u'o> j- $_q?qS XzG'ay
files >> /php-7.1.11/ext/openssl/tests/ |
files >> //php-7.1.11/ext/openssl/tests/bug71917.phpt |
--TEST-- Bug #71917: openssl_open() returns junk on envelope < 16 bytes --SKIPIF-- <?php if (!extension_loaded("openssl")) die("skip openssl not loaded"); ?> --FILE-- <?php function test($envkey) { $publicKey = "file://" . dirname(__FILE__) . "/public.key"; $privateKey = "file://" . dirname(__FILE__) . "/private_rsa_1024.key"; openssl_public_encrypt($envkey, $envelope, $publicKey); $sealed = openssl_encrypt('plaintext', 'rc4', $envkey, OPENSSL_RAW_DATA | OPENSSL_DONT_ZERO_PAD_KEY); openssl_open($sealed, $output, $envelope, $privateKey, 'rc4'); var_dump($output === 'plaintext'); } // works - key of 16 bytes test('1234567890123456i'); // fails - key of 15 bytes test('123456789012345'); ?> --EXPECT-- bool(true) bool(true)y~or5J={Eeu磝Qk ᯘG{?+]ן?wM3X^歌>{7پK>on\jy Rg/=fOroNVv~Y+ NGuÝHWyw[eQʨSb> >}Gmx[o[<{Ϯ_qFvM IENDB`