Tests: Force RestAPI unit tests not to verify SSL certificate as most dev / test envs are self-signed

This commit is contained in:
Molkobain
2023-02-10 23:07:27 +01:00
parent f65e14397c
commit dbd58cfeb6

View File

@@ -239,6 +239,10 @@ JSON;
curl_setopt($ch, CURLOPT_POST, 1);// set post data to true
curl_setopt($ch, CURLOPT_POSTFIELDS, $aPostFields);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// Force disable of certificate check as most of dev / test env have a self-signed certificate
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
$sJson = curl_exec($ch);
curl_close ($ch);