ID: 28754
Updated by: [EMAIL PROTECTED]
Reported By: toppi at kacke dot de
-Status: Open
+Status: Closed
Bug Type: Sockets related
Operating System: linux/unix
PHP Version: 4.3.4
New Comment:
Won't fix in PHP 4.x or 5.0.x.
Current HEAD now has:
bool stream_socket_enable_crypto($stream, $enable [, $kind [,
$session]]);
$stream = fsockopen('tcp://host', $port);
...
// now turn on SSL
stream_socket_enable_crypto($stream, true,
STREAM_CRYPTO_METHOD_SSLv23_CLIENT);
...
// we can turn it off too
stream_socket_enable_crypto($stream, false);
The $session parameter is optional and can be used to seed the crypto
layer with the session ID from another, separate, SSL enable stream;
something that might be useful if you open a second DATA connection for
ftp.
Previous Comments:
------------------------------------------------------------------------
[2004-07-22 12:35:53] toppi at kacke dot de
Maybe an idea...
What about to add something like SSLv23_client_method() ?
kinda STREAM_get_SSLv23_client() ?
So you could easy add the tls/ssl layer to any FP created by
fsockopen(), fopen() etc... ? Imo would be a kewl thingy to make it
some more flexible.
Also i have no clue if this is possible :) just an idea !
ps.
Wez ... if you feel bored sometimes, please remeber this :-)
------------------------------------------------------------------------
[2004-07-14 20:12:10] toppi at kacke dot de
And last but not least (hope) the final release of php5 tells me the
same.
------------------------------------------------------------------------
[2004-07-14 20:06:36] toppi at kacke dot de
We did the following on a OS: Fedora Core 2 Linux
Version 4.3.8
/configure --prefix=/home/simon/php348
--with-mysql=/usr/local/mysql-4.0.18 --with-zlib --enable-ftp
--with-curl --enable-bcmath --with-openssl --with-mcrypt --with-mhash
--enable-pcntl --enable-shmop --enable-sockets --enable-sysvmsg
--enable-sysvsem --enable-sysvshm
GIves Error:
<b>Warning</b>: fsockopen(): SSL operation failed with code 1. OpenSSL
Error messages:
error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol in
<b>/home/simon/php348--with-mysql=/usr/local/mysql-4.0.18/bin/test.php</b>
on line <b>4</b><br />
error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number in
<b>/home/simon/php348--with-mysql=/usr/local/mysql-4.0.18/bin/test.php</b>
on line <b>4</b><br />
b>Warning</b>: fsockopen(): php_stream_sock_ssl_activate_with_method:
SSL handshake/connection failed in
<b>/home/simon/php348--with-mysql=/usr/local/mysql-4.0.18/bin/test.php</b>
on line <b>4</b><br />
<b>Warning</b>: fsockopen(): failed to activate SSL mode 2 in
<b>/home/simon/php348--with-mysql=/usr/local/mysql-4.0.18/bin/test.php</b>
on line <b>4</b><br />
failed SSLhandshake<br />
PHP 5 RC3
PHP Warning: fsockopen() [<a
href='function.fsockopen'>function.fsockopen</a>]: SSL operation failed
with code 1. OpenSSL Error messages:
error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol in
/home/simon/php348/bin/test.php on line 4
------------------------------------------------------------------------
[2004-07-14 01:00:04] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, 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".
------------------------------------------------------------------------
[2004-07-06 16:02:45] [EMAIL PROTECTED]
Please update first to PHP 4.3.7!!
------------------------------------------------------------------------
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/28754
--
Edit this bug report at http://bugs.php.net/?id=28754&edit=1