ID: 13522 Comment by: stanislav dot chachkov at gmail dot com Reported By: kanareykin+nospam at denison dot edu Status: No Feedback Bug Type: OpenSSL related Operating System: SunOS 5.7 PHP Version: 4.0.6 New Comment:
I have exactly the same problem, with php4.3.10 / openssl OpenSSL 0.9.7e / on BSD/OS 4.2 i386 openssl_error_string return nothing, but openssl_seal returns false. This is the script: <?php function seal($info,$key){ if($pk = openssl_get_publickey($key)){ echo openssl_error_string();echo '<br>'; $res=openssl_seal($info, $sealed, $ekeys, array($pk)); echo openssl_error_string();echo '<br>'; var_dump($res);echo '<br>'; openssl_free_key($pk); return array('sealed'=>$sealed,'ekey'=>$ekeys[0]); } echo openssl_error_string();echo '<br>'; return FALSE; } $key="-----BEGIN CERTIFICATE----- MIIBdDCCAR4CAQAwDQYJKoZIhvcNAQEEBQAwRTELMAkGA1UEBhMCQVUxEzARBgNV BAgTClNvbWUtU3RhdGUxITAfBgNVBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0 ZDAeFw0wNTAxMTgxOTUyMjBaFw0wNTA3MTcxOTUyMjBaMEUxCzAJBgNVBAYTAkFV MRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBXaWRnaXRz IFB0eSBMdGQwXDANBgkqhkiG9w0BAQEFAANLADBIAkEAx7Z4soVmUJvKfhtBzKAP oRs9bdllaaTvy9I1kdf0AVFCKN7+US2LQBpGyCpTuENM+WQxJ6vGtJ2pYhGmbPm5 0QIDAQABMA0GCSqGSIb3DQEBBAUAA0EAlvwJFlCbuagfpc6XM7zY8JP0Gz+CXlbh NUjPgT8xkXzOBtjNxe+yNmhAfGyMXc7uKR+3tS6uHXzPvMg3PKCvqw== -----END CERTIFICATE----- "; print_r(seal("Secret data",$key));echo '<br>'; ?> Returns this: bool(false) Array ( [sealed] => [ekey] => ) The same script runs ok on another computer (php4.3.9/macosx) Previous Comments: ------------------------------------------------------------------------ [2002-04-19 00:00:05] php-bugs at lists dot php dot net No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". ------------------------------------------------------------------------ [2002-03-18 11:32:28] [EMAIL PROTECTED] Setting to feedback until then. I just thought of something you might try: just build but not install PHP 4.1.2 as a cgi and retry your script; you can run the php binary from the source folder and not risk upsetting the server. ------------------------------------------------------------------------ [2002-03-18 09:48:28] kanareykin+nospam at denison dot edu No. But we are planning the long-awaited PHP upgrade on that server and I might have some news soon. ------------------------------------------------------------------------ [2002-03-16 11:08:57] [EMAIL PROTECTED] Have you resolved this problem yet? ------------------------------------------------------------------------ [2001-10-11 15:09:41] kanareykin+nospam at denison dot edu I *probably* could, but I really wouldn't want to put RC on that machine. Also I don't think PHP version is the problem - the function should work on PHP 4 >= 4.0.4... it must be something in the configuration. Are there any scripts I could use to test if the openssl extension is set up properly? ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/13522 -- Edit this bug report at http://bugs.php.net/?id=13522&edit=1