Chromium Embedded Framework (CEF)  139.0.1+gce106a3+chromium-139.0.7258.31
cef_certificate_util Namespace Reference

Classes

struct  ThumbprintsInfo
 Structure populated by GetClientThumbprints(). More...
 

Functions

void GetClientThumbprints (const std::wstring &binary_path, bool verify_binary, ThumbprintsInfo &info)
 Process client signatures for the binary at the specified abolute |binary_path| and populate |info|. More...
 
bool ValidateCodeSigning (const std::wstring &binary_path, const char *thumbprint, bool allow_unsigned, ThumbprintsInfo &info)
 Evaluate the binary at the specified absolute |binary_path| for common requirements and populate |info|. More...
 
void ValidateCodeSigningAssert (const std::wstring &binary_path, const char *thumbprint, bool allow_unsigned, ThumbprintsInfo *info=nullptr)
 Same as ValidateCodeSigning, but failures result in a FATAL error and application termination. More...
 

Variables

constexpr size_t kThumbprintLength = 40U
 

Function Documentation

◆ GetClientThumbprints()

void cef_certificate_util::GetClientThumbprints ( const std::wstring &  binary_path,
bool  verify_binary,
ThumbprintsInfo info 
)

Process client signatures for the binary at the specified abolute |binary_path| and populate |info|.

If |verify_binary| is true and the primary signature fails verification then no further signatures will be processed. For a code signing example and usage details see https://github.com/chromiumembedded/cef/issues/3824#issuecomment-2892139995

◆ ValidateCodeSigning()

bool cef_certificate_util::ValidateCodeSigning ( const std::wstring &  binary_path,
const char *  thumbprint,
bool  allow_unsigned,
ThumbprintsInfo info 
)

Evaluate the binary at the specified absolute |binary_path| for common requirements and populate |info|.

If the binary is code signed then all signatures must be valid. If |thumbprint| is a SHA1 hash (e.g. 40 character upper-case hex-encoded value) then the primary signature must match that thumbprint. If |allow_unsigned| is true and |thumbprint| is nullptr then the binary may be unsigned, otherwise it must be validly signed. Returns true if all requirements are met.

◆ ValidateCodeSigningAssert()

void cef_certificate_util::ValidateCodeSigningAssert ( const std::wstring &  binary_path,
const char *  thumbprint,
bool  allow_unsigned,
ThumbprintsInfo info = nullptr 
)

Same as ValidateCodeSigning, but failures result in a FATAL error and application termination.

Optionally populate |info| is validation succeeds. Usage must be protected by cef::logging::ScopedEarlySupport if called prior to libcef loading.

Variable Documentation

◆ kThumbprintLength

constexpr size_t cef_certificate_util::kThumbprintLength = 40U
inlineconstexpr