Skip to content

Instantly share code, notes, and snippets.

@JakeDEvans
Created May 31, 2018 14:06
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save JakeDEvans/fc777d0306ba66b4bbeb4eb23fbe9b8b to your computer and use it in GitHub Desktop.
Save JakeDEvans/fc777d0306ba66b4bbeb4eb23fbe9b8b to your computer and use it in GitHub Desktop.
one-liner CSR generation for Multi SAN Certificates openssl
openssl req -new -newkey rsa:2048 -nodes -sha256 -keyout example.key -subj "/C=US/ST=CA/O=Organization/OU=Department/CN=example" -config <(
cat <<-EOF
[req]
default_bits = 2048
default_md = sha256
req_extensions = req_ext
distinguished_name = dn
[ dn ]
[ req_ext ]
subjectAltName = @alt_names
[alt_names]
DNS.1 = example.com
DNS.2 = www.example.com
EOF
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment