Install an SSL Cert in Apache

February 8, 2021 note-to-self

openssl pkcs12 -in -out -nodes

openssl rsa -in -out

openssl x509 -in -out

Assuming copy those over the existing ones, as defined in Apache.

Extract private key: openssl pkcs12 -in [yourfile.pfx] -nocerts -out [drlive.key]

Extract certificate: openssl pkcs12 -in [yourfile.pfx] -clcerts -nokeys -out [drlive.crt]

Decrypt private key: openssl rsa -in [drlive.key] -out [drlive-decrypted.key]

Convert pfx to pem: openssl rsa -in [keyfile-encrypted.key] -outform PEM -out [keyfile-encrypted-pem.key]

Need to update these: SSLCertificateFile "D:/xampp/apache/ssl/yourdomain_com.crt" SSLCertificateKeyFile "D:/xampp/apache/ssl/yourdomain_com.key" SSLCACertificateFile "D:/xampp/apache/ssl/"