From 59b66d327bfdf250f76ebbccd9f5718db5b3b7c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20H=C3=B6glinger-Stelzer?= Date: Sun, 2 Jul 2023 19:55:23 +0200 Subject: [PATCH] Minor fixup --- README.md | 1 + include/Domito.h | 4 +++- src/Domito.cpp | 7 ++++++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index bae6c1d..2a49da9 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,7 @@ Built for and tested on **Windows 10 version 1507 (or newer) x64/ARM64**. 32-Bit - Add the `include` directory to your project's headers search path. - `#include ` wherever required. - Link against the resulting `Domito.lib` file for your desired architecture. +- Link against `cng.lib` for the CNG BCrypt APIs. - Done! ## Sources & 3rd party credits diff --git a/include/Domito.h b/include/Domito.h index 40a59a8..fe0f09d 100644 --- a/include/Domito.h +++ b/include/Domito.h @@ -13,9 +13,11 @@ // // Library initialization tasks. Call once in your DriverEntry // +_Success_(return == STATUS_SUCCESS) +_Must_inspect_result_ _IRQL_requires_max_(PASSIVE_LEVEL) EXTERN_C -void +NTSTATUS DomitoInit(); _IRQL_requires_max_(PASSIVE_LEVEL) diff --git a/src/Domito.cpp b/src/Domito.cpp index ff1a0a0..80e4a9b 100644 --- a/src/Domito.cpp +++ b/src/Domito.cpp @@ -17,8 +17,11 @@ static STRING G_FN_CiGetCertPublisherName = RTL_CONSTANT_STRING("CiGetCertPublis static STRING G_FN_CiSetTrustedOriginClaimId = RTL_CONSTANT_STRING("CiSetTrustedOriginClaimId"); static STRING G_FN_CiValidateFileObject = RTL_CONSTANT_STRING("CiValidateFileObject"); + +_Success_(return == STATUS_SUCCESS) +_Must_inspect_result_ _IRQL_requires_max_(PASSIVE_LEVEL) -void +NTSTATUS DomitoInit() { const STRING ciModuleName = RTL_CONSTANT_STRING("\\SystemRoot\\system32\\CI.dll"); @@ -56,6 +59,8 @@ DomitoInit() G_CI.CiValidateFileObject = (t_CiValidateFileObject)functionAddress; } } + + return STATUS_SUCCESS; // TODO: unused currently } _IRQL_requires_max_(PASSIVE_LEVEL)