mirror of
https://github.com/moonlight-stream/moonlight-chrome.git
synced 2025-08-16 08:06:19 +00:00
Add a CA bundle for CURL
This commit is contained in:
parent
fbc1e83ebe
commit
232e3c57f3
4
http.cpp
4
http.cpp
@ -5,6 +5,7 @@
|
||||
#include <http.h>
|
||||
#include <errors.h>
|
||||
#include <string.h>
|
||||
#include <sys/mount.h>
|
||||
|
||||
#include <mkcert.h>
|
||||
#include <openssl/bio.h>
|
||||
@ -101,6 +102,9 @@ void MoonlightInstance::NvHTTPInit(int32_t callbackId, pp::VarArray args)
|
||||
std::string _key = args.Get(1).AsString();
|
||||
std::string _uniqueId = args.Get(2).AsString();
|
||||
|
||||
// Mount resource directory where CA bundle resides
|
||||
mount("static/curl", "/curl", "httpfs", 0, "");
|
||||
|
||||
// This will initialize OpenSSL
|
||||
curl_global_init(CURL_GLOBAL_DEFAULT);
|
||||
|
||||
|
@ -67,9 +67,7 @@ int http_request(const char* url, const char* ppkstr, PHTTP_DATA data) {
|
||||
if (!curl)
|
||||
return GS_FAILED;
|
||||
|
||||
curl_easy_setopt(curl, CURLOPT_SSLENGINE_DEFAULT, 1L);
|
||||
curl_easy_setopt(curl, CURLOPT_SSLCERTTYPE,"PEM");
|
||||
curl_easy_setopt(curl, CURLOPT_SSLKEYTYPE, "PEM");
|
||||
curl_easy_setopt(curl, CURLOPT_CAINFO, "/curl/ca-bundle.crt");
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, _write_curl);
|
||||
curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1L);
|
||||
curl_easy_setopt(curl, CURLOPT_SSL_CTX_FUNCTION, *sslctx_function);
|
||||
|
3466
static/curl/ca-bundle.crt
Normal file
3466
static/curl/ca-bundle.crt
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user