Skip to content

Commit d0ec272

Browse files
Cristian101KevinBKozan
authored andcommitted
MQE-804: Unable to make API requests using self signed certificate to HTTPS domain
- Added 'CURLOPT_SSL_VERIFYHOST' to the default curl options so that self signed certificates can work, for development purposes - Ignoring ssl verification in ModuleResolver
1 parent e14e258 commit d0ec272

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/Magento/FunctionalTestingFramework/Util/ModuleResolver.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,8 @@ public function getEnabledModules()
147147
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
148148
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
149149
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
150+
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
151+
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
150152
$response = curl_exec($ch);
151153

152154
if (!$response) {
@@ -277,6 +279,8 @@ protected function getAdminToken()
277279
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
278280
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
279281
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
282+
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
283+
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
280284

281285
$response = curl_exec($ch);
282286
if (!$response) {

src/Magento/FunctionalTestingFramework/Util/Protocol/CurlTransport.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ public function write($url, $body = [], $method = CurlInterface::POST, $headers
134134
CURLOPT_COOKIEFILE => '',
135135
CURLOPT_HTTPHEADER => $headers,
136136
CURLOPT_SSL_VERIFYPEER => false,
137+
CURLOPT_SSL_VERIFYHOST => false,
137138
];
138139
switch ($method) {
139140
case CurlInterface::POST:

0 commit comments

Comments
 (0)