Using SSLeay to generate site and client
certificates
for Microsoft Internet Information Server
Phillip Wherry
12 January 1997
This document describes the process for creating one's own certificate authority (CA), then using that CA to sign key requests for Microsoft's Internet Information Server (IIS) on Windows NT. The software used to do this is distributed as part of the SSLeay freeware SSL implementation. This document assumes that you've already successfully compiled SSLeay, and the configuration file is in the standard location, /usr/local/ssl/lib/ssleay.cnf.
Use the command:
req config /usr/local/ssl/lib/ssleay.cnf x509 new days 365 >cacert.pem
(This will build a new self-signed CA certificate which expires in a year. It also generate an encrypted private key file, privkey.pem)
x509 inform pem outform der <cacert.pem >cacert.der
Now copy the .der file to a Web server document directory. You may want to rename it to end in .cct or .cacert. The Web server needs to be configured to deliver these files as MIME type application/x-x509-ca-cert in order for the users Web browser to figure out whats going on.
To do this, look in the registry at:
HKEY_LOCAL_MACHINE
\SYSTEM
\CurrentControlSet
\Services
\InetInfo
\Parameters
\MimeMap
Add a REG_SZ key with a key name of:
application/x-x509-ca-cert,cct,,5 and a null value.
Note that there are two commas before the number 5 (which is the Gopher type for this object).
Its necessary to stop and restart the WWW server (if not reboot) to make this take effect. I had trouble getting the change to be recognized until I rebooted.
Use the IIS Key Manager to generate a key request. Its very important that the "Server name" field be filled in with the DNS name of the machine, otherwise the generated key wont work. A .req file will result; for this example, well assume its called key.req.
x509 req CAcreateserial CA cacert.pem CAkey privkey.pem days 365 in key.req out key.cert
Using the IIS Key Manager, install the key certificate.
First, download the CA certificate from the Web browser. Once installed in your browser, you should be able to use an https:// URL to access the site.
[Home page] - Phillip Wherry - psw@wherry.com