Created
January 8, 2018 17:01
-
-
Save romainnorberg/464758a6620228b977212a3cf20c3e08 to your computer and use it in GitHub Desktop.
Generate a multi domains certificate using config files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Steps (en ligne de commande - macosx): | |
- `cd Desktop/` | |
- `openssl genrsa -out mmw.key 2048` | |
- `openssl req -new -out server.csr -key server.key -config openssl.cnf` | |
- `openssl x509 -req -days 3650 -in server.csr -signkey server.key -out server_autosign_test.crt -extensions v3_req -extfile openssl.cnf` _(autosigné, afin de vérifier la génération)_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[req] | |
distinguished_name = req_distinguished_name | |
req_extensions = v3_req | |
[req_distinguished_name] | |
countryName = Country Name (2 letter code) | |
countryName_default = FR | |
stateOrProvinceName = State or Province Name (full name) | |
stateOrProvinceName_default = Paris | |
localityName = Locality Name (eg, city) | |
localityName_default = Montrouge | |
organizationName = Organization Name (eg, company) | |
organizationName_default = Maboite | |
organizationalUnitName = Organizational Unit Name (eg, section) | |
organizationalUnitName_default = IT | |
streetAddress= Street address | |
streetAddress_default= 6 Rue des renards enchainés | |
postalCode= Postal Code | |
postalCode_default= 94320 | |
commonName = Common Name (eg, your name or your server's hostname) | |
commonName_default = domain1.com | |
commonName_max = 64 | |
[ v3_req ] | |
# Extensions to add to a certificate request | |
basicConstraints = CA:FALSE | |
keyUsage = nonRepudiation, digitalSignature, keyEncipherment | |
subjectAltName = @alt_names | |
[alt_names] | |
DNS.1 = domain1.com | |
DNS.2 = domain2.com | |
DNS.3 = domain3.com |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment