Skip to content

Latest commit

 

History

History
104 lines (74 loc) · 4.36 KB

nf-msdrm-drmconstructcertificatechain.md

File metadata and controls

104 lines (74 loc) · 4.36 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 req.product ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:msdrm.DRMConstructCertificateChain
DRMConstructCertificateChain function (msdrm.h)
Builds a certificate chain from an arbitrary number of certificates.
DRMConstructCertificateChain
DRMConstructCertificateChain function [Active Directory Rights Management Services SDK 1.0]
msdrm/DRMConstructCertificateChain
rm.drmconstructcertificatechain
rm\drmconstructcertificatechain.htm
rm
27c2bf2e-54b1-4ed4-a754-e8b3b3bd58cb
12/05/2018
DRMConstructCertificateChain, DRMConstructCertificateChain function [Active Directory Rights Management Services SDK 1.0], msdrm/DRMConstructCertificateChain, rm.drmconstructcertificatechain
msdrm.h
Windows
Msdrm.lib
Msdrm.dll
Windows
Rights Management Services client 1.0 SP2 or later
19H1
DRMConstructCertificateChain
msdrm/DRMConstructCertificateChain
c++
APIRef
kbSyntax
DllExport
Msdrm.dll
DRMConstructCertificateChain

DRMConstructCertificateChain function

-description

[The AD RMS SDK leveraging functionality exposed by

the client in Msdrm.dll is available for use in Windows Server 2008, Windows Vista, Windows Server 2008 R2, Windows 7, Windows Server 2012, and Windows 8. It may be altered or

unavailable in subsequent versions. Instead, use Active Directory Rights Management Services SDK 2.1,

which leverages functionality exposed by the client in Msipc.dll.]

The DRMConstructCertificateChain function builds a certificate chain from an arbitrary number of certificates.

-parameters

-param cCertificates [in]

The number of certificates in the rgwszCertificates array.

-param rgwszCertificates [in]

An array of null-terminated Unicode string pointers that contain the certificates to construct the chain from. The number of elements in this array is specified by the cCertificates parameter.

-param pcChain [in, out]

A pointer to a UINT that, on input, contains the size, in Unicode characters, of the wszChain string. This character count must include the terminating null character.

On output, this UINT receives the number of Unicode characters copied into the buffer, including the terminating null character.

-param wszChain [out]

A pointer to a null-terminated Unicode string that receives the constructed chain.

To determine the required size for this buffer, call this function with NULL for the wszChain parameter. The required number of Unicode characters, including the terminating null character, will be returned in the pcChain parameter.

-returns

If the function succeeds, the function returns S_OK.

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

-remarks

Memory allocation and deallocation for the chain are handled by the caller. To determine the required size for the wszChain buffer, call this function with NULL for the wszChain parameter. The required number of Unicode characters, including the terminating null character, will be returned in the pcChain parameter.

This function can be used to transform certificate chains that are returned by the AD RMS SOAP methods into certificate chains that can be used by AD RMS functions. For an example, see Decryption_GetBoundLicense.cpp.

-see-also

AD RMS Functions

Decryption_GetBoundLicense.cpp