From 721373cc9d23b9c15ac8cede3040a8b54de411c7 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Sat, 5 Nov 2005 22:03:28 +0000 Subject: [PATCH] MFH: Fixed bug #31971 (ftp_login fails on some SSL servers). --- NEWS | 2 ++ ext/ftp/ftp.c | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index b6ce9ea0bb..f4d1b90129 100644 --- 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) diff --git a/ext/ftp/ftp.c b/ext/ftp/ftp.c index fdb1061da8..999e7f5934 100644 --- a/ext/ftp/ftp.c +++ b/ext/ftp/ftp.c @@ -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"); -- 2.50.1