3.1.2.6.1 Creating a Certificate Request Based on a Certificate Template
Input Parameters
Parameter.Certificate.Template.flags: The type and value of this parameter is the same as the Certificate.Template.flags ADM element described in section 3.1.2.1.
Parameter.Certificate.Template.pKIExtendedKeyUsage: The type and value of this parameter is the same as the Certificate.Template.pKIExtendedKeyUsage ADM element described in section 3.1.2.1.
Parameter.Certificate.Template.pKIKeyUsage: The type and value of this parameter is the same as the Certificate.Template.pKIKeyUsage ADM element described in section 3.1.2.1.
Parameter.Certificate.Template.pKIMaxIssuingDepth: The type and value of this parameter is the same as the Certificate.Template.pKIMaxIssuingDepth ADM element described in section 3.1.2.1.
Parameter.Certificate.Template.pKIDefaultKeySpec: The type and value of this parameter is the same as the Certificate.Template.pKIDefaultKeySpec ADM element described in section 3.1.2.1.
Parameter.Certificate.Template.pKIDefaultCSPs: The type and value of this parameter is the same as the Certificate.Template.pKIDefaultCSPs ADM element described in section 3.1.2.1.
Parameter.Certificate.Template.pKICriticalExtensions: The type and value of this parameter is the same as the Certificate.Template.pKICriticalExtensions ADM element described in section 3.1.2.1.
Parameter.Certificate.Template.msPKI-RA-Signature: The type and value of this parameter is the same as the Certificate.Template.msPKI-RA-Signature ADM element described in section 3.1.2.1.
Parameter.Certificate.Template.msPKI-Minimal-Key-Size: The type and value of this parameter is the same as the Certificate.Template.msPKI-Minimal-Key-Size ADM element described in section 3.1.2.1.
Parameter.Certificate.Template.msPKI-Template-Cert-Template-OID: The type and value of this parameter is the same as the Certificate.Template.msPKI-Template-Cert-Template-OID ADM element described in section 3.1.2.1.
Parameter.Certificate.Template.msPKI-RA-Policies: The type and value of this parameter is the same as the Certificate.Template.msPKI-RA-Policies ADM element described in section 3.1.2.1.
Parameter.Certificate.Template.msPKI-RA-Application-Policies: The type and value of this parameter is the same as the Certificate.Template.msPKI-RA-Application-Policies ADM element described in section 3.1.2.1.
Parameter.Certificate.Template.msPKI-Certificate-Application-Policy: The type and value of this parameter is the same as the Certificate.Template.msPKI-Certificate-Application-Policy ADM element described in section 3.1.2.1.
Parameter.Certificate.Template.msPKI-Enrollment-Flag: The type and value of this parameter is the same as the Certificate.Template.msPKI-Enrollment-Flag ADM element described in section 3.1.2.1.
Parameter.Certificate.Template.msPKI-Private-Key-Flag: The type and value of this parameter is the same as the Certificate.Template.msPKI-Private-Key-Flag ADM element described in section 3.1.2.1.
Parameter.Certificate.Template.msPKI-Certificate-Policy: The type and value of this parameter is the same as the Certificate.Template.msPKI-Certificate-Policy ADM element described in section 3.1.2.1.
Parameter.Certificate.Template.msPKI-Certificate-Name-Flag: The type and value of this parameter is the same as the Certificate.Template.msPKI-Certificate-Name-Flag ADM element described in section 3.1.2.1.
Parameter.Certificate.Template.msPKI-Template-Schema-Version: The type and value of this parameter is the same as the Certificate.Template.msPKI-Template-Schema-Version ADM element described in section 3.1.2.1.
Parameter.Certificate.Template.revision: The type and value of this parameter is the same as the Certificate.Template.revision ADM element described in section 3.1.2.1.
Parameter.Certificate.Template.msPKI-Template-Minor-Revision: The type and value of this parameter is the same as the Certificate.Template.msPKI-Template-Minor-Revision ADM element described in section 3.1.2.1.
Parameter.Certificate.Template.cn: The type and value of this parameter is the same as the Certificate.Template.cn ADM element described in section 3.1.2.1.
Parameter.IsRenewalRequest: The type and value of this parameter is the same as the IsRenewalRequest ADM element described in section 3.1.2.1.
Parameter.CertificateToBeRenewed: The type and value of this parameter is the same as the CertificateToBeRenewed ADM element described in section 3.1.2.1.
Parameter.RACertificates: The type and value of this parameter is the same as the RACertificates ADM element described in section 3.1.2.1.
Output Parameter
Request: A certificate request created based on the certificate template settings. The type and value of this parameter is the same as the pctbRequest parameter in the ICertRequestD::Request (section 3.2.1.4.2.1) method.
Processing
Initialize the ADM elements described in section 3.1.2.1 using the input parameters as follows:
Parameter
Initializes …
Parameter.Certificate.Template.flags
Certificate.Template.flags
Parameter.Certificate.Template.pKIExtendedKeyUsage
Certificate.Template.pKIExtendedKeyUsage
Parameter.Certificate.Template.pKIKeyUsage
Certificate.Template.pKIKeyUsage
Parameter.Certificate.Template.pKIMaxIssuingDepth
Certificate.Template.pKIMaxIssuingDepth
Parameter.Certificate.Template.pKIDefaultKeySpec
Certificate.Template.pKIDefaultKeySpec
Parameter.Certificate.Template.pKIDefaultCSPs
Certificate.Template.pKIDefaultCSPs
Parameter.Certificate.Template.pKICriticalExtensions
Certificate.Template.pKICriticalExtensions
Parameter.Certificate.Template.msPKI-RA-Signature
Certificate.Template.msPKI-RA-Signature
Parameter.Certificate.Template.msPKI-Minimal-Key-Size
Certificate.Template.msPKI-Minimal-Key-Size
Parameter.Certificate.Template.msPKI-Template-Cert-Template-OID
Certificate.Template.msPKI-Template-Cert-Template-OID
Parameter.Certificate.Template.msPKI-RA-Policies
Certificate.Template.msPKI-RA-Policies
Parameter.Certificate.Template.msPKI-RA-Application-Policies
Certificate.Template.msPKI-RA-Application-Policies
Parameter.Certificate.Template.msPKI-Certificate-Application-Policy
Certificate.Template.msPKI-Certificate-Application-Policy
Parameter.Certificate.Template.msPKI-Enrollment-Flag
Certificate.Template.msPKI-Enrollment-Flag
Parameter.Certificate.Template.msPKI-Private-Key-Flag
Certificate.Template.msPKI-Private-Key-Flag
Parameter.Certificate.Template.msPKI-Certificate-Policy
Certificate.Template.msPKI-Certificate-Policy
Parameter.Certificate.Template.msPKI-Certificate-Name-Flag
Certificate.Template.msPKI-Certificate-Name-Flag
Parameter.Certificate.Template.msPKI-Template-Schema-Version
Certificate.Template.msPKI-Template-Schema-Version
Parameter.Certificate.Template.revision
Certificate.Template.revision
Parameter.Certificate.Template.msPKI-Template-Minor-Revision
Certificate.Template.msPKI-Template-Minor-Revision
Parameter.Certificate.Template.cn
Certificate.Template.cn
Parameter.IsRenewalRequest
IsRenewalRequest
Parameter.CertificateToBeRenewed
CertificateToBeRenewed
Parameter.RACertificates
RACertificates
Determine the request type as specified in section 3.1.2.4.2.1.
Create a certificate request as specified in section 3.1.2.4.2.2.
Set the Request output parameter to the certificaterequest generated in the previous step.