]> granicus.if.org Git - php/commitdiff
Fixed bug #31971 (ftp_login fails on some SSL servers).
authorIlia Alshanetsky <iliaa@php.net>
Sat, 5 Nov 2005 22:02:15 +0000 (22:02 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Sat, 5 Nov 2005 22:02:15 +0000 (22:02 +0000)
Patch by: frantisek at augusztin dot com

NEWS
ext/ftp/ftp.c

diff --git a/NEWS b/NEWS
index 73b894adeafcaa355ddc315e818286034ac9c51a..2594f2f843a4b6ad8401380bf896dd5c462139c5 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,8 @@ PHP                                                                        NEWS
 - Fixed bug #35014 (array_product() always returns 0). (Ilia)
 - Fixed bug #34851 (SO_RECVTIMEO and SO_SNDTIMEO socket options expect integer
   parameter on Windows). (Mike)
+- Fixed bug #31971 (ftp_login fails on some SSL servers). 
+  (frantisek at augusztin dot com)
 
 28 Oct 2005, PHP 5.1 Release Candidate 4
 - Fixed fgetcsv() and fputcsv() inconsistency. (Dmitry)
index 38d972c48da7090c7c4b94d1c24147c4dd9dd708..563570cda4953cdfebe94f4618e8ff0434c5f8d8 100644 (file)
@@ -280,7 +280,9 @@ ftp_login(ftpbuf_t *ftp, const char *user, const char *pass TSRMLS_DC)
                                php_error_docref(NULL TSRMLS_CC, E_WARNING, "failed to create the SSL context");
                                return 0;
                        }
-                       
+
+                       SSL_CTX_set_options(ctx, SSL_OP_ALL);
+
                        ftp->ssl_handle = SSL_new(ctx);
                        if (ftp->ssl_handle == NULL) {
                                php_error_docref(NULL TSRMLS_CC, E_WARNING, "failed to create the SSL handle");
@@ -1513,7 +1515,9 @@ data_accepted:
                        php_error_docref(NULL TSRMLS_CC, E_WARNING, "data_accept: failed to create the SSL context");
                        return 0;
                }
-                       
+
+               SSL_CTX_set_options(ctx, SSL_OP_ALL);
+
                data->ssl_handle = SSL_new(ctx);
                if (data->ssl_handle == NULL) {
                        php_error_docref(NULL TSRMLS_CC, E_WARNING, "data_accept: failed to create the SSL handle");