Whole document tree 2.5. Certificate management2.5.1. Generate and Sign a certificate request
creates a new private key and a certificate request and place it as newreq.pem.
will sign the request using the cacert.pem and commit the certificate as newcert.pem. You will need to enter the passphrase of the cacert.pem (your CA Certificate). The file newcerts/xx.pem will be created and index.txt and serial will be updated. You private key is in newreq.pem -PRIVATE KEY- and your certificate is in newcert.pem -CERTIFICATE- A copy of newcert.pem is placed in newcerts/ with an adequate entry in index.txt so that a client can request this information via a web server to ensure the authenticity of the certificate. Beware of your newreq.pem file, because it contains a certificate request, but also your private key. The -PRIVATE KEY- section is not required when you sign it. So if you request someone else to sign your certificate request, ensure that you have removed the -PRIVATE KEY- section from the file. If you sign someone else certificate request, request from this person its -CERTIFICATE REQUEST- section not its private key. 2.5.2. Revoke a certificateTo revoke a certificate simply issue the command:
The database is updated and the certificate is marked as revoked. You need now to general the new revoked list of certificates:
2.5.3. Renew a certificateThe user sends you its old certificate request or create a new one based on its private key. First you have to revoke the previous certificate and sign again the certificate request. To find the old certificate, look in the index.txt file for the Distinguished Name (DN) corresponding to the request. Get the serial Number <xx>, and use the file cert/<xx>.pem as certificate for the revocation procedure. You may want to sign the request manually because you have to ensure that the start date and end date of validity of the new certificate are correct.
replace [now] and [previous enddate+365days] by the correct values. 2.5.4. Build your web based Certificate AuthorityThere are a few requirements when you are a Certificate Authority (CA):
All these requirements can be done using a web server and some scripting. |