Wednesday, May 31, 2006

Certificate Request Generator with Cygwin

To generate Certificate Request for SSL, we can use cygwin with openssl package and send the CSR file to any trusted CA (e.g. Verisign or Thawte).

To generate it:

openssl req -new -nodes -keyout privateKeyFilename -out certRequestFilename

for example:

openssl req -new -nodes -keyout private.key -out public.csr

Then you will have 2 files, the private key file and the csr file, send the csr file to the trusted CA. Once you've got the certificate signed by the trusted CA, you can use it as your SSL certificate along with the private key

If you need to convert the certifate with X509/DER format to PEM format:

openssl x509 -in certFile -inform DER -outform PEM -out convertedCertFile

No comments: