2013-07-17 23:30:04 +08:00
|
|
|
#
|
|
|
|
# OpenSSL example configuration file for automated certificate creation.
|
|
|
|
#
|
|
|
|
|
2021-07-29 07:55:09 +08:00
|
|
|
# Comment out the next line to ignore configuration errors
|
|
|
|
config_diagnostics = 1
|
|
|
|
|
2013-07-17 23:30:04 +08:00
|
|
|
# This definition stops the following lines choking if HOME or CN
|
|
|
|
# is undefined.
|
|
|
|
HOME = .
|
|
|
|
CN = "Not Defined"
|
|
|
|
default_ca = ca
|
|
|
|
|
|
|
|
####################################################################
|
2022-08-26 00:09:09 +08:00
|
|
|
|
2013-07-17 23:30:04 +08:00
|
|
|
[ req ]
|
|
|
|
default_bits = 2048
|
|
|
|
default_keyfile = privkey.pem
|
|
|
|
# Don't prompt for fields: use those in section directly
|
|
|
|
prompt = no
|
|
|
|
distinguished_name = req_distinguished_name
|
2022-08-25 23:45:40 +08:00
|
|
|
x509_extensions = v3_ca # The extensions to add to the self signed cert
|
|
|
|
string_mask = utf8only
|
2013-07-17 23:30:04 +08:00
|
|
|
|
|
|
|
# req_extensions = v3_req # The extensions to add to a certificate request
|
|
|
|
|
|
|
|
[ req_distinguished_name ]
|
|
|
|
countryName = UK
|
|
|
|
|
|
|
|
organizationName = OpenSSL Group
|
|
|
|
# Take CN from environment so it can come from a script.
|
|
|
|
commonName = $ENV::CN
|
|
|
|
|
2022-08-26 00:09:09 +08:00
|
|
|
[ usr_rsa_cert ]
|
2013-07-17 23:30:04 +08:00
|
|
|
|
2022-08-25 23:45:40 +08:00
|
|
|
# These extensions are added when 'ca' signs a request for a normal end-entity
|
|
|
|
# certificate with key usage restrictions compatible with RSA keys
|
2013-07-17 23:30:04 +08:00
|
|
|
|
2022-08-25 23:45:40 +08:00
|
|
|
basicConstraints = CA:FALSE
|
|
|
|
keyUsage = critical, nonRepudiation, digitalSignature, keyEncipherment
|
2013-07-17 23:30:04 +08:00
|
|
|
|
2022-08-25 23:45:40 +08:00
|
|
|
# Following SKID and AKID settings are meanwhile by default in all certificates.
|
|
|
|
# See doc/man5/x509v3_config.pod for details.
|
2013-07-17 23:30:04 +08:00
|
|
|
|
2022-08-25 23:45:40 +08:00
|
|
|
# subjectKeyIdentifier = hash
|
|
|
|
# authorityKeyIdentifier = keyid, issuer
|
2013-07-17 23:30:04 +08:00
|
|
|
|
2022-08-26 00:09:09 +08:00
|
|
|
[ signer_cert ]
|
|
|
|
|
|
|
|
basicConstraints = CA:FALSE
|
|
|
|
keyUsage = critical, digitalSignature
|
|
|
|
|
2022-08-25 23:45:40 +08:00
|
|
|
[ dh_cert ]
|
2013-07-17 23:30:04 +08:00
|
|
|
|
2022-08-25 23:45:40 +08:00
|
|
|
# These extensions are added when 'ca' signs a request for an end-entity
|
|
|
|
# DH certificate, for which only key agreement makes sense
|
2013-07-17 23:30:04 +08:00
|
|
|
|
2022-08-25 23:45:40 +08:00
|
|
|
basicConstraints = CA:FALSE
|
|
|
|
keyUsage = critical, keyAgreement
|
2013-07-17 23:30:04 +08:00
|
|
|
|
2022-06-16 01:01:43 +08:00
|
|
|
[ codesign_cert ]
|
|
|
|
|
|
|
|
# These extensions are added when 'ca' signs a request for a code-signing
|
2022-08-25 23:45:40 +08:00
|
|
|
# end-entity certificate compatible with RSA and ECC keys
|
2022-06-16 01:01:43 +08:00
|
|
|
|
2022-08-25 23:45:40 +08:00
|
|
|
basicConstraints = CA:FALSE
|
|
|
|
keyUsage = critical, digitalSignature
|
|
|
|
extendedKeyUsage = codeSigning
|
2022-06-16 01:01:43 +08:00
|
|
|
|
2013-07-17 23:30:04 +08:00
|
|
|
[ v3_ca ]
|
|
|
|
|
2022-08-25 23:45:40 +08:00
|
|
|
# Extensions for a typical CA as required by RFC 5280 etc.
|
|
|
|
# SKID and AKID are by default set according to PKIX recommendation.
|
2013-07-17 23:30:04 +08:00
|
|
|
|
2022-08-25 23:45:40 +08:00
|
|
|
basicConstraints = critical, CA:true
|
2013-07-17 23:30:04 +08:00
|
|
|
keyUsage = critical, cRLSign, keyCertSign
|