Skip to content
This repository was archived by the owner on Jan 30, 2020. It is now read-only.

Commit c620830

Browse files
committed
Add support to sslcafile and sslcapath to cURL adapter
1 parent 8cd475b commit c620830

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/Client/Adapter/Curl.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,13 @@ public function connect($host, $port = 80, $secure = false)
209209
}
210210
}
211211

212+
if (isset($this->config['sslcafile']) && $this->config['sslcafile']) {
213+
curl_setopt($this->curl, CURLOPT_CAINFO, $this->config['sslcafile']);
214+
}
215+
if (isset($this->config['sslcapath']) && $this->config['sslcapath']) {
216+
curl_setopt($this->curl, CURLOPT_CAPATH, $this->config['sslcapath']);
217+
}
218+
212219
if (isset($this->config['maxredirects'])) {
213220
// Set Max redirects
214221
curl_setopt($this->curl, CURLOPT_MAXREDIRS, $this->config['maxredirects']);

0 commit comments

Comments
 (0)