public function ClientInterface::setSslVerification

Set SSL verification options.

Setting $certificateAuthority to TRUE will result in the bundled cacert.pem being used to verify against the remote host.

Alternate certificates to verify against can be specified with the $certificateAuthority option set to a certificate file location to be used with CURLOPT_CAINFO, or a certificate directory path to be used with the CURLOPT_CAPATH option.

Setting $certificateAuthority to FALSE will turn off peer verification, unset the bundled cacert.pem, and disable host verification. Please don't do this unless you really know what you're doing, and why you're doing it.

Parameters

string|bool $certificateAuthority bool, file path, or directory path:

bool $verifyPeer FALSE to stop cURL from verifying the peer's certificate.:

int $verifyHost Set the cURL handle's CURLOPT_SSL_VERIFYHOST option:

Return value

ClientInterface

1 method overrides ClientInterface::setSslVerification()
Client::setSslVerification in drupal/core/vendor/guzzle/http/Guzzle/Http/Client.php
Set SSL verification options.

File

drupal/core/vendor/guzzle/http/Guzzle/Http/ClientInterface.php, line 61

Class

ClientInterface
Client interface for send HTTP requests

Namespace

Guzzle\Http

Code

public function setSslVerification($certificateAuthority = true, $verifyPeer = true, $verifyHost = 2);