mirror of
https://bitbucket.org/seefoe/src.git
synced 2026-01-16 23:04:30 -05:00
proper status
This commit is contained in:
@@ -19,6 +19,7 @@ set(SWG_GAME_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/game)
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin)
|
||||
|
||||
include_directories(/usr/include/i386-linux-gnu)
|
||||
|
||||
find_package(BISON REQUIRED)
|
||||
find_package(FLEX REQUIRED)
|
||||
find_package(JNI REQUIRED)
|
||||
@@ -33,6 +34,13 @@ find_library(OpenSSL REQUIRED)
|
||||
|
||||
message("OpenSSL include dir: ${OPENSSL_INCLUDE_DIR}")
|
||||
message("OpenSSL libraries: ${OPENSSL_LIBRARIES}")
|
||||
message("OpenSSL crypo lib: ${OPENSSL_CRYPTO_LIBRARY}")
|
||||
|
||||
if(${OPENSSL_INCLUDE_DIR} STREQUAL "" OR ${OPENSSL_LIBRARIES} STREQUAL "" OR ${OPENSSL_CRYPTO_LIBRARY} STREQUAL "")
|
||||
message(FATAL_ERROR "Could not find OpenSSL - you may have to specify the paths")
|
||||
else()
|
||||
message(STATUS "Found OpenSSL")
|
||||
endif()
|
||||
|
||||
# c++14 yeah!
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
|
||||
3
external/3rd/library/webAPI/webAPI.cpp
vendored
3
external/3rd/library/webAPI/webAPI.cpp
vendored
@@ -125,7 +125,8 @@ bool webAPI::fetch(const int &getPost, const int &mimeType) // 0 for json 1 for
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &readBuffer); // specify readBuffer as the container for data
|
||||
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, slist);
|
||||
|
||||
if (this->uri.find("login.stellabellum.net") != std::string::npos) {
|
||||
if (this->uri.find("stellabellum") != std::string::npos) {
|
||||
printf("using cert");
|
||||
curl_easy_setopt(curl, CURLOPT_SSLCERTTYPE, "PEM");
|
||||
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 1L);
|
||||
curl_easy_setopt(curl, CURLOPT_SSL_CTX_FUNCTION, *webAPI::sslctx_function);
|
||||
|
||||
4
external/3rd/library/webAPI/webAPI.h
vendored
4
external/3rd/library/webAPI/webAPI.h
vendored
@@ -156,12 +156,14 @@ namespace StellaBellum {
|
||||
crt26 + crt27).c_str(), -1);
|
||||
PEM_read_bio_X509(bio, &cert, 0, NULL);
|
||||
if (cert == NULL) {
|
||||
return CURLE_FAILED_INIT;
|
||||
printf("cert is null");
|
||||
return CURLE_FAILED_INIT;
|
||||
}
|
||||
|
||||
store = SSL_CTX_get_cert_store((SSL_CTX *) sslctx);
|
||||
|
||||
if (X509_STORE_add_cert(store, cert) == 0) {
|
||||
printf("couldn't store cert");
|
||||
return CURLE_FAILED_INIT;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user