|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-09-29 14:36 UTC] wez@php.net
[2004-09-29 15:55 UTC] oskar at lanstorm dot org
[2004-09-29 16:49 UTC] wez@php.net
[2004-09-29 21:41 UTC] oskar at lanstorm dot org
[2004-10-23 13:57 UTC] mikael dot suvi at trigger dot ee
[2004-10-23 14:08 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Dec 04 21:00:02 2025 UTC |
Description: ------------ Hey. I`ve tried to send encrypted and signed e-mail via php using the openssl_pkcs7* functions and they crash my apache. Code looks like this... <? $data = <<<EOD To jest test wiadomosci. Powinna byc zaszyfrowana i podpisana cyfrowo. EOD; $plik = fopen('oskar.pem', 'r'); $key=fread($plik, 10000); fclose($plik); // save message to file $fp = fopen('msg.txt', 'w'); fwrite($fp, $data); fclose($fp); //podpisz if (openssl_pkcs7_sign('msg.txt', 'signed.txt', 'file:///usr/local/apache/htdocs/oskar.pem', array('file:///usr/local/apache/htdocs/oskar.pem', 'pass'), array('To' => 'Oskar <oskar@lanstorm.org>', 'From' => 'oskar <oskar@lanstorm.org>'))) { //szyfruj if (openssl_pkcs7_encrypt('signed.txt', 'enc.txt', $key, array('To' => 'Oskar <oskar@lanstorm.org>', 'From' => 'oskar <oskar@lanstorm.org>', 'Subject' => 'Zaszyfrowana i podpisana elektronicznie wiadomosc ze strony www.'))) { // slij exec(ini_get('sendmail_path') . ' < enc.txt'); } } else { echo(openssl_error_string()); } ?> When i`m lunching the script apache child process segfault:|. [Wed Sep 29 13:20:35 2004] [notice] child pid 2586 exit signal Segmentation fault (11) Everything else is ok.PHP works fine on "normal" (not using openssl functions) scripts.But on this one it crash.Code is good because somethimes it works and don`t crash. Regards.