WordPress.org

Make WordPress Core

Changeset 17616


Ignore:
Timestamp:
04/07/11 08:38:36 (3 years ago)
Author:
dd32
Message:

Verify certificate matches both the common name and the provided hostname. WP_HTTP_Curl requires CURLOPT_SSL_VERIFYHOST be either 2 or false. Props sivel. Fixes #16904

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class-http.php

    r17600 r17616  
    11911191        curl_setopt( $handle, CURLOPT_URL, $url); 
    11921192        curl_setopt( $handle, CURLOPT_RETURNTRANSFER, true ); 
    1193         curl_setopt( $handle, CURLOPT_SSL_VERIFYHOST, $ssl_verify ); 
     1193        curl_setopt( $handle, CURLOPT_SSL_VERIFYHOST, ( $ssl_verify === true ) ? 2 : false ); 
    11941194        curl_setopt( $handle, CURLOPT_SSL_VERIFYPEER, $ssl_verify ); 
    11951195        curl_setopt( $handle, CURLOPT_USERAGENT, $r['user-agent'] ); 
Note: See TracChangeset for help on using the changeset viewer.