Ignore revocation servers failure (Thanks 123DMWM)

This commit is contained in:
UnknownShadow200 2020-03-21 07:48:48 +11:00
parent f2aa0f06fc
commit a8b230bebc

View File

@ -567,8 +567,8 @@ static cc_result Http_StartRequest(struct HttpRequest* req, String* url, HINTERN
static const char* verbs[3] = { "GET", "HEAD", "POST" }; static const char* verbs[3] = { "GET", "HEAD", "POST" };
struct HttpCacheEntry entry; struct HttpCacheEntry entry;
String path; char pathBuffer[URL_MAX_SIZE + 1]; String path; char pathBuffer[URL_MAX_SIZE + 1];
DWORD flags, bufferLen;
cc_result res; cc_result res;
DWORD flags;
HttpCache_MakeEntry(url, &entry, &path); HttpCache_MakeEntry(url, &entry, &path);
Mem_Copy(pathBuffer, path.buffer, path.length); Mem_Copy(pathBuffer, path.buffer, path.length);
@ -583,6 +583,12 @@ static cc_result Http_StartRequest(struct HttpRequest* req, String* url, HINTERN
curReq = *handle; curReq = *handle;
if (!curReq) return GetLastError(); if (!curReq) return GetLastError();
/* ignore revocation stuff */
bufferLen = sizeof(flags);
InternetQueryOption(*handle, INTERNET_OPTION_SECURITY_FLAGS, (void*)&bufferLen, &flags);
flags |= SECURITY_FLAG_IGNORE_REVOCATION;
InternetSetOption(*handle, INTERNET_OPTION_SECURITY_FLAGS, &flags, sizeof(flags));
Http_SetRequestHeaders(req); Http_SetRequestHeaders(req);
return HttpSendRequestA(*handle, NULL, 0, req->data, req->size) ? 0 : GetLastError(); return HttpSendRequestA(*handle, NULL, 0, req->data, req->size) ? 0 : GetLastError();
} }