POST CSR Generation Generate
POST CSR Generation Generate
The POST /CSRGeneration/Generate method is used to generate and configure a CSR A CSR or certificate signing request is a block of encoded text that is submitted to a CA when enrolling for a certificate. When you generate a CSR within Keyfactor Command, the matching private key for it is stored in Keyfactor Command in encrypted format and will be married with the certificate once returned from the CA.. This method returns HTTP 200 OK on a success with a message body containing the text of the CSR file created.
This method generates a private key Private keys are used in cryptography (symmetric and asymmetric) to encrypt or sign content. In asymmetric cryptography, they are used together in a key pair with a public key. The private or secret key is retained by the key's creator, making it highly secure. and stores it in the Keyfactor Command database. When you use the CSR resulting from this method to enroll for a certificate through Keyfactor Command (see POST Enrollment CSR), the resulting certificate is married together with the stored private key and may then be download with private key (see POST Certificates Recover).


Table 306: POST CSR Generation Generate Input Parameters
Name | In | Description |
---|---|---|
Subject | Body |
Required. A string containing the subject name for the certificate using X.500 format for the full distinguished name (DN "Subject": "CN=websrvr14.keyexample.com,OU=IT,O=\"Key Example, Inc.\",L=Independence,ST=OH,C=US"
|
KeyType | Body |
Required. A string indicating the desired key encryption of the certificate. Accepted key types are: |
KeyLength | Body |
Required. An integer indicating the desired key size
|
Template![]() |
Body | A string indicating the desired template to be used for the certificate to be requested with the CSR. The template must have been configured in Keyfactor Command to support CSR generation. This field is optional. Tip: Although you can include a template in your CSR, template handling in CSRs is future functionality, and the template will not be parsed back out of the CSR. Instead, submit a template directly with your CSR enrollment (see POST Enrollment CSR). |
SANs | Body |
An array of key/value pairs that represent the
elements for Keyfactor Command to use when generating the
subject alternative name For example: "SANs": { "dns": [ "dnssan1.keyexample.com", "dnssan2.keyexample.com", "dnssan3.keyexample.com" ], "ip4": [ "192.168.2.73" ] } |
Table 307: POST CSR Generation Generate Response Data