Skip to content

Latest commit

 

History

History
127 lines (89 loc) · 4.35 KB

nf-wincrypt-cryptmsgsignctl.md

File metadata and controls

127 lines (89 loc) · 4.35 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:wincrypt.CryptMsgSignCTL
CryptMsgSignCTL function (wincrypt.h)
The CryptMsgSignCTL function creates a signed message containing an encoded CTL.
CryptMsgSignCTL
CryptMsgSignCTL function [Security]
_crypto2_cryptmsgsignctl
security.cryptmsgsignctl
wincrypt/CryptMsgSignCTL
security\cryptmsgsignctl.htm
security
85ae8ce3-d0a7-4fcb-beaa-ede09d30930e
12/05/2018
CryptMsgSignCTL, CryptMsgSignCTL function [Security], _crypto2_cryptmsgsignctl, security.cryptmsgsignctl, wincrypt/CryptMsgSignCTL
wincrypt.h
Windows
Windows XP [desktop apps only]
Windows Server 2003 [desktop apps only]
Crypt32.lib
Crypt32.dll
Windows
19H1
CryptMsgSignCTL
wincrypt/CryptMsgSignCTL
c++
APIRef
kbSyntax
DllExport
Crypt32.dll
CryptMsgSignCTL

CryptMsgSignCTL function

-description

The CryptMsgSignCTL function creates a signed message containing an encoded CTL.

-parameters

-param dwMsgEncodingType [in]

Specifies the encoding type used. It is always acceptable to specify both the certificate and message encoding types by combining them with a bitwise-OR operation as shown in the following example:

X509_ASN_ENCODING | PKCS_7_ASN_ENCODING

Currently defined encoding types are:

  • X509_ASN_ENCODING
  • PKCS_7_ASN_ENCODING

-param pbCtlContent [in]

The encoded CTL_INFO that can be a member of a CTL_CONTEXT structure or can be created using the CryptEncodeObject function.

-param cbCtlContent [in]

The size, in bytes, of the content pointed to by pbCtlContent.

-param pSignInfo [in]

A pointer to a CMSG_SIGNED_ENCODE_INFO structure containing an array of a CMSG_SIGNER_ENCODE_INFO structures.

The message can be encoded without signers if the cbSize member of the structure is set to the size of the structure and all of the other members are set to zero.

-param dwFlags [in]

If CMS_PKCS7 is defined, can be set to CMSG_CMS_ENCAPSULATED_CTL_FLAG to encode a CMS compatible V3 SignedData message.

-param pbEncoded [out]

A pointer to a buffer to receives the encoded message.

This parameter can be NULL to get the size of this information for memory allocation purposes. For more information, see Retrieving Data of Unknown Length.

-param pcbEncoded [in, out]

A pointer to a DWORD specifying the size, in bytes, of the pbEncoded buffer. When the function returns, the DWORD contains the number of bytes stored or to be stored in the buffer.

-returns

If the function succeeds, the return value is nonzero (TRUE).

If the function fails, the return value is zero (FALSE). For extended error information, call GetLastError. This function can return errors propagated from calls to CryptMsgOpenToEncode and CryptMsgUpdate.

-see-also

CMSG_SIGNED_ENCODE_INFO

CryptMsgEncodeAndSignCTL

CryptMsgOpenToEncode

Verification Functions Using CTLs