Skip to content

Latest commit

 

History

History
121 lines (101 loc) · 6 KB

nf-certenroll-ix509certificaterequestcmc-initializefrominnerrequesttemplatename.md

File metadata and controls

121 lines (101 loc) · 6 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:certenroll.IX509CertificateRequestCmc.InitializeFromInnerRequestTemplateName
IX509CertificateRequestCmc::InitializeFromInnerRequestTemplateName (certenroll.h)
The InitializeFromInnerRequestTemplateName method initializes the certificate request from an inner request object and a template.
IX509CertificateRequestCmc interface [Security]
InitializeFromInnerRequestTemplateName method
IX509CertificateRequestCmc.InitializeFromInnerRequestTemplateName
IX509CertificateRequestCmc::InitializeFromInnerRequestTemplateName
InitializeFromInnerRequestTemplateName
InitializeFromInnerRequestTemplateName method [Security]
InitializeFromInnerRequestTemplateName method [Security]
IX509CertificateRequestCmc interface
certenroll/IX509CertificateRequestCmc::InitializeFromInnerRequestTemplateName
security.ix509certificaterequestcmc_initializefrominnerrequesttemplatename
security\ix509certificaterequestcmc_initializefrominnerrequesttemplatename.htm
security
abf7617e-1194-4303-a214-23fbaf20eccf
12/05/2018
IX509CertificateRequestCmc interface [Security],InitializeFromInnerRequestTemplateName method, IX509CertificateRequestCmc.InitializeFromInnerRequestTemplateName, IX509CertificateRequestCmc::InitializeFromInnerRequestTemplateName, InitializeFromInnerRequestTemplateName, InitializeFromInnerRequestTemplateName method [Security], InitializeFromInnerRequestTemplateName method [Security],IX509CertificateRequestCmc interface, certenroll/IX509CertificateRequestCmc::InitializeFromInnerRequestTemplateName, security.ix509certificaterequestcmc_initializefrominnerrequesttemplatename
certenroll.h
Windows
Windows Vista [desktop apps only]
Windows Server 2008 [desktop apps only]
CertEnroll.dll
Windows
19H1
IX509CertificateRequestCmc::InitializeFromInnerRequestTemplateName
certenroll/IX509CertificateRequestCmc::InitializeFromInnerRequestTemplateName
c++
APIRef
kbSyntax
COM
CertEnroll.dll
IX509CertificateRequestCmc.InitializeFromInnerRequestTemplateName

IX509CertificateRequestCmc::InitializeFromInnerRequestTemplateName

-description

The InitializeFromInnerRequestTemplateName method initializes the certificate request from an inner request object and a template.

-parameters

-param pInnerRequest [in]

Pointer to an IX509CertificateRequest interface that represents the inner request object. This can be a PKCS #10 or a CMC request.

-param strTemplateName [in]

A BSTR variable that contains the Common Name (CN) of the template as it appears in Active Directory or the dotted decimal object identifier.

-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 table. For a list of common error codes, see Common HRESULT Values.

Return code/value Description
CRYPT_E_INVALID_MSG_TYPE
The request object passed to the pInnerRequest parameter must be a PKCS #10 or a CMC request.
HRESULT_FROM_WIN32(ERROR_ALREADY_INITIALIZED)
The request object has already been initialized.

-remarks

By specifying a template, you can add information to the outer request object that may not be contained in the inner request. For example, if the inner request does not contain the necessary extensions, you can supply a template that does.

The InitializeFromInnerRequestTemplateName method:

  • Creates an empty ICryptAttributes collection.
  • Creates an empty IX509NameValuePairs collection.
  • Creates an empty IX509Extensions collection.
  • Creates an IObjectIds collection for critical extensions and adds the XCN_OID_KEY_USAGE and XCN_OID_BASIC_CONSTRAINTS2 object identifiers (OIDs).
  • Creates an empty IObjectIds collection of OIDs to be suppressed from the request object.
  • Creates an empty ISignerCertificates collection.
  • Retrieves private key flags from the template.
  • Sets the ArchivePrivateKey property if required by the template flags or settings.
  • Retrieves the encryption algorithm from the template if one is specified and sets the EncryptionAlgorithm property.
  • Sets the EncryptionStrength property if possible.

-see-also

IX509CertificateRequestCmc