Compare commits
6 Commits
55202646ca
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| df146989df | |||
| 699dc354c8 | |||
| efca4fd3fd | |||
| 4d54533f9a | |||
| 558f964ce2 | |||
| 409c41e196 |
@@ -55,6 +55,8 @@ FetchContent_MakeAvailable(wolfssl)
|
|||||||
target_compile_definitions(wolfssl PUBLIC
|
target_compile_definitions(wolfssl PUBLIC
|
||||||
-DWOLFSSL_ALT_NAMES
|
-DWOLFSSL_ALT_NAMES
|
||||||
-DWOLFSSL_ALPN
|
-DWOLFSSL_ALPN
|
||||||
|
-DWOLFSSL_HAVE_MIN
|
||||||
|
-DWOLFSSL_HAVE_MAX
|
||||||
)
|
)
|
||||||
|
|
||||||
# ---------------------
|
# ---------------------
|
||||||
@@ -82,6 +84,10 @@ if (TINYMITM_LOGS OR $CACHE{TINYMITM_LOGS})
|
|||||||
target_compile_definitions(tinymitm PUBLIC TINYMITM_LOGS)
|
target_compile_definitions(tinymitm PUBLIC TINYMITM_LOGS)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (WIN32)
|
||||||
|
target_link_libraries(tinymitm PRIVATE crypt32)
|
||||||
|
endif()
|
||||||
|
|
||||||
# ------------------------------
|
# ------------------------------
|
||||||
# test
|
# test
|
||||||
# ------------------------------
|
# ------------------------------
|
||||||
|
|||||||
@@ -6,6 +6,8 @@
|
|||||||
#include <seallib/log.h>
|
#include <seallib/log.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <condition_variable>
|
||||||
|
#include <mutex>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
#include <queue>
|
#include <queue>
|
||||||
|
|||||||
@@ -13,13 +13,12 @@
|
|||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <wincrypt.h>
|
#include <wincrypt.h>
|
||||||
#pragma comment(lib, "crypt32.lib")
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
CertificateManager implementation
|
CertificateManager implementation
|
||||||
*/
|
*/
|
||||||
CertificateManager::CertificateManager() : _rng(new WC_RNG()), _caKey(nullptr), _sessionKey(nullptr) {}
|
CertificateManager::CertificateManager() : _caKey(nullptr), _sessionKey(nullptr), _rng(new WC_RNG()) {}
|
||||||
|
|
||||||
CertificateManager::~CertificateManager()
|
CertificateManager::~CertificateManager()
|
||||||
{
|
{
|
||||||
@@ -148,7 +147,7 @@ bool CertificateManager::installCertificate()
|
|||||||
(DWORD)_caCertDer.size());
|
(DWORD)_caCertDer.size());
|
||||||
|
|
||||||
if (!certCtx) return false;
|
if (!certCtx) return false;
|
||||||
HCERTSTORE rootStore = CertOpenStore(CERT_STORE_PROV_SYSTEM, 0, NULL, CERT_SYSTEM_STORE_CURRENT_USER, L"Root");
|
HCERTSTORE rootStore = CertOpenStore(CERT_STORE_PROV_SYSTEM, 0, 0, CERT_SYSTEM_STORE_CURRENT_USER, L"Root");
|
||||||
bool success = false;
|
bool success = false;
|
||||||
if (rootStore)
|
if (rootStore)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user