LibreOffice Module onlineupdate (master) 1
Macros | Functions
registrycertificates.cxx File Reference
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
#include <memory>
#include "registrycertificates.hxx"
#include "pathhash.h"
#include "servicebase.hxx"
#include "updatehelper.h"
Include dependency graph for registrycertificates.cxx:

Go to the source code of this file.

Macros

#define MAX_KEY_LENGTH   255
 

Functions

BOOL DoesBinaryMatchAllowedCertificates (LPCWSTR basePathForUpdate, LPCWSTR filePath)
 Verifies if the file path matches any certificate stored in the registry. More...
 

Macro Definition Documentation

◆ MAX_KEY_LENGTH

#define MAX_KEY_LENGTH   255

Definition at line 15 of file registrycertificates.cxx.

Function Documentation

◆ DoesBinaryMatchAllowedCertificates()

BOOL DoesBinaryMatchAllowedCertificates ( LPCWSTR  basePathForUpdate,
LPCWSTR  filePath 
)

Verifies if the file path matches any certificate stored in the registry.

Parameters
filePathThe file path of the application to check if allowed.
Returns
TRUE if the binary matches any of the allowed certificates.

Definition at line 56 of file registrycertificates.cxx.

References CalculateRegistryPathFromFilePath(), CheckCertificateForPEFile(), FALSE, filePath, i, LOG_WARN, LONG, MAX_KEY_LENGTH, MAX_PATH, name, TEST_ONLY_FALLBACK_KEY_PATH, TRUE, and VerifyCertificateTrustForFile().

Referenced by ProcessSoftwareUpdateCommand().