#46127 [NEW]: Unable to create a SSL server using stream_socket_server
From: mark at hell dot ne dot jp
Operating system: Gentoo Linux
PHP version: 5.3.0alpha2
PHP Bug Type: OpenSSL related
Bug description: Unable to create a SSL server using stream_socket_server
Description:
------------
A SSL socket created with stream_socket_server() isn't able to accept any
connection. It returns an SSL_R_NO_SHARED_CIPHER error, as if the context
wasn't passed from the listener socket to the created socket in
stream_socket_accept()
This is causing me some problems as I'm writing an application which needs
SSL sockets.
Reproduce code:
---------------
http://ookoo.org/svn/snip/ssl_test/ssl_test.php
Expected result:
----------------
Running on 5.2.6-pl6-gentoo
Linux Memol.ooKoo.org 2.6.25-gentoo-r1-tux #1 SMP Sat Apr 19 21:17:22 CEST
2008 x86_64
Actual result:
--------------
Running on 5.3.0alpha2
Warning: stream_socket_accept(): SSL_R_NO_SHARED_CIPHER: no suitable
shared cipher could be used. This could be because the server is missing
an SSL certificate (local_cert context option) in
/home/magicaltux/projects/snip/ssl_test/ssl_test.php on line 14
Warning: stream_socket_accept(): Failed to enable crypto in
/home/magicaltux/projects/snip/ssl_test/ssl_test.php on line 14
Warning: stream_socket_accept(): accept failed: Success in
/home/magicaltux/projects/snip/ssl_test/ssl_test.php on line 14
Warning: fsockopen(): SSL operation failed with code 1. OpenSSL Error
messages:
error:14077410:SSL routines:func(119):reason(1040) in
/home/magicaltux/projects/snip/ssl_test/ssl_test.php on line 38
Warning: fsockopen(): Failed to enable crypto in
/home/magicaltux/projects/snip/ssl_test/ssl_test.php on line 38
Warning: fsockopen(): unable to connect to ssl://127.0.0.1:21673 (Unknown
error) in /home/magicaltux/projects/snip/ssl_test/ssl_test.php on line 38
--
Edit bug report at http://bugs.php.net/?id=46127&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46127&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46127&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46127&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=46127&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=46127&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=46127&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=46127&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=46127&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=46127&r=support
Expected behavior: http://bugs.php.net/fix.php?id=46127&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=46127&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=46127&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=46127&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46127&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=46127&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=46127&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=46127&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=46127&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=46127&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=46127&r=mysqlcfg
Thread (5 messages)
- mark at hell dot ne dot jp