Skip to content

Instantly share code, notes, and snippets.

@jacoelho
Created July 17, 2015 09:32
Show Gist options
  • Save jacoelho/06536818eae2c49d5434 to your computer and use it in GitHub Desktop.
Save jacoelho/06536818eae2c49d5434 to your computer and use it in GitHub Desktop.
Generate a certificate request
[ req ]
default_bits = 2048
encrypt_key = no
default_md = sha256
prompt = no
utf8 = yes
distinguished_name = my_req_distinguished_name
req_extensions = my_extensions
[ my_req_distinguished_name ]
C = PT
ST = foo
L = foo
O = foo
businessCategory = Private Organization
CN = foo
[ my_extensions ]
basicConstraints=CA:FALSE
subjectAltName=@my_subject_alt_names
subjectKeyIdentifier = hash
[ my_subject_alt_names ]
DNS.1 = foo
DNS.2 = bar
[ new_oids ]
businessCategory=2.5.4.15
streetAddress=2.5.4.9
stateOrProvinceName=2.5.4.8
countryName=2.5.4.6
jurisdictionOfIncorporationLocalityName=1.3.6.1.4.1.311.60.2.1.1
jurisdictionOfIncorporationStateOrProvinceName=1.3.6.1.4.1.311.60.2.1.2
jurisdictionOfIncorporationCountryName=1.3.6.1.4.1.311.60.2.1.3
openssl req -new -out mysite.csr -config request.conf
openssl req -in mysite.csr -noout -text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment