Modify the following line in the section [ CA_default ]
Change from:
dir = ../../CA
Change to:
dir = ./CA
Comment out the two appearances of the following line:
Change from:
nsComment = "OpenSSL Generated Certificate"
Change to:
#nsComment = "OpenSSL Generated Certificate"
Uncomment the following line and add v3_req to extensions.
Change from:
# X.509v3 extensions to use:
# extensions =
Change to:
# X.509v3 extensions to use:
extensions = v3_req
Uncomment the following line.
Change from:
# req_extensions = v3_req # The extensions to add to a certificate request.
Change to:
req_extensions = v3_req # The extensions to add to a certificate request.
Change the following line in the [ v3_req ] section.
Change from:
keyUsage = nonRepudiation, digitalSignature, keyEncipherment
Change to:
keyUsage = nonRepudiation, digitalSignature, keyEncipherment, dataEncipherment
Add the following line to the [ v3_req ] section.
extendedKeyUsage=serverAuth,clientAuth
Add the following line to the [ usr_cert ] section.
Change from:
# These extensions are added when 'ca' signs a request.
Change to:
# These extensions are added when 'ca' signs a request.
keyUsage = nonRepudiation, digitalSignature, keyEncipherment, dataEncipherment
extendedKeyUsage=serverAuth,clientAuth
Change string_mask in the [ req ] section to the following:
If you want to use a message digest higher than sha1, for example sha256, change the option default_md in the [ req ] section