Openssl
Jump to navigation
Jump to search
https://www.redhat.com/sysadmin/6-openssl-commands
Extract cert and key
openssl pkcs12 -in domain.pfx -clcerts -nokeys -out domain.crt openssl pkcs12 -in domain.pfx -nocerts -nodes -out domain.key
Update your Apache configuration file with:
<VirtualHost 192.168.0.1:443> ... SSLEngine on SSLCertificateFile /path/to/domain.crt SSLCertificateKeyFile /path/to/domain.key ... </VirtualHost>
echo "Q" | openssl s_client -servername google.com -connect google.com:443 | openssl x509 -noout -dates
echo quit | openssl s_client -showcerts -servername server -connect google.com:443 > cacert.pem true | openssl s_client -connect google.com:443 2>/dev/null | openssl x509 rm -f cert.pem && echo -n | openssl s_client -connect google.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > ./cert.pem
curl --cacert google.pem https://google.com
openssl s_client -connect 10.x.x.x:6514