Process Hacker
verify.h File Reference
#include <wintrust.h>
#include <softpub.h>

Go to the source code of this file.

Data Structures

struct  _PH_VERIFY_FILE_INFO
 

Macros

#define PH_VERIFY_DEFAULT_SIZE_LIMIT   (32 * 1024 * 1024)
 
#define PH_VERIFY_PREVENT_NETWORK_ACCESS   0x1
 
#define PH_VERIFY_VIEW_PROPERTIES   0x2
 

Typedefs

typedef enum _VERIFY_RESULT VERIFY_RESULT
 
typedef enum _VERIFY_RESULTPVERIFY_RESULT
 
typedef struct _PH_VERIFY_FILE_INFO PH_VERIFY_FILE_INFO
 
typedef struct
_PH_VERIFY_FILE_INFO
PPH_VERIFY_FILE_INFO
 

Enumerations

enum  _VERIFY_RESULT {
  VrUnknown = 0, VrNoSignature, VrTrusted, VrExpired,
  VrRevoked, VrDistrust, VrSecuritySettings, VrBadSignature
}
 

Functions

PHLIBAPI VERIFY_RESULT PhVerifyFile (_In_ PWSTR FileName, _Out_opt_ PPH_STRING *SignerName)
 Verifies a file's digital signature.
 
NTSTATUS PhVerifyFileEx (_In_ PPH_VERIFY_FILE_INFO Information, _Out_ VERIFY_RESULT *VerifyResult, _Out_opt_ PCERT_CONTEXT **Signatures, _Out_opt_ PULONG NumberOfSignatures)
 
VOID PhFreeVerifySignatures (_In_ PCERT_CONTEXT *Signatures, _In_ ULONG NumberOfSignatures)
 
PPH_STRING PhGetSignerNameFromCertificate (_In_ PCERT_CONTEXT Certificate)
 

Macro Definition Documentation

#define PH_VERIFY_DEFAULT_SIZE_LIMIT   (32 * 1024 * 1024)

Definition at line 7 of file verify.h.

#define PH_VERIFY_PREVENT_NETWORK_ACCESS   0x1

Definition at line 21 of file verify.h.

#define PH_VERIFY_VIEW_PROPERTIES   0x2

Definition at line 22 of file verify.h.

Typedef Documentation

Enumeration Type Documentation

Enumerator:
VrUnknown 
VrNoSignature 
VrTrusted 
VrExpired 
VrRevoked 
VrDistrust 
VrSecuritySettings 
VrBadSignature 

Definition at line 9 of file verify.h.

Function Documentation

VOID PhFreeVerifySignatures ( _In_ PCERT_CONTEXT *  Signatures,
_In_ ULONG  NumberOfSignatures 
)

Definition at line 502 of file verify.c.

PPH_STRING PhGetSignerNameFromCertificate ( _In_ PCERT_CONTEXT  Certificate)

Definition at line 593 of file verify.c.

PHLIBAPI VERIFY_RESULT PhVerifyFile ( _In_ PWSTR  FileName,
_Out_opt_ PPH_STRING SignerName 
)

Verifies a file's digital signature.

Parameters
FileNameA file name.
SignerNameA variable which receives a pointer to a string containing the signer name. You must free the string using PhDereferenceObject() when you no longer need it. Note that the signer name may be NULL if it is not valid.
Returns
A VERIFY_RESULT value.

Definition at line 641 of file verify.c.

NTSTATUS PhVerifyFileEx ( _In_ PPH_VERIFY_FILE_INFO  Information,
_Out_ VERIFY_RESULT VerifyResult,
_Out_opt_ PCERT_CONTEXT **  Signatures,
_Out_opt_ PULONG  NumberOfSignatures 
)

Definition at line 417 of file verify.c.