1
0
Fork 0

Added DomitoFreePortableExecutableDigest

This commit is contained in:
Benjamin Höglinger-Stelzer 2023-11-24 15:28:32 +01:00
parent e7c2c8c4bf
commit 494483650d
2 changed files with 24 additions and 0 deletions

View File

@ -199,6 +199,16 @@ DomitoCalculatePortableExecutableDigest(
_Out_ PULONG pSizeOfSecurityDirectory
);
//
// Frees the memory allocated by DomitoCalculatePortableExecutableDigest.
//
_IRQL_requires_max_(DISPATCH_LEVEL)
EXTERN_C
void
DomitoFreePortableExecutableDigest(
_In_ PVOID pDigestOut
);
//
// Verifies if the Authenticode signature of a give PE file matches the provided (e.g. SHA1) file digest.
//

View File

@ -363,6 +363,20 @@ cleanup:
return status;
}
_IRQL_requires_max_(DISPATCH_LEVEL)
void
DomitoFreePortableExecutableDigest(
_In_ PVOID pDigestOut
)
{
if (!pDigestOut)
{
return;
}
ExFreePoolWithTag(pDigestOut, DOMITO_POOL_TAG);
}
_Success_(return == STATUS_SUCCESS)
_Must_inspect_result_
_IRQL_requires_max_(PASSIVE_LEVEL)