Packetwatch.net

Backup SSL certificate from Apache



Last modified: Aug. 31, 2009

Contents
1 - Summary
2 - Backup SSL certificate


1 - Summary

This guide will show to backup an SSL certificate currently used in Apache in
Red Hat Enterprise Linux. This creates a backup of the primary certificate
which can be copied and used by IIS in Windows. This has been tested using
OpenSSL in Red Hat Enterprise Linux 5.


2 - Backup SSL certificate

Find out where httpd.conf file is which will have entries for the SSL related
files. In httpd.conf look for the following options.

  SSLCertificateFile /etc/httpd/ssl/test.com.cer
  SSLCertificateKeyFile /etc/httpd/ssl/test.com.key

# sudo find / -name httpd.conf
Password: 
/etc/httpd/conf/httpd.conf
# sudo vi /etc/httpd/conf/httpd.conf
Password:
# cd /etc/httpd/ssl/
# ls -1
registrar.crt
test.com.cer
test.com.key
# sudo openssl pkcs12 -export -out test.com.pfx -inkey test.com.key -in \
test.com.cer -certfile registrar.crt
Password: 
Enter pass phrase for test.com.key:
Enter Export Password:
Verifying - Enter Export Password:
# ls -1
registrar.crt
test.com.cer
test.com.key
test.com.pfx

You now have a backup (.pfx) of the primary certificate which can be copied and
used by IIS in Windows.


Last modified: Thu Jan 1 00:00:00 1970 UTC
Packetwatch Research 2002-2024.