diff options
author | Pierrick Charron <pierrick@php.net> | 2012-12-21 19:27:51 -0500 |
---|---|---|
committer | Pierrick Charron <pierrick@php.net> | 2012-12-21 19:27:51 -0500 |
commit | e3c88d16b400cc4f69c5533239343bf14220ae2c (patch) | |
tree | 0e0d7c6e64fd84513c5b81c20be992d36cc94e45 /ext/curl/streams.c | |
parent | 52e7b0ce2cb9a8276a423920d7bf6f0f8bffd4df (diff) | |
parent | 5499c7d201ad22f551dfc370ae09132acf4f75ec (diff) | |
download | php-git-e3c88d16b400cc4f69c5533239343bf14220ae2c.tar.gz |
Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
Update NEWS file
Fixed bug #63352 (Can't enable hostname validation when using curl stream wrappers)
CURL >= 7.28.0 no longer support value 1 for CURLOPT_SSL_VERIFYHOST)
Diffstat (limited to 'ext/curl/streams.c')
-rw-r--r-- | ext/curl/streams.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/curl/streams.c b/ext/curl/streams.c index 887c6f572c..2f2e0de865 100644 --- a/ext/curl/streams.c +++ b/ext/curl/streams.c @@ -331,7 +331,7 @@ php_stream *php_curl_stream_opener(php_stream_wrapper *wrapper, char *filename, } if (SUCCESS == php_stream_context_get_option(context, "http", "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); + curl_easy_setopt(curlstream->curl, CURLOPT_SSL_VERIFYHOST, 2); } else { curl_easy_setopt(curlstream->curl, CURLOPT_SSL_VERIFYHOST, 0); } @@ -420,7 +420,7 @@ php_stream *php_curl_stream_opener(php_stream_wrapper *wrapper, char *filename, } } 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); + curl_easy_setopt(curlstream->curl, CURLOPT_SSL_VERIFYHOST, 2); } else { curl_easy_setopt(curlstream->curl, CURLOPT_SSL_VERIFYHOST, 0); } |