-----BEGIN CERTIFICATE-----
(Your domain Certificate)
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
(Intermediate CA certificate)
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
(Root CA certificate)
-----END CERTIFICATE-----
Save this file as allcerts.pem.
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-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,544C0D9723C89EE348
kE/CWsjsMYHeGPWRxMBTcLdnrlhJCKdabqFpavbANovCczAci
MKNwzTMwTawjr5zUL9u8XkhwkTL09AHDgSazv6YF2Sh2bPHOLaiE/8pkTys3UrgA
....
-----END RSA PRIVATE KEY-----
Certificate bag
Bag Attributes
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
-----BEGIN CERTIFICATE-----
czELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G
A1UEBxMHU2FsZm9yZDEaMBgGA1UEChMRQ09NT0RPIENBIExpbWl0ZWQxGTAXBgNV
BAMTEBxMHU2FsZm9yZDEaMMIIFIzCCBAugAwIBAgIRAIWm
.....
-----END CERTIFICATE-----
Copy and paste the private key section onto another file and name it mykey.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
Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.
Comments (0)