Zack Williams | ec61381 | 2020-11-09 15:49:29 -0700 | [diff] [blame^] | 1 | # SPDX-FileCopyrightText: © 2022 Open Networking Foundation <support@opennetworking.org> |
| 2 | #SPDX-License-Identifier: Apache-2.0 |
| 3 | |
| 4 | |
| 5 | [ default ] |
| 6 | ca = $ENV::CA_NAME |
| 7 | dir = $ENV::BASE_DIR |
| 8 | default_ca = default_ca |
| 9 | name_opt = multiline,-esc_msb,utf8 # Display UTF-8 characters |
| 10 | config_diagnostics = 1 |
| 11 | |
| 12 | [ req ] |
| 13 | default_bits = 2048 |
| 14 | default_days = 1825 |
| 15 | default_md = sha256 |
| 16 | encrypt_key = yes |
| 17 | default_md = sha256 |
| 18 | distinguished_name = ca_dn |
| 19 | utf8 = yes |
| 20 | string_mask = utf8only |
| 21 | |
| 22 | [ default_ca ] |
| 23 | certificate = $dir/$ca/ca.pem |
| 24 | private_key = $dir/$ca/private/ca_key.pem |
| 25 | policy = match_pol |
| 26 | name_opt = $name_opt |
| 27 | preserve = no |
| 28 | email_in_dn = no |
| 29 | copy_extensions = copy |
| 30 | |
| 31 | new_certs_dir = $dir/$ca/certs |
| 32 | serial = $dir/$ca/db/ca.srl |
| 33 | rand_serial = no |
| 34 | database = $dir/$ca/db/ca.db |
| 35 | |
| 36 | # crl |
| 37 | crl_dir = $dir/$ca/crl |
| 38 | crlnumber = $dir/$ca/crl/db/ca.crl.srl |
| 39 | default_md = sha256 |
| 40 | default_crl_days = 365 |
| 41 | crl_extensions = crl_ext |
| 42 | |
| 43 | # Extensions for a typical CA (`man x509v3_config`). |
| 44 | [ root_ca_ext ] |
| 45 | subjectKeyIdentifier = hash |
| 46 | authorityKeyIdentifier = keyid:always,issuer |
| 47 | basicConstraints = critical, CA:true |
| 48 | keyUsage = critical, keyCertSign, cRLSign |
| 49 | |
| 50 | # Extensions for a typical intermediate CA (`man x509v3_config`). |
| 51 | [ im_ca_ext ] |
| 52 | subjectKeyIdentifier = hash |
| 53 | authorityKeyIdentifier = keyid:always,issuer |
| 54 | basicConstraints = critical, CA:true, pathlen:0 |
| 55 | keyUsage = critical, keyCertSign, cRLSign |
| 56 | |
| 57 | # Extensions for server certificates (`man x509v3_config`). |
| 58 | [ server_cert_ext ] |
| 59 | subjectKeyIdentifier = hash |
| 60 | authorityKeyIdentifier = keyid,issuer:always |
| 61 | basicConstraints = critical, CA:FALSE |
| 62 | keyUsage = critical, digitalSignature, keyEncipherment |
| 63 | extendedKeyUsage = serverAuth |
| 64 | |
| 65 | # Extensions for client certificates (`man x509v3_config`). |
| 66 | [ client_cert_ext ] |
| 67 | subjectKeyIdentifier = hash |
| 68 | authorityKeyIdentifier = keyid,issuer:always |
| 69 | basicConstraints = critical, CA:FALSE |
| 70 | keyUsage = critical, digitalSignature, keyEncipherment, nonRepudiation |
| 71 | extendedKeyUsage = clientAuth, emailProtection |
| 72 | |
| 73 | [ crl_ext ] |
| 74 | authorityKeyIdentifier = keyid:always |
| 75 | |
| 76 | # The root CA should only sign intermediate certificates that match. |
| 77 | # See the POLICY FORMAT section of `man ca`. |
| 78 | [ match_pol ] |
| 79 | countryName = match |
| 80 | stateOrProvinceName = match |
| 81 | localityName = match |
| 82 | organizationName = match |
| 83 | organizationalUnitName = optional |
| 84 | commonName = supplied |
| 85 | emailAddress = optional |
| 86 | |
| 87 | # Allow intermediate CA's to sign more types of certs |
| 88 | [ any_pol ] |
| 89 | domainComponent = optional |
| 90 | countryName = optional |
| 91 | stateOrProvinceName = optional |
| 92 | localityName = optional |
| 93 | organizationName = optional |
| 94 | organizationalUnitName = optional |
| 95 | commonName = supplied |
| 96 | emailAddress = optional |
| 97 | |
| 98 | |
| 99 | [ ca_dn ] |
| 100 | # See <https://en.wikipedia.org/wiki/Certificate_signing_request>. |
| 101 | countryName = Country Name (2 letter code) |
| 102 | stateOrProvinceName = State or Province Name |
| 103 | localityName = Locality Name |
| 104 | 0.organizationName = Organization Name |
| 105 | organizationalUnitName = Organizational Unit Name |
| 106 | commonName = Common Name |
| 107 | emailAddress = Email Address |
| 108 | |
| 109 | # Defaults DN |
| 110 | countryName_default = US |
| 111 | stateOrProvinceName_default = California |
| 112 | localityName_default = Menlo Park |
| 113 | 0.organizationName_default = ONF |
| 114 | organizationalUnitName_default = Infra |
| 115 | commonName = Testing |
| 116 | emailAddress_default = do-not-reply@opennetworking.org |
| 117 | |