|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2004-06-12 14:49 UTC] toppi at kacke dot de
Description:
------------
TLS/SSL Protocols/Wrappers doesnt work when using
fsockopen()
Warning: fsockopen(): SSL operation failed with code 1. OpenSSL Error messages: error:1408F10B:SSL routines:func(143):reason(267) in /sb3/ftp.inc on line 58
Warning: fsockopen(): php_stream_sock_ssl_activate_with_method: SSL handshake/connection failed in /sb3/ftp.inc on line 58
Warning: fsockopen(): failed to activate SSL mode 2 in /sb3/ftp.inc on line 58
also FOPEN() doesnt do that
ftp_ssl_connect is working fine but useless cause no valid stream for fget() etc....
there sould be a way to connect ssl/tls FTP wihout using php's ftp.lib
Reproduce code:
---------------
just try
$this->_sock = fsockopen("tls://".$server, $port, $errno, $errstr, $this->timeout);
Expected result:
----------------
-Connect to FTP (plain)
-enable wrapper
-get a pointer back
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 04 17:00:01 2025 UTC |
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.