Centralize legacy network TLS policy

This commit is contained in:
2026-06-04 17:53:49 +02:00
parent c698de1482
commit 148aceb705
12 changed files with 73 additions and 26 deletions

View File

@@ -1,6 +1,7 @@
#include "pch.h"
#include "log.h"
#include "asset.h"
#include "platform_api/network_tls_policy.h"
#ifdef __APPLE__
#include <Foundation/Foundation.h>
@@ -187,9 +188,8 @@ bool Asset::open_url(const std::string& url, std::function<bool(float)> progress
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &tmp_data);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, curl_data_handler_asset);
curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1L);
#ifdef __ANDROID__
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
#endif
if (pp::platform::default_disables_network_tls_verification())
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
if (progress)
{
on_progress = progress;