Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4d54533f9a | |||
| 558f964ce2 | |||
| 409c41e196 |
@@ -82,6 +82,10 @@ if (TINYMITM_LOGS OR $CACHE{TINYMITM_LOGS})
|
||||
target_compile_definitions(tinymitm PUBLIC TINYMITM_LOGS)
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
target_link_libraries(tinymitm PRIVATE crypt32)
|
||||
endif()
|
||||
|
||||
# ------------------------------
|
||||
# test
|
||||
# ------------------------------
|
||||
|
||||
@@ -13,13 +13,12 @@
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#include <wincrypt.h>
|
||||
#pragma comment(lib, "crypt32.lib")
|
||||
#endif
|
||||
|
||||
/*
|
||||
CertificateManager implementation
|
||||
*/
|
||||
CertificateManager::CertificateManager() : _rng(new WC_RNG()), _caKey(nullptr), _sessionKey(nullptr) {}
|
||||
CertificateManager::CertificateManager() : _caKey(nullptr), _sessionKey(nullptr), _rng(new WC_RNG()) {}
|
||||
|
||||
CertificateManager::~CertificateManager()
|
||||
{
|
||||
@@ -148,7 +147,7 @@ bool CertificateManager::installCertificate()
|
||||
(DWORD)_caCertDer.size());
|
||||
|
||||
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;
|
||||
if (rootStore)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user