Skip to content

Instantly share code, notes, and snippets.

View Ovahlord's full-sized avatar

Ovahlord

  • Potatoland
  • 03:23 (UTC +01:00)
View GitHub Profile
@cecilemuller
cecilemuller / 2019-https-localhost.md
Last active November 14, 2024 06:21
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

@amolkhanorkar
amolkhanorkar / Convert openssl .key file to .pem
Created April 10, 2014 12:12
Convert openssl .key file to .pem
For converting .key file to .pem file,
Your keys may already be in PEM format, but just named with .crt or .key.
If they begin with -----BEGIN and you can read them in a text editor (they use base64, which is readable in ASCII, not binary format), they are in PEM format.
If the file is in binary, for the server.crt, you would use
openssl x509 -inform DER -outform PEM -in server.crt -out server.crt.pem
For server.key, use openssl rsa in place of openssl x509.