From 273b7b3f5a45ff64fc85fa22e4d67b4dee9f639b Mon Sep 17 00:00:00 2001
From: Josh Stopper <josh@wholegraindigital.com>
Date: Tue, 24 Sep 2019 13:01:13 +0100
Subject: [PATCH] Fix SSL verification on multiple requests
---
cURL.php | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/cURL.php b/cURL.php
index 4429edb..c2c5b95 100644
|
a
|
b
|
class Requests_Transport_cURL implements Requests_Transport {
|
| 390 | 390 | curl_setopt($this->handle, CURLOPT_WRITEFUNCTION, array(&$this, 'stream_body')); |
| 391 | 391 | curl_setopt($this->handle, CURLOPT_BUFFERSIZE, Requests::BUFFER_SIZE); |
| 392 | 392 | } |
| | 393 | |
| | 394 | if (isset($options['verify'])) { |
| | 395 | if ($options['verify'] === false) { |
| | 396 | curl_setopt($this->handle, CURLOPT_SSL_VERIFYHOST, 0); |
| | 397 | curl_setopt($this->handle, CURLOPT_SSL_VERIFYPEER, 0); |
| | 398 | } |
| | 399 | elseif (is_string($options['verify'])) { |
| | 400 | curl_setopt($this->handle, CURLOPT_CAINFO, $options['verify']); |
| | 401 | } |
| | 402 | } |
| | 403 | |
| | 404 | if (isset($options['verifyname']) && $options['verifyname'] === false) { |
| | 405 | curl_setopt($this->handle, CURLOPT_SSL_VERIFYHOST, 0); |
| | 406 | } |
| 393 | 407 | } |
| 394 | 408 | |
| 395 | 409 | /** |