/* TODO: read cookies and options from context */
if (context && !strncasecmp(filename, "http", sizeof("http")-1)) {
+ 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);
+ } else {
+ curl_easy_setopt(curlstream->curl, CURLOPT_SSL_VERIFYHOST, 0);
+ }
+ if (SUCCESS == php_stream_context_get_option(context, "http", "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);
+ }
+
/* HTTP(S) */
if (SUCCESS == php_stream_context_get_option(context, "http", "user_agent", &ctx_opt) && Z_TYPE_PP(ctx_opt) == IS_STRING) {
curl_easy_setopt(curlstream->curl, CURLOPT_USERAGENT, Z_STRVAL_PP(ctx_opt));