Skip to content

Instantly share code, notes, and snippets.

@jstrassburg
Last active September 18, 2019 21:29
Show Gist options
  • Save jstrassburg/e4e79adbb95d7333e2b27161b307f8cf to your computer and use it in GitHub Desktop.
Save jstrassburg/e4e79adbb95d7333e2b27161b307f8cf to your computer and use it in GitHub Desktop.
openssl certificate signing request with SANs
[ req ]
default_bits = 2048
distinguished_name = req_distinguished_name
req_extensions = req_ext
attributes = req_attributes
prompt = no
[ req_distinguished_name ]
countryName = US
stateOrProvinceName = StateName
localityName = CityName
emailAddress = [email protected]
organizationName = Example Org
organizationalUnitName = Example OU
commonName = example.com
[ req_attributes ]
challengePassword = put_a_password_here
[ req_ext ]
subjectAltName = @alt_names
[alt_names]
DNS.1 = foo.com
DNS.2 = bar.com
openssl req -new -sha256 -newkey rsa:2048 -nodes -keyout example.com.key -out example.com.csr -config example.com.cnf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment