Philipp Maier | bb169b2 | 2024-03-04 11:09:00 +0100 | [diff] [blame^] | 1 | # For use with Easy-RSA 3.0+ and OpenSSL or LibreSSL |
| 2 | |
| 3 | #################################################################### |
| 4 | [ ca ] |
| 5 | default_ca = CA_default # The default ca section |
| 6 | |
| 7 | #################################################################### |
| 8 | [ CA_default ] |
| 9 | |
| 10 | dir = $ENV::EASYRSA_PKI # Where everything is kept |
| 11 | certs = $dir # Where the issued certs are kept |
| 12 | crl_dir = $dir # Where the issued crl are kept |
| 13 | database = $dir/index.txt # database index file. |
| 14 | new_certs_dir = $dir/certs_by_serial # default place for new certs. |
| 15 | |
| 16 | certificate = $dir/ca.crt # The CA certificate |
| 17 | serial = $dir/serial # The current serial number |
| 18 | crl = $dir/crl.pem # The current CRL |
| 19 | private_key = $dir/private/ca.key # The private key |
| 20 | RANDFILE = $dir/.rand # private random number file |
| 21 | |
| 22 | x509_extensions = basic_exts # The extensions to add to the cert |
| 23 | |
| 24 | # A placeholder to handle the --copy-ext feature: |
| 25 | #%COPY_EXTS% # Do NOT remove or change this line as --copy-ext support requires it |
| 26 | |
| 27 | # This allows a V2 CRL. Ancient browsers don't like it, but anything Easy-RSA |
| 28 | # is designed for will. In return, we get the Issuer attached to CRLs. |
| 29 | crl_extensions = crl_ext |
| 30 | |
| 31 | default_days = $ENV::EASYRSA_CERT_EXPIRE # how long to certify for |
| 32 | default_crl_days = $ENV::EASYRSA_CRL_DAYS # how long before next CRL |
| 33 | default_md = $ENV::EASYRSA_DIGEST # use public key default MD |
| 34 | preserve = no # keep passed DN ordering |
| 35 | |
| 36 | # This allows to renew certificates which have not been revoked |
| 37 | unique_subject = no |
| 38 | |
| 39 | # A few different ways of specifying how similar the request should look |
| 40 | # For type CA, the listed attributes must be the same, and the optional |
| 41 | # and supplied fields are just that :-) |
| 42 | policy = policy_anything |
| 43 | |
| 44 | # For the 'anything' policy, which defines allowed DN fields |
| 45 | [ policy_anything ] |
| 46 | countryName = optional |
| 47 | stateOrProvinceName = optional |
| 48 | localityName = optional |
| 49 | organizationName = optional |
| 50 | organizationalUnitName = optional |
| 51 | commonName = supplied |
| 52 | name = optional |
| 53 | emailAddress = optional |
| 54 | |
| 55 | #################################################################### |
| 56 | # Easy-RSA request handling |
| 57 | # We key off $DN_MODE to determine how to format the DN |
| 58 | [ req ] |
| 59 | default_bits = $ENV::EASYRSA_KEY_SIZE |
| 60 | default_keyfile = privkey.pem |
| 61 | default_md = $ENV::EASYRSA_DIGEST |
| 62 | distinguished_name = $ENV::EASYRSA_DN |
| 63 | x509_extensions = easyrsa_ca # The extensions to add to the self signed cert |
| 64 | |
| 65 | # A placeholder to handle the $EXTRA_EXTS feature: |
| 66 | #%EXTRA_EXTS% # Do NOT remove or change this line as $EXTRA_EXTS support requires it |
| 67 | |
| 68 | #################################################################### |
| 69 | # Easy-RSA DN (Subject) handling |
| 70 | |
| 71 | # Easy-RSA DN for cn_only support: |
| 72 | [ cn_only ] |
| 73 | commonName = Common Name (eg: your user, host, or server name) |
| 74 | commonName_max = 64 |
| 75 | commonName_default = $ENV::EASYRSA_REQ_CN |
| 76 | |
| 77 | # Easy-RSA DN for org support: |
| 78 | [ org ] |
| 79 | countryName = Country Name (2 letter code) |
| 80 | countryName_default = $ENV::EASYRSA_REQ_COUNTRY |
| 81 | countryName_min = 2 |
| 82 | countryName_max = 2 |
| 83 | |
| 84 | stateOrProvinceName = State or Province Name (full name) |
| 85 | stateOrProvinceName_default = $ENV::EASYRSA_REQ_PROVINCE |
| 86 | |
| 87 | localityName = Locality Name (eg, city) |
| 88 | localityName_default = $ENV::EASYRSA_REQ_CITY |
| 89 | |
| 90 | 0.organizationName = Organization Name (eg, company) |
| 91 | 0.organizationName_default = $ENV::EASYRSA_REQ_ORG |
| 92 | |
| 93 | organizationalUnitName = Organizational Unit Name (eg, section) |
| 94 | organizationalUnitName_default = $ENV::EASYRSA_REQ_OU |
| 95 | |
| 96 | commonName = Common Name (eg: your user, host, or server name) |
| 97 | commonName_max = 64 |
| 98 | commonName_default = $ENV::EASYRSA_REQ_CN |
| 99 | |
| 100 | emailAddress = Email Address |
| 101 | emailAddress_default = $ENV::EASYRSA_REQ_EMAIL |
| 102 | emailAddress_max = 64 |
| 103 | |
| 104 | #################################################################### |
| 105 | # Easy-RSA cert extension handling |
| 106 | |
| 107 | # This section is effectively unused as the main script sets extensions |
| 108 | # dynamically. This core section is left to support the odd usecase where |
| 109 | # a user calls openssl directly. |
| 110 | [ basic_exts ] |
| 111 | basicConstraints = CA:FALSE |
| 112 | subjectKeyIdentifier = hash |
| 113 | authorityKeyIdentifier = keyid,issuer:always |
| 114 | |
| 115 | # The Easy-RSA CA extensions |
| 116 | [ easyrsa_ca ] |
| 117 | |
| 118 | # PKIX recommendations: |
| 119 | |
| 120 | subjectKeyIdentifier=hash |
| 121 | authorityKeyIdentifier=keyid:always,issuer:always |
| 122 | |
| 123 | # This could be marked critical, but it's nice to support reading by any |
| 124 | # broken clients who attempt to do so. |
| 125 | basicConstraints = CA:true |
| 126 | |
| 127 | # Limit key usage to CA tasks. If you really want to use the generated pair as |
| 128 | # a self-signed cert, comment this out. |
| 129 | keyUsage = cRLSign, keyCertSign |
| 130 | |
| 131 | # nsCertType omitted by default. Let's try to let the deprecated stuff die. |
| 132 | # nsCertType = sslCA |
| 133 | |
| 134 | # A placeholder to handle the $X509_TYPES and CA extra extensions $EXTRA_EXTS: |
| 135 | #%CA_X509_TYPES_EXTRA_EXTS% # Do NOT remove or change this line as $X509_TYPES and EXTRA_EXTS demands it |
| 136 | |
| 137 | # CRL extensions. |
| 138 | [ crl_ext ] |
| 139 | |
| 140 | # Only issuerAltName and authorityKeyIdentifier make any sense in a CRL. |
| 141 | |
| 142 | # issuerAltName=issuer:copy |
| 143 | authorityKeyIdentifier=keyid:always,issuer:always |