X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2FHttpFunctions.php;h=ab27a7437d141d9cd1fc9721d83695f93e32bf0f;hb=bce969ea1803ba77ad4dfbdb2d5057a34c496d1e;hp=e621f625aca13cf07bf3d8d93add51d1a4a465ac;hpb=6ba46741dcec813a870bd30fa9146d438c1af57b;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/HttpFunctions.php b/includes/HttpFunctions.php index e621f625ac..ab27a7437d 100644 --- a/includes/HttpFunctions.php +++ b/includes/HttpFunctions.php @@ -45,7 +45,9 @@ class Http { * Otherwise it will use $wgHTTPProxy (if set) * Otherwise it will use the environment variable "http_proxy" (if set) * - noProxy Don't use any proxy at all. Takes precedence over proxy value(s). - * - sslVerifyHost (curl only) Verify hostname against certificate + * - sslVerifyHost (curl only) Set to 2 to verify hostname against certificate + * Setting to 1 (or true) will NOT verify the host name. It will + * only check its existence. Setting to 0 (or false) disables entirely. * - sslVerifyCert (curl only) Verify SSL certificate * - caInfo (curl only) Provide CA information * - maxRedirects Maximum number of redirects to follow (defaults to 5) @@ -185,7 +187,15 @@ class MWHttpRequest { protected $postData = null; protected $proxy = null; protected $noProxy = false; - protected $sslVerifyHost = true; + /** + * Parameter passed to Curl that specifies whether + * to validate SSL certificates. + * + * Setting to 0 disables entirely. Setting to 1 checks + * the existence of a CN, but doesn't verify it. Setting + * to 2 (the default) actually verifies the host. + */ + protected $sslVerifyHost = 2; protected $sslVerifyCert = true; protected $caInfo = null; protected $method = "GET";