We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9a10085 commit e79d958Copy full SHA for e79d958
libraries/Curl.php
@@ -199,6 +199,21 @@ public function proxy_login($username = '', $password = '')
199
return $this;
200
}
201
202
+ public function ssl( $verify_peer = TRUE, $verify_host = 2, $path_to_cert = NULL) {
203
+ if ($verify_peer)
204
+ {
205
+ $this->option(CURLOPT_SSL_VERIFYPEER, TRUE);
206
+ $this->option(CURLOPT_SSL_VERIFYHOST, $verify_host);
207
+ $this->option(CURLOPT_CAINFO, $path_to_cert);
208
+ }
209
+ else
210
211
+ $this->option(CURLOPT_SSL_VERIFYPEER, FALSE);
212
213
+ return $this;
214
215
+
216
217
public function options($options = array())
218
{
219
// Merge options in with the rest - done as array_merge() does not overwrite numeric keys
0 commit comments