Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions libraries/Curl.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,21 @@ public function proxy_login($username = '', $password = '')
return $this;
}

public function ssl( $verify_peer = TRUE, $verify_host = 2, $path_to_cert = NULL) {
if ($verify_peer)
{
$this->option(CURLOPT_SSL_VERIFYPEER, TRUE);
$this->option(CURLOPT_SSL_VERIFYHOST, $verify_host);
$this->option(CURLOPT_CAINFO, $path_to_cert);
}
else
{
$this->option(CURLOPT_SSL_VERIFYPEER, FALSE);
}
return $this;
}


public function options($options = array())
{
// Merge options in with the rest - done as array_merge() does not overwrite numeric keys
Expand Down