Skip to content

Instantly share code, notes, and snippets.

@maxp
Last active September 18, 2018 03:43
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 maxp/4dcc9ceda4973adf381bc8fab79b9168 to your computer and use it in GitHub Desktop.
Save maxp/4dcc9ceda4973adf381bc8fab79b9168 to your computer and use it in GitHub Desktop.
create key and certificate request
openssl req -utf8 -sha256 -out ${NAME}.csr -new -newkey rsa:2048 -nodes -keyout ${NAME}.key
https://www.openssl.org/docs/man1.0.2/apps/openssl-req.html
openssl req -nodes -newkey rsa:2048 -keyout example.key -out example.csr \
-subj "/C=GB/ST=London/L=London/O=Global Security/OU=IT Department/CN=example.com" \
-batch -utf8
-config "file"
openssl req -text -in yourdomain.csr -noout -verify
config example:
[ req ]
default_bits = 2048
default_keyfile = keyfile.pem
distinguished_name = req_distinguished_name
attributes = req_attributes
prompt = no
output_password = mypass
[ req_distinguished_name ]
C = GB
ST = Test State or Province
L = Test Locality
O = Organization Name
OU = Organizational Unit Name
CN = Common Name
emailAddress = test@email.address
[ req_attributes ]
challengePassword = A challenge password
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment