Compare commits

...

3 Commits

Author SHA1 Message Date
neru 4c55f7c123 build: remove dbg stuff from rel 2026-03-20 19:20:25 -03:00
neru 0eb7af76d4 fix: debloat includes 2026-03-20 19:19:51 -03:00
neru de76e89ed0 fix: stop console from breaking after installing cert 2026-03-20 19:19:04 -03:00
2 changed files with 12 additions and 1 deletions
+1
View File
@@ -5,6 +5,7 @@ cmake_minimum_required(VERSION 4.1.0)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_FLAGS "/EHsc /D_AMD64_ /DWIN32_LEAN_AND_MEAN") # Set C++ exception handler, define platform and ignore some unused headers
set(CMAKE_CXX_FLAGS_RELEASE "/O2 /DNDEBUG") # Release debug flags
project(dbd-unlocker LANGUAGES CXX CSharp)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
+11 -1
View File
@@ -12,6 +12,8 @@
#include <cstdlib>
#include <ctime>
#include <processthreadsapi.h>
std::string randomizeString(size_t length)
{
const char charset[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
@@ -131,7 +133,15 @@ bool CertManager::GenerateCA()
Log::info("Generated new CA key and certificate files. Installing to Windows Root CA store automatically...");
system("certutil.exe -user -addstore root ca_cert.pem");
STARTUPINFOA si = {sizeof(si)};
PROCESS_INFORMATION pi;
char cmd[] = "certutil.exe -user -addstore root ca_cert.pem";
if (CreateProcessA(NULL, cmd, NULL, NULL, FALSE, CREATE_NO_WINDOW, NULL, NULL, &si, &pi))
{
WaitForSingleObject(pi.hProcess, INFINITE);
CloseHandle(pi.hProcess);
CloseHandle(pi.hThread);
}
return true;
}