Getting a copy of a x509 certificate
If you need to easily retrieve a x509 certificate from a remote webserver, the easiest method is:
Which you can then go and copy from the line starting with '-----BEGIN CERTIFICATE-----' to '-----END CERTIFICATE-----' into the www.example.com.crt file.
openssl s_client -showcerts -connect www.example.com:443
Which you can then go and copy from the line starting with '-----BEGIN CERTIFICATE-----' to '-----END CERTIFICATE-----' into the www.example.com.crt file.