Skip to content

Instantly share code, notes, and snippets.

@ostinelli
Last active February 12, 2020 13:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ostinelli/4f6e3373b263bebbb515 to your computer and use it in GitHub Desktop.
Save ostinelli/4f6e3373b263bebbb515 to your computer and use it in GitHub Desktop.
OpenSSL common operations.

Open SSL common operations

Generate a new Private key and Certificate Signing Request

$ openssl req -out server.csr -new -newkey rsa:2048 -nodes -keyout server.key

Generate a self-signed certificate and private key

$ openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout server.key -out server.crt

Generate a certificate signing request for an existing private key

$ openssl req -out server.csr -key server.key -new

Check a certificate

$ openssl x509 -in server.crt -text -noout

Remove password from RSA key

$ openssl rsa -in private.key -out private.nocrypt.key
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment