From c4ee761db1c2378bdbaa6cc9b16feab37c0c3ce6 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Sat, 5 Nov 2005 22:02:40 +0000 Subject: [PATCH] MFB51: Fixed bug #31971 (ftp_login fails on some SSL servers) --- ext/ftp/ftp.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ext/ftp/ftp.c b/ext/ftp/ftp.c index 38d972c48d..563570cda4 100644 --- a/ext/ftp/ftp.c +++ b/ext/ftp/ftp.c @@ -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"); -- 2.40.0