0
0
mirror of https://github.com/minecraft-linux/appimage-builder.git synced 2025-05-07 01:51:32 +00:00
Files
Minecraft-Launcher-appimage/curlAppImageCA.h

14 lines
438 B
C
Raw Normal View History

2020-04-29 15:42:16 +02:00
#include <curl/curl.h>
#include <cstdlib>
#include <sstream>
static inline CURL * __curl_easy_init() {
CURL * curl = curl_easy_init();
const char* appdir = getenv("APPDIR");
if (appdir) {
std::ostringstream cacert;
cacert << appdir << "/usr/share/mcpelauncher/cacert.pem";
curl_easy_setopt(curl, CURLOPT_CAINFO, cacert.str().data());
}
return curl;
}
#define curl_easy_init() __curl_easy_init()