iliaa Wed Aug 30 18:21:27 2006 UTC Modified files: /php-src/ext/curl streams.c Log: Added ftps portion of the patch http://cvs.php.net/viewvc.cgi/php-src/ext/curl/streams.c?r1=1.21&r2=1.22&diff_format=u Index: php-src/ext/curl/streams.c diff -u php-src/ext/curl/streams.c:1.21 php-src/ext/curl/streams.c:1.22 --- php-src/ext/curl/streams.c:1.21 Wed Aug 30 17:49:28 2006 +++ php-src/ext/curl/streams.c Wed Aug 30 18:21:27 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: streams.c,v 1.21 2006/08/30 17:49:28 iliaa Exp $ */ +/* $Id: streams.c,v 1.22 2006/08/30 18:21:27 iliaa Exp $ */ /* This file implements cURL based wrappers. * NOTE: If you are implementing your own streams that are intended to @@ -375,6 +375,17 @@ } curl_easy_setopt(curlstream->curl, CURLOPT_MAXREDIRS, 20L); } + } else if (context && !strncasecmp(filename, "ftps", sizeof("ftps")-1)) { + if (SUCCESS == php_stream_context_get_option(context, "ftp", "curl_verify_ssl_host", &ctx_opt) && Z_TYPE_PP(ctx_opt) == IS_BOOL && Z_LVAL_PP(ctx_opt) == 1) { + curl_easy_setopt(curlstream->curl, CURLOPT_SSL_VERIFYHOST, 1); + } else { + curl_easy_setopt(curlstream->curl, CURLOPT_SSL_VERIFYHOST, 0); + } + if (SUCCESS == php_stream_context_get_option(context, "ftp", "curl_verify_ssl_peer", &ctx_opt) && Z_TYPE_PP(ctx_opt) == IS_BOOL && Z_LVAL_PP(ctx_opt) == 1) { + curl_easy_setopt(curlstream->curl, CURLOPT_SSL_VERIFYPEER, 1); + } else { + curl_easy_setopt(curlstream->curl, CURLOPT_SSL_VERIFYPEER, 0); + } } /* prepare for "pull" mode */
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php