]> granicus.if.org Git - php/commitdiff
MFH: Fixed bug #31971 (ftp_login fails on some SSL servers).
authorIlia Alshanetsky <iliaa@php.net>
Sat, 5 Nov 2005 22:03:28 +0000 (22:03 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Sat, 5 Nov 2005 22:03:28 +0000 (22:03 +0000)
NEWS
ext/ftp/ftp.c

diff --git a/NEWS b/NEWS
index b6ce9ea0bb6094fd7987b75f463fd855edd37f97..f4d1b901290df4c78a09988b74f5f26124ab7433 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -13,6 +13,8 @@ PHP 4                                                                      NEWS
   parameter on Windows). (Mike)
 - Fixed bug #33760 (cURL needs CRYPTO_callback functions to prevent locking).
   (Mike)
+- Fixed bug #31971 (ftp_login fails on some SSL servers).
+  (frantisek at augusztin dot com)
 
 31 Oct 2005, Version 4.4.1
 - Added missing safe_mode checks for image* functions and cURL. (Ilia)
index fdb1061da89baaafb89708eff47abdecb60dd0fa..999e7f5934142d24ab3233f1df5f60d634e66be4 100644 (file)
@@ -262,7 +262,9 @@ ftp_login(ftpbuf_t *ftp, const char *user, const char *pass TSRMLS_DC)
                                php_error_docref(NULL TSRMLS_CC, E_WARNING, "ftp_login: 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, "ftp_login: failed to create the SSL handle");
@@ -1402,7 +1404,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");