This tutorial shows how to request and issue server certificates, using the scripts supplied with the demonstration CA.
In this tutorial, you first take the role of a Web site owner requesting a server certificate from the CA. Then you take the role of the CA and issue the requested certificate. To do this, you use the following scripts:
These scripts are supplied with Micro Focus Demo CA and are by default in C:\Program Files\Micro Focus\DemoCA. To find out the directory, look up the registry key HKLM\Software\Micro Focus\DemoCA\1.0\Setup\DemoCAFolder.
In this section, you take the role of a Web site owner running a server and asking the CA for a server certificate. As the server owner you create for yourself a private key and a public key, the latter in a certificate request (usually called a Certificate Signing Request, CSR) to send to the CA.
Most CAs are commercial ventures. With a commercial CA, you would typically contact them first, learn about what types of certificates they supply, and find out their prices, terms and conditions.
The batch file creates a public/private key pair for your server, and creates a certificate request with the public key, to send to the CA.
The private key is generated first and is stored in srvkey.pem.
For example, you can enter something like:
Country Name: US
State or Province Name: California
Locality: Palo Alto
Organization Name: Bloggs Widgets Inc
Organizational Unit Name: Marketing
Common Name: [Press Enter to accept
the server name value configured on installation.]
Email Address: bloggs@widgets.com
The details you enter are included in your server certificate to identify you.
openssl req -in srvcertreq.csr -text
In this section, you take the role of the CA and you issue the server certificate.
The batch file calls the ca command of the openssl utility to create a signed certificate, srvcert.pem, containing the public key from the certificate request.
The certificate is then created and signed with your private key from cakey.pem. It is in PEM format. It is saved in srvcert.pem, with a copy in newcerts\01.pem. If this tutorial has been run before, and 01.pem already exists, the copy will be called 02.pem and so on.
openssl x509 -in 01.pem -text
Notice that the Issuer is shown as the Distinguished Name of your Demo CA, while the Subject - the entity to whom the certificate has been issued - is the Distinguished Name of your server.
Copyright © 2009 Micro Focus (IP) Ltd. All rights reserved.