Skip to content

Instantly share code, notes, and snippets.

@lorenzo95
lorenzo95 / generate-csr.sh
Created August 19, 2020 14:41 — forked from JakeDEvans/generate-csr.sh
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