ssl: fix build on non-MSVC platforms

This commit is contained in:
Adrien Béraud committed 2020-10-28 14:06:08 -04:00
1 parent 6c085ed975
commit 065be0621d
3 files changed
+7 -11

No files matched your search

+2 -5
View File
@@ -1,6 +1,7 @@
cmake_minimum_required (VERSION 3.1)
include(CMakePackageConfigHelpers)
include(CMakeDependentOption)
include(FindPkgConfig)
project (opendht)
set (opendht_VERSION_MAJOR 2)
@@ -125,11 +126,7 @@ set (CMAKE_CXX_STANDARD 14)
set (CMAKE_CXX_STANDARD_REQUIRED on)
if (NOT MSVC)
set(CXX_WARNINGS -Wno-return-type -Wall -Wextra
-Wnon-virtual-dtor
-pedantic-errors
-fvisibility=hidden)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_WARNINGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-return-type -Wall -Wextra -Wnon-virtual-dtor -pedantic-errors -fvisibility=hidden")
if (OPENDHT_SANITIZE)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fstack-protector-strong")
endif ()
+4 -4
View File
@@ -24,17 +24,17 @@
#include <windows.h>
#include <wincrypt.h>
#pragma comment(lib, "crypt32.lib")
#endif
#include <openssl/ssl.h>
#undef X509_NAME
#undef OCSP_REQUEST
#undef OCSP_RESPONSE
#endif /*WIN32*/
#ifdef __APPLE__
#include <Security/Security.h>
#endif /*__APPLE__*/
#ifdef _WIN32
#undef X509_NAME
#undef OCSP_REQUEST
#undef OCSP_RESPONSE
#define GENTIME_LENGTH 15
#define UTCTIME_LENGTH 13
#define ATOI2(ar) ((ar) += 2, ((ar)[-2] - '0') * 10 + ((ar)[-1] - '0'))
+1 -2
View File
@@ -30,8 +30,7 @@
#include <openssl/ocsp.h>
#include <openssl/ssl.h>
#include <openssl/asn1.h>
#include <crypto/x509.h>
#include <openssl/x509.h>
#define MAXAGE_SEC (14*24*60*60)
#define JITTER_SEC (60)