01

08/12

Generating a certificate from a CSR

11:08 by akylas. Filed under: Software

There are many times where I would like to provision a certificate for an endpoint device (be it a web server, client machine, etc) for which it is capable of generating a CSR. Using Windows Server 2008, attempting to enroll this csr returns the error: “The request contains no certificate template information.” This is returning back because the CA is not sure what specifications it needs to use to create the certificate.

You can easily solve this using the certreq utility on the command line by specifying your desired template:

certreq -submit -attrib “CertificateTemplate:Webserver” path_to_csr

Where “Webserver” is your desired template, and path_to_csr is the full pathname to the csr file. If you are not sure what template to use, you can manage them through the an MMC snap-in.

More information can be found on this utility at: http://technet.microsoft.com/en-us/library/cc736326.aspx