1
0
mirror of https://github.com/typemill/typemill.git synced 2025-07-25 00:02:28 +02:00

Add curl option for native ssl management

This commit is contained in:
trendschau
2025-02-16 11:23:39 +01:00
parent a8b836fd44
commit dce62d0038
2 changed files with 8 additions and 0 deletions

View File

@@ -69,6 +69,10 @@ class ControllerApiSystemVersions extends Controller
{
$curl = curl_init();
if (defined('CURLSSLOPT_NATIVE_CA') && version_compare(curl_version()['version'], '7.71', '>='))
{
curl_setopt($ch, CURLOPT_SSL_OPTIONS, CURLSSLOPT_NATIVE_CA);
}
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_TIMEOUT, 5);

View File

@@ -494,6 +494,10 @@ class License
if(in_array('curl', get_loaded_extensions()))
{
$curl = curl_init($url);
if (defined('CURLSSLOPT_NATIVE_CA') && version_compare(curl_version()['version'], '7.71', '>='))
{
curl_setopt($ch, CURLOPT_SSL_OPTIONS, CURLSSLOPT_NATIVE_CA);
}
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $postdata);