summaryrefslogtreecommitdiff
path: root/ext/ftp/ftp.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2005-11-05 22:02:15 +0000
committerIlia Alshanetsky <iliaa@php.net>2005-11-05 22:02:15 +0000
commit82814fc852d0a67529796d6f4923cc51a3b2e80c (patch)
treebe4d453c3200064bbf99c50a3a9a43390e596f58 /ext/ftp/ftp.c
parent2556b354b39ee31dfe81e4adf07e56eeb7c9a280 (diff)
downloadphp-git-82814fc852d0a67529796d6f4923cc51a3b2e80c.tar.gz
Fixed bug #31971 (ftp_login fails on some SSL servers).
Patch by: frantisek at augusztin dot com
Diffstat (limited to 'ext/ftp/ftp.c')
-rw-r--r--ext/ftp/ftp.c8
1 files 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");