LibreOffice Module onlineupdate (master) 1
Classes | Functions
certificatecheck.hxx File Reference
#include <wincrypt.h>
Include dependency graph for certificatecheck.hxx:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  CertificateCheckInfo
 

Functions

BOOL DoCertificateAttributesMatch (PCCERT_CONTEXT pCertContext, CertificateCheckInfo &infoToMatch)
 Checks to see if a file stored at filePath matches the specified info. More...
 
DWORD VerifyCertificateTrustForFile (LPCWSTR filePath)
 Verifies the trust of the specified file path. More...
 
DWORD CheckCertificateForPEFile (LPCWSTR filePath, CertificateCheckInfo &infoToMatch)
 Checks to see if a file stored at filePath matches the specified info. More...
 

Function Documentation

◆ CheckCertificateForPEFile()

DWORD CheckCertificateForPEFile ( LPCWSTR  filePath,
CertificateCheckInfo infoToMatch 
)

Checks to see if a file stored at filePath matches the specified info.

Parameters
filePathThe PE file path to check
infoToMatchThe acceptable information to match
Returns
ERROR_SUCCESS if successful, ERROR_NOT_FOUND if the info does not match, or the last error otherwise.

Definition at line 28 of file certificatecheck.cxx.

References cleanup(), DoCertificateAttributesMatch(), ENCODING, filePath, LOG_WARN, and result.

Referenced by DoesBinaryMatchAllowedCertificates().

◆ DoCertificateAttributesMatch()

BOOL DoCertificateAttributesMatch ( PCCERT_CONTEXT  certContext,
CertificateCheckInfo infoToMatch 
)

Checks to see if a file stored at filePath matches the specified info.

Parameters
certContextThe certificate context of the file
infoToMatchThe acceptable information to match
Returns
FALSE if the info does not match or if any error occurs in the check

Definition at line 132 of file certificatecheck.cxx.

References FALSE, CertificateCheckInfo::issuer, LOG_WARN, CertificateCheckInfo::name, and TRUE.

Referenced by CheckCertificateForPEFile().

◆ VerifyCertificateTrustForFile()

DWORD VerifyCertificateTrustForFile ( LPCWSTR  filePath)

Verifies the trust of the specified file path.

Parameters
filePathThe file path to check.
Returns
ERROR_SUCCESS if successful, or the last error code otherwise.

Definition at line 252 of file certificatecheck.cxx.

References filePath, LOG, LOG_WARN, and LONG.

Referenced by DoesBinaryMatchAllowedCertificates().