mirror of
https://github.com/mkxp-z/mkxp-z.git
synced 2025-09-10 12:02:53 +02:00
disable HTTPS cert verification only if building with SSL
This commit is contained in:
parent
ced6daede7
commit
90d5dda8fb
2 changed files with 7 additions and 1 deletions
|
@ -3250,6 +3250,7 @@
|
|||
"MKXPZ_VERSION=\"$(MARKETING_VERSION)\"",
|
||||
MKXPZ_MINIFFI,
|
||||
MKXPZ_DEBUG,
|
||||
MKXPZ_SSL,
|
||||
AL_LIBTYPE_STATIC,
|
||||
GLES2_HEADER,
|
||||
"$(MKXPZ_EXTRA_ARGS)",
|
||||
|
@ -3320,6 +3321,7 @@
|
|||
"MKXPZ_ALCDEVICE=ALCdevice",
|
||||
"MKXPZ_VERSION=\"$(MARKETING_VERSION)\"",
|
||||
MKXPZ_MINIFFI,
|
||||
MKXPZ_SSL,
|
||||
AL_LIBTYPE_STATIC,
|
||||
GLES2_HEADER,
|
||||
"$(MKXPZ_EXTRA_ARGS)",
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
#include <stdio.h>
|
||||
|
||||
#if defined(MKXPZ_SSL) || defined(MKXPZ_BUILD_XCODE)
|
||||
#if defined(MKXPZ_SSL)
|
||||
#define CPPHTTPLIB_OPENSSL_SUPPORT
|
||||
#endif
|
||||
#include "httplib.h"
|
||||
|
@ -116,7 +116,9 @@ HTTPResponse HTTPRequest::get() {
|
|||
httplib::Headers head;
|
||||
|
||||
// Seems to need to be disabled for now, at least on macOS
|
||||
#ifdef MKXPZ_SSL
|
||||
client.enable_server_certificate_verification(false);
|
||||
#endif
|
||||
|
||||
for (auto const h : _headers)
|
||||
head.emplace(h.first, h.second);
|
||||
|
@ -146,7 +148,9 @@ HTTPResponse HTTPRequest::post(StringMap &postData) {
|
|||
httplib::Params params;
|
||||
|
||||
// Seems to need to be disabled for now, at least on macOS
|
||||
#ifdef MKXPZ_SSL
|
||||
client.enable_server_certificate_verification(false);
|
||||
#endif
|
||||
|
||||
for (auto const h : _headers)
|
||||
head.emplace(h.first, h.second);
|
||||
|
|
Loading…
Add table
Reference in a new issue