Skip to content

Instantly share code, notes, and snippets.

@danilopiazza
Created October 15, 2025 07:35
Show Gist options
  • Save danilopiazza/02c7dfa767e1b21fcd5fd7f4e9fcdab6 to your computer and use it in GitHub Desktop.
Save danilopiazza/02c7dfa767e1b21fcd5fd7f4e9fcdab6 to your computer and use it in GitHub Desktop.
Create a self-signed certificate with OpenSSL
$ openssl req -x509 -newkey rsa -keyout mycertificate.key -out mycertificate.crt -nodes
.....+.....+.+.....+++++++++++++++++++++++++++++++++++++++*...+.+..+...+.........+++++++++++++++++++++++++++++++++++++++*.........+........+.+......+.........+...........+....+...........+...+.......+...+...+........+.......+........+......+...+.+...........+......+....+...+...+...+.....+....+..+.+........+.+......+..+.+......+.....+.+............+..+.+........+.........+.......+...........+...+.......+.....+....+..............++++++
...+....+.....+.+++++++++++++++++++++++++++++++++++++++*.....+...+++++++++++++++++++++++++++++++++++++++*.......+.+.............................+.......+......+..+...+....+.........+.....++++++
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:
State or Province Name (full name) [Some-State]:
Locality Name (eg, city) []:
Organization Name (eg, company) [Internet Widgits Pty Ltd]:
Organizational Unit Name (eg, section) []:
Common Name (e.g. server FQDN or YOUR name) []:
Email Address []:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment