Skip to content

Commit

Permalink
fix SSL Cert issue
Browse files Browse the repository at this point in the history
  • Loading branch information
RicardoLuis0 committed Jun 2, 2022
1 parent 4677857 commit e92d056
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions build_debug.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
windres --input=GZDoomUpdater.rc --output=GZDoomUpdater.res --output-format=coff
g++.exe -Wextra -Wall -fexceptions -Wno-unused -fno-strict-aliasing -municode -std=c++17 -Wno-uninitialized -g util.cpp json.cpp main.cpp -lversion -lshlwapi -lcurl -lzip -mwindows -o GZDoomUpdater.exe GZDoomUpdater.res
7 changes: 6 additions & 1 deletion main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,12 @@ static VersionTriplet getLatestVersion(){
curl_easy_setopt(curl,CURLOPT_ACCEPT_ENCODING,"application/vnd.github.v3+json");
curl_easy_setopt(curl,CURLOPT_NOPROGRESS,0L);

curl_easy_setopt(curl,CURLOPT_SSL_OPTIONS,CURLSSLOPT_NATIVE_CA);

curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION,1L);

if(curl_easy_perform(curl)!=CURLE_OK){
int err = curl_easy_perform(curl);
if(err != CURLE_OK){
//curl_easy_perform failed -- no internet?
return (VersionTriplet){0,0,0};
}
Expand Down Expand Up @@ -337,6 +340,8 @@ static void downloaderThreadProc(){

curl_easy_setopt(curl,CURLOPT_MAXREDIRS,50L);

curl_easy_setopt(curl,CURLOPT_SSL_OPTIONS,CURLSSLOPT_NATIVE_CA);

int err=curl_easy_perform(curl);

if(err!=CURLE_OK){
Expand Down

0 comments on commit e92d056

Please sign in to comment.