Process Hacker
verify.c File Reference
#include <ph.h>
#include <verify.h>
#include <verifyp.h>

Go to the source code of this file.

Functions

VERIFY_RESULT PhpStatusToVerifyResult (_In_ LONG Status)
 
BOOLEAN PhpGetSignaturesFromStateData (_In_ HANDLE StateData, _Out_ PCERT_CONTEXT **Signatures, _Out_ PULONG NumberOfSignatures)
 
VOID PhpViewSignerInfo (_In_ PPH_VERIFY_FILE_INFO Information, _In_ HANDLE StateData)
 
VERIFY_RESULT PhpVerifyFile (_In_ PPH_VERIFY_FILE_INFO Information, _In_ HANDLE FileHandle, _In_ ULONG UnionChoice, _In_ PVOID UnionData, _In_ PGUID ActionId, _In_opt_ PVOID PolicyCallbackData, _Out_ PCERT_CONTEXT **Signatures, _Out_ PULONG NumberOfSignatures)
 
BOOLEAN PhpCalculateFileHash (_In_ HANDLE FileHandle, _In_ PWSTR HashAlgorithm, _Out_ PUCHAR *FileHash, _Out_ PULONG FileHashLength, _Out_ HANDLE *CatAdminHandle)
 
VERIFY_RESULT PhpVerifyFileFromCatalog (_In_ PPH_VERIFY_FILE_INFO Information, _In_ HANDLE FileHandle, _In_opt_ PWSTR HashAlgorithm, _Out_ PCERT_CONTEXT **Signatures, _Out_ PULONG NumberOfSignatures)
 
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 PhpGetCertNameString (_In_ PCERT_NAME_BLOB Blob)
 
PPH_STRING PhpGetX500Value (_In_ PPH_STRINGREF String, _In_ PPH_STRINGREF KeyName)
 
PPH_STRING PhGetSignerNameFromCertificate (_In_ PCERT_CONTEXT Certificate)
 
VERIFY_RESULT PhVerifyFile (_In_ PWSTR FileName, _Out_opt_ PPH_STRING *SignerName)
 Verifies a file's digital signature.
 

Variables

_CryptCATAdminCalcHashFromFileHandle CryptCATAdminCalcHashFromFileHandle
 
_CryptCATAdminCalcHashFromFileHandle2 CryptCATAdminCalcHashFromFileHandle2
 
_CryptCATAdminAcquireContext CryptCATAdminAcquireContext
 
_CryptCATAdminAcquireContext2 CryptCATAdminAcquireContext2
 
_CryptCATAdminEnumCatalogFromHash CryptCATAdminEnumCatalogFromHash
 
_CryptCATCatalogInfoFromContext CryptCATCatalogInfoFromContext
 
_CryptCATAdminReleaseCatalogContext CryptCATAdminReleaseCatalogContext
 
_CryptCATAdminReleaseContext CryptCATAdminReleaseContext
 
_WTHelperProvDataFromStateData WTHelperProvDataFromStateData_I
 
_WTHelperGetProvSignerFromChain WTHelperGetProvSignerFromChain_I
 
_WinVerifyTrust WinVerifyTrust_I
 
_CertNameToStr CertNameToStr_I
 
_CertDuplicateCertificateContext CertDuplicateCertificateContext_I
 
_CertFreeCertificateContext CertFreeCertificateContext_I
 

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.

BOOLEAN PhpCalculateFileHash ( _In_ HANDLE  FileHandle,
_In_ PWSTR  HashAlgorithm,
_Out_ PUCHAR *  FileHash,
_Out_ PULONG  FileHashLength,
_Out_ HANDLE *  CatAdminHandle 
)

Definition at line 240 of file verify.c.

PPH_STRING PhpGetCertNameString ( _In_ PCERT_NAME_BLOB  Blob)

Definition at line 518 of file verify.c.

BOOLEAN PhpGetSignaturesFromStateData ( _In_ HANDLE  StateData,
_Out_ PCERT_CONTEXT **  Signatures,
_Out_ PULONG  NumberOfSignatures 
)

Definition at line 97 of file verify.c.

PPH_STRING PhpGetX500Value ( _In_ PPH_STRINGREF  String,
_In_ PPH_STRINGREF  KeyName 
)

Definition at line 549 of file verify.c.

VERIFY_RESULT PhpStatusToVerifyResult ( _In_ LONG  Status)

Definition at line 72 of file verify.c.

VERIFY_RESULT PhpVerifyFile ( _In_ PPH_VERIFY_FILE_INFO  Information,
_In_ HANDLE  FileHandle,
_In_ ULONG  UnionChoice,
_In_ PVOID  UnionData,
_In_ PGUID  ActionId,
_In_opt_ PVOID  PolicyCallbackData,
_Out_ PCERT_CONTEXT **  Signatures,
_Out_ PULONG  NumberOfSignatures 
)

Definition at line 190 of file verify.c.

VERIFY_RESULT PhpVerifyFileFromCatalog ( _In_ PPH_VERIFY_FILE_INFO  Information,
_In_ HANDLE  FileHandle,
_In_opt_ PWSTR  HashAlgorithm,
_Out_ PCERT_CONTEXT **  Signatures,
_Out_ PULONG  NumberOfSignatures 
)

Definition at line 304 of file verify.c.

VOID PhpViewSignerInfo ( _In_ PPH_VERIFY_FILE_INFO  Information,
_In_ HANDLE  StateData 
)

Definition at line 155 of file verify.c.

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.

Variable Documentation

_CertDuplicateCertificateContext CertDuplicateCertificateContext_I

Definition at line 39 of file verify.c.

_CertFreeCertificateContext CertFreeCertificateContext_I

Definition at line 40 of file verify.c.

_CertNameToStr CertNameToStr_I

Definition at line 38 of file verify.c.

_CryptCATAdminAcquireContext CryptCATAdminAcquireContext

Definition at line 29 of file verify.c.

_CryptCATAdminAcquireContext2 CryptCATAdminAcquireContext2

Definition at line 30 of file verify.c.

_CryptCATAdminCalcHashFromFileHandle CryptCATAdminCalcHashFromFileHandle

Definition at line 27 of file verify.c.

_CryptCATAdminCalcHashFromFileHandle2 CryptCATAdminCalcHashFromFileHandle2

Definition at line 28 of file verify.c.

_CryptCATAdminEnumCatalogFromHash CryptCATAdminEnumCatalogFromHash

Definition at line 31 of file verify.c.

_CryptCATAdminReleaseCatalogContext CryptCATAdminReleaseCatalogContext

Definition at line 33 of file verify.c.

_CryptCATAdminReleaseContext CryptCATAdminReleaseContext

Definition at line 34 of file verify.c.

_CryptCATCatalogInfoFromContext CryptCATCatalogInfoFromContext

Definition at line 32 of file verify.c.

_WinVerifyTrust WinVerifyTrust_I

Definition at line 37 of file verify.c.

_WTHelperGetProvSignerFromChain WTHelperGetProvSignerFromChain_I

Definition at line 36 of file verify.c.

_WTHelperProvDataFromStateData WTHelperProvDataFromStateData_I

Definition at line 35 of file verify.c.