diff --git a/Domito.sln.DotSettings b/Domito.sln.DotSettings index 2b73801..9c57d5d 100644 --- a/Domito.sln.DotSettings +++ b/Domito.sln.DotSettings @@ -1,5 +1,8 @@  + True True + True True + True True True \ No newline at end of file diff --git a/include/Domito.h b/include/Domito.h index fbdee9d..0f6ee32 100644 --- a/include/Domito.h +++ b/include/Domito.h @@ -1,5 +1,10 @@ #pragma once + +/******************************************************************************** + * Memory management, misc. * + ********************************************************************************/ + // // Custom allocator for function that allocate pool memory // @@ -15,6 +20,54 @@ EVT_DOMITO_ALLOCATE_ROUTINE( typedef EVT_DOMITO_ALLOCATE_ROUTINE* PFN_DOMITO_ALLOCATE_ROUTINE; +/******************************************************************************** + * Cryptography * + ********************************************************************************/ + +// +// This structure encapsulates a signature used in verifying executable files. +// +#if !defined(WIN_CERTIFICATE) +typedef struct _WIN_CERTIFICATE { + DWORD dwLength; + WORD wRevision; + WORD wCertificateType; + BYTE bCertificate[ANYSIZE_ARRAY]; +} WIN_CERTIFICATE, *LPWIN_CERTIFICATE; +#endif + +// +// UM definitions of WinCrypt.h +// + +#if !defined(WIN_CERT_TYPE_X509) +#define WIN_CERT_TYPE_X509 (0x0001) // The bCertificate member contains an X.509 certificate. +#endif +#if !defined(WIN_CERT_TYPE_PKCS_SIGNED_DATA) +#define WIN_CERT_TYPE_PKCS_SIGNED_DATA (0x0002) // The bCertificate member contains a PKCS SignedData structure. +#endif +#if !defined(WIN_CERT_TYPE_PKCS1_SIGN) +#define WIN_CERT_TYPE_PKCS1_SIGN (0x0009) // The bCertificate member contains PKCS1_MODULE_SIGN fields. +#endif + +#if !defined(CALG_SHA1) +#define CALG_SHA1 0x8004u +#endif +#if !defined(CALG_SHA256) +#define CALG_SHA256 0x800cu +#endif +#if !defined(CALG_SHA384) +#define CALG_SHA384 0x800du +#endif +#if !defined(CALG_SHA512) +#define CALG_SHA512 0x800eu +#endif + + +/******************************************************************************** + * Library functions * + ********************************************************************************/ + // // Finds the base address of a driver module // diff --git a/src/Domito.cpp b/src/Domito.cpp index bb9e8de..d89bb6d 100644 --- a/src/Domito.cpp +++ b/src/Domito.cpp @@ -1,4 +1,5 @@ #include +#include #include #include "Domito.h"