SignerTimeStampEx3 function

The SignerTimeStampEx3 function time stamps the specified subject and supports setting time stamps on multiple signatures.

Note

This function has no associated header file or import library. To call this function, you must create a user-defined header file and use the LoadLibrary and GetProcAddress functions to dynamically link to Mssign32.dll.

 

Syntax

HRESULT WINAPI SignerTimeStampEx3(
  _In_       DWORD                  dwFlags,
  _In_       DWORD                  dwIndex,
  _In_       SIGNER_SUBJECT_INFO    *pSubjectInfo,
  _In_       PCWSTR                 pwszHttpTimeStamp,
  _In_       PCWSTR                 pszAlgorithmOid,
  _In_opt_   PCRYPT_ATTRIBUTES      psRequest,
  _In_opt_   PVOID                  pSipData,
  _Out_      SIGNER_CONTEXT         **ppSignerContext,
  _In_opt_   PCERT_STRONG_SIGN_PARA pCryptoPolicy,
  _Reserved_ PVOID                  pReserved
);

Parameters

dwFlags [in]

Flag that specifies the type of time stamp to generate. This parameter can be one of the following values. The values are mutually exclusive.

Value Meaning
SIGNER_TIMESTAMP_AUTHENTICODE
Specifies an Authenticode time stamp.
Note: Authenticode is no longer the preferred type of time stamp. Support for Authenticode time stamps may be removed in the future. We recommend that you use RFC 3161 instead.
SIGNER_TIMESTAMP_RFC3161
Specifies an RFC 3161–compliant time stamp.

 

dwIndex [in]

Specifies the sequence number of the signature to which the timestamp will be added. If this value is zero (0), the outer signature will be time stamped.

pSubjectInfo [in]

The address of a SIGNER_SUBJECT_INFO structure that represents the subject to be time stamped.

pwszHttpTimeStamp [in]

The address of a null-terminated Unicode string that contains the URL of a time stamp server.

pszAlgorithmOid [in]

A hash algorithm to be used for performing RFC 3161–compliant time stamps. This parameter is ignored for Authenticode time stamps.

psRequest [in, optional]

Optional. The address of a CRYPT_ATTRIBUTES structure that contains additional attributes that are added to the time stamp request.

This parameter is optional and can be NULL if it is not included.

pSipData [in, optional]

Optional. A 32-bit value that is passed as additional data to subject interface package (SIP) functions. The format and content of this parameter is defined by the SIP provider.

This parameter is optional and can be NULL if it is not included.

ppSignerContext [out]

Optional. The address of a pointer to the SIGNER_CONTEXT structure that contains the signed BLOB. When you have finished using the SIGNER_CONTEXT structure, free it by calling the SignerFreeSignerContext function.

pCryptoPolicy [in, optional]

If present, a pointer to a CERT_STRONG_SIGN_PARA structure that contains the parameters used to check for strong signatures. The time stamp must pass this cryptographic policy.

pReserved

Reserved. This value must be NULL.

Return value

If the function succeeds, the function returns S_OK.

If the function fails, it returns an HRESULT value that indicates the error. Possible error codes returned by this function include, but are not limited to, the following. For a list of common error codes, see Common HRESULT Values.

Return code Description
E_INVALIDARG
This error can be returned for the following conditions:
  • You must set either SIGNER_TIMESTAMP_AUTHENTICODE or SIGNER_TIMESTAMP_RFC3161 for the dwFlags parameter.
  • The pReserved parameter must be NULL.
  • If you set the SIGNER_TIMESTAMP_AUTHENTICODE flag in the dwFlags parameter, you must set the dwIndex parameter to zero.

 

Requirements

Requirement Value
Minimum supported client
Windows 8 [desktop apps only]
Minimum supported server
Windows Server 2012 [desktop apps only]
DLL
Mssign32.dll

See also

SignerTimeStamp

SignerTimeStampEx

SignerTimeStampEx2