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:
@@ -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);
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user