|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-05-28 13:18 UTC] wez@php.net
[2004-06-06 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 11:00:02 2025 UTC |
Description: ------------ When using openssl_pkcs7_encrypt, Apache seg faults. I can perform the same smime related function with openssl alone but not in PHP. I have tried different sized messages, different headers, different certs, etc and it always seg faults. Reproduce code: --------------- $headers_array = explode("\r\n", $header); $infilename = tempnam("/tmp/", "smime-in-"); $outfilename = tempnam("/tmp/", "smime-out-"); unlink($outfilename); $fp2 = fopen($infilename, "w"); fwrite($fp2, $mimeData.substr($message, strpos($message, "\r\n\r\n") + 2)."\r\n"); fclose($fp2); $cert = $cert_array[0]; $encrypted = openssl_pkcs7_encrypt($infilename, $outfilename, $cert, $headers_array, 0); Expected result: ---------------- smime encrypted data to be written to $outfilename. Actual result: -------------- When ran in a browser the page stays the same and doesn't move on to the page the code is being ran on and I get "child pid 5314 exit signal Segmentation fault (11)" in the Apache error log. When ran from the command line I get a sefmentation fault and a core dumped. Here is the backtrace. Doesn't seem to be much there. (gdb) bt #0 0x08224f5d in PKCS7_dataInit () #1 0x08380160 in ?? ()