about summary refs log tree commit diff stats
path: root/src/ap_state.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ap_state.cpp')
-rw-r--r--src/ap_state.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/ap_state.cpp b/src/ap_state.cpp index 22a51ee..69c9e9f 100644 --- a/src/ap_state.cpp +++ b/src/ap_state.cpp
@@ -10,6 +10,7 @@
10#include <apuuid.hpp> 10#include <apuuid.hpp>
11#include <chrono> 11#include <chrono>
12#include <exception> 12#include <exception>
13#include <filesystem>
13#include <list> 14#include <list>
14#include <memory> 15#include <memory>
15#include <mutex> 16#include <mutex>
@@ -25,6 +26,7 @@ constexpr int AP_MAJOR = 0;
25constexpr int AP_MINOR = 4; 26constexpr int AP_MINOR = 4;
26constexpr int AP_REVISION = 0; 27constexpr int AP_REVISION = 0;
27 28
29constexpr const char* CERT_STORE_PATH = "cacert.pem";
28constexpr int ITEM_HANDLING = 7; // <- all 30constexpr int ITEM_HANDLING = 7; // <- all
29 31
30namespace { 32namespace {
@@ -108,7 +110,12 @@ void AP_Connect(std::string server, std::string player, std::string password) {
108 DestroyClient(); 110 DestroyClient();
109 } 111 }
110 112
111 apclient = new APClient(ap_get_uuid(""), "Lingo", server); 113 std::string cert_store = "";
114 if (std::filesystem::exists(CERT_STORE_PATH)) {
115 cert_store = CERT_STORE_PATH;
116 }
117
118 apclient = new APClient(ap_get_uuid(""), "Lingo", server, cert_store);
112 } 119 }
113 120
114 inventory.clear(); 121 inventory.clear();