Compare commits
3 Commits
55202646ca
...
4d54533f9a
| Author | SHA1 | Date | |
|---|---|---|---|
| 4d54533f9a | |||
| 558f964ce2 | |||
| 409c41e196 |
@@ -82,6 +82,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
|
||||||
# ------------------------------
|
# ------------------------------
|
||||||
|
|||||||
@@ -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