From 4eecfb8da9ec8d29cf46d6b023f6386a3ec05318 Mon Sep 17 00:00:00 2001 From: Thanasis Antoniou Date: Fri, 1 Nov 2019 18:56:41 +0200 Subject: ANDROID: Disable verification of certificates validity for cloud saving Also added macros for the plain (non-SDL) Android port __ANDROID_PLAIN_PORT__ and ANDROID_PLAIN_PORT The workaround of this commit uses the same logic as for the Nintendo Switch port and should suffice for testing purposes. It should be replaced by more elaborate code of installing and maintaining a certificates pem file. --- backends/networking/curl/networkreadstream.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'backends/networking/curl/networkreadstream.cpp') diff --git a/backends/networking/curl/networkreadstream.cpp b/backends/networking/curl/networkreadstream.cpp index be9779409b..59d2a5475c 100644 --- a/backends/networking/curl/networkreadstream.cpp +++ b/backends/networking/curl/networkreadstream.cpp @@ -84,9 +84,10 @@ void NetworkReadStream::init(const char *url, curl_slist *headersList, const byt curl_easy_setopt(_easy, CURLOPT_NOPROGRESS, 0L); curl_easy_setopt(_easy, CURLOPT_PROGRESSFUNCTION, curlProgressCallbackOlder); curl_easy_setopt(_easy, CURLOPT_PROGRESSDATA, this); -#ifdef NINTENDO_SWITCH +#if defined NINTENDO_SWITCH || defined ANDROID_PLAIN_PORT curl_easy_setopt(_easy, CURLOPT_SSL_VERIFYPEER, 0); #endif + #if LIBCURL_VERSION_NUM >= 0x072000 // CURLOPT_XFERINFOFUNCTION introduced in libcurl 7.32.0 // CURLOPT_PROGRESSFUNCTION is used as a backup plan in case older version is used @@ -139,9 +140,10 @@ void NetworkReadStream::init(const char *url, curl_slist *headersList, Common::H curl_easy_setopt(_easy, CURLOPT_NOPROGRESS, 0L); curl_easy_setopt(_easy, CURLOPT_PROGRESSFUNCTION, curlProgressCallbackOlder); curl_easy_setopt(_easy, CURLOPT_PROGRESSDATA, this); -#ifdef NINTENDO_SWITCH +#if defined NINTENDO_SWITCH || defined ANDROID_PLAIN_PORT curl_easy_setopt(_easy, CURLOPT_SSL_VERIFYPEER, 0); #endif + #if LIBCURL_VERSION_NUM >= 0x072000 // CURLOPT_XFERINFOFUNCTION introduced in libcurl 7.32.0 // CURLOPT_PROGRESSFUNCTION is used as a backup plan in case older version is used -- cgit v1.2.3