Imagine a situation that you have installed SSL
Certificate on your Cisco ASA (Cisco Adaptive Security Appliance) firewall. Installation of SSL certificate on ASA is an another topic for which you can find step-by-step guidance on Cisco's website
First of all, before you create a CSR (Certificate Signing Request), you must generate a private key, we refer to it as "mykey.pem" later in this document for WLC (Wireless LAN Controller) use. It is a good practice to save the private key on the local disk in .txt format for future use, but if you forgot to do that, don't worry there is a way to export it from ASA.
We will start from the moment where we have already installed SSL certificate on ASA firewall. Usually for that process you will receive three files from the certificate vendor (or your own root certificate server)
- Root CA Certificate (CARoot.crt)
- Intermediate CA certificate (SSLCA2.crt)
- Device / domain / web server certificate (yourdomain_com.crt)
I. To install SSL certificate on WCL you need to create a .pem file that contains the full chain of certificates includes all three* certificates in the following order:
[use a text editor (notepad, nano, vi)]
(Your domain Certificate)
(Intermediate CA certificate)
(Root CA certificate)
Save this file as allcerts.pem
*NOTE: In controller versions earlier than 22.214.171.124, web authentication certificates can be only device certificates and should not contain the CA roots chained to the device certificate (no chained certificates). With controller version 126.96.36.199 and later, the controller allows for the device certificate to be downloaded as a chained certificate for web authentication. Certificate Levels Level 0—Use of only a server certificate on WLC. Level 1—Use of server certificate on WLC and a CA root certificate. Level 2—Use of server certificate on WLC, one single CA intermediate certificate, and a CA root certificate. Level 3—Use of server certificate on WLC, two CA intermediate certificates, and a CA root certificate.
II. Before you go to the next step you will need to retrieve a private key from ASA:
From ASA CLI do the following:
ASA(config)# crypto ca export ASDM_TrustPoint0 pkcs12 yourpassword
yourpassword - use the same password you used to generate the private key. The ASA will show you entire key on CLI. Copy this onto a text file and give it a name TrustPoint0.txt. Then using OpenSSL you must convert this base64 encoded file into PEM format.
#openssl base64 -in TrustPoint0.txt -d out TrustPoint0.pfx
#openssl pkcs12 -in TrustPoint0.pfx -info
You will be ask for password that you used to protect this key. Next you will see the private key section in this keychain. The key should look like this:
-----BEGIN RSA PRIVATE KEY-----
-----END RSA PRIVATE KEY-----
friendlyName: ou=Domain Control Validated,ou=NameSSL Wildcard,cn=*.yourdomain.com
localKeyID: 00 00 00 01
subject=/OU=Domain Control Validated/OU=NameSSL Wildcard/CN=*.yourdomain.com
issuer=/C=GB/ST=Greater Manchester/L=Salford/O=COMODO CA Limited/CN=NameSSL CA 2
Copy and paste the private key section onto another file and name it mykey.pem
III. Use OpenSSL and your RSA private key "mykey.pem" with the chained SSL certificates "allcerts.pem"
#openssl pkcs12 -export -in allcerts.pem -inkey mykey.pem -out All-certs.p12 -clcerts -passin pass:yourpassword -passout pass:yourpassword
#openssl pkcs12 -in All-certs.p12 -out final-cert.pem -passin pass:yourpassword -passout pass:yourpassword
Your resulting file is called "final-cert.pem". You are now ready to install your certificate on the WLC. To install your SSL certificate with the full chain to the WLC (using the GUI):
- Make a copy of the "final-cert.pem" file and copy it to your TFTP server.
- Select Security > Web Auth > Cert to open up the Web Authentication page.
- Enable the Download SSL Certificate box to setup the TFTP parameters.
- Enter the IP address of the TFTP server in the IP Address field.
- Enter the path to the file in the Directory Path field and enter the file name in the file name field.
- Enter the password used for the file (in the example commands, yourpassword was used).
- Click Apply.
- After the file downloads from the TFTP server, reboot the WLC by going to Commands > Reboot > Reboot. Save any changes if prompted.
You have now installed an SSL certificate.