Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The PFN_AUTHENTICODE_DIGST_SIGN_WITHFILEHANDLE user supplied callback function implements digest signing. You must implement this function as part of your provided dll. This function is currently called by SignerSignEx3 for digest signing.
Syntax
PFN_AUTHENTICODE_DIGEST_SIGN_WITHFILEHANDLE pfnAuthenticodeDigestSignWithFileHandle;
HRESULT __stdcall pfnAuthenticodeDigestSignWithFileHandle(
_In_ PCCERT_CONTEXT pSigningCert,
_In_opt_ PCRYPT_DATA_BLOB pMetadataBlob,
_In_ ALG_ID digestAlgId,
_In_ PBYTE pbToBeSignedDigest,
_In_ DWORD cbToBeSignedDigest,
_In_ HANDLE hFile,
_Out_ PCRYPT_DATA_BLOB pSignedDigest
);
);
Parameters
-
pSigningCert [in]
-
Pointer to a CERT_CONTEXT structure that specifies the certificate used to create the digital signature.
-
pMetadataBlob [in, optional]
-
Pointer to a CRYPT_DATA_BLOB structure that contains metadata for digest signing.
-
digestAlgId [in]
-
Specifies the digest algorithm to be used for digest signing.
-
pbToBeSignedDigest [in]
-
Pointer to a buffer which contains the digest to be signed.
-
cbToBeSignedDigest [in]
-
The size, in bytes, of the pbToBeSignedDigest buffer.
-
hFile [in]
-
Handle to the file being signed.
-
pSignedDigest [out]
-
Pointer to CRYPT_DATA_BLOB which receives the signed digest.
Return value
If the function succeeds, the function returns S_OK. If the function fails, it returns an HRESULT value that indicates the error. For a list of common error codes, see Common HRESULT Values.
Remarks
The parameter pSignedDigest->pbData must be allocated by calling HeapAlloc passing the result of GetProcessHeap() as the first parameter.
Requirements
| Requirement | Value |
|---|---|
| Minimum supported client |
Windows 11 [desktop apps only] |
| DLL |
Mssign32.dll |