Matteo Scandolo | 3896c47 | 2017-08-01 13:31:42 -0700 | [diff] [blame] | 1 | |
| 2 | {# |
| 3 | Copyright 2017-present Open Networking Foundation |
| 4 | |
| 5 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | you may not use this file except in compliance with the License. |
| 7 | You may obtain a copy of the License at |
| 8 | |
| 9 | http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | |
| 11 | Unless required by applicable law or agreed to in writing, software |
| 12 | distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | See the License for the specific language governing permissions and |
| 15 | limitations under the License. |
| 16 | #} |
| 17 | |
| 18 | |
Zack Williams | c047c87 | 2017-01-11 08:38:15 -0700 | [diff] [blame] | 19 | # Created by openssl_im.cnf.j2, configured by ansible |
| 20 | |
| 21 | [ ca ] |
| 22 | default_ca = CA_default |
| 23 | |
| 24 | [ CA_default ] |
Zack Williams | 44845c6 | 2017-04-21 13:57:14 -0700 | [diff] [blame] | 25 | dir = {{ pki_dir }}/{{ site_name }}_im_ca |
Zack Williams | c047c87 | 2017-01-11 08:38:15 -0700 | [diff] [blame] | 26 | certs = $dir/certs |
| 27 | crl_dir = $dir/crl |
| 28 | new_certs_dir = $dir/newcerts |
| 29 | database = $dir/index.txt |
| 30 | serial = $dir/serial |
| 31 | RANDFILE = $dir/private/.randfile |
| 32 | |
| 33 | private_key = $dir/private/im_key.pem |
| 34 | certificate = $dir/certs/im_cert.pem |
| 35 | |
| 36 | crlnumber = $dir/crl/crlnumber |
| 37 | crl = $dir/crl/im_crl.pem |
| 38 | crl_extensions = crl_ext |
| 39 | default_crl_days = 30 |
| 40 | |
| 41 | # Make new requests easier to sign - allow two subjects with same name |
| 42 | # (Or revoke the old certificate first.) |
| 43 | unique_subject = no |
| 44 | |
| 45 | default_md = {{ ca_digest }} |
| 46 | |
| 47 | name_opt = ca_default |
| 48 | cert_opt = ca_default |
| 49 | default_days = {{ ca_im_days }} |
| 50 | preserve = no |
| 51 | |
| 52 | # for CA that signs client certs |
| 53 | policy = policy_loose |
| 54 | |
| 55 | [ policy_loose ] |
| 56 | # Allow the intermediate CA to sign more types of certs |
| 57 | countryName = optional |
| 58 | stateOrProvinceName = optional |
| 59 | localityName = optional |
| 60 | organizationName = optional |
| 61 | organizationalUnitName = optional |
| 62 | commonName = supplied |
| 63 | emailAddress = optional |
| 64 | |
| 65 | [ req ] |
| 66 | default_bits = {{ ca_size }} |
| 67 | default_md = {{ ca_digest }} |
| 68 | distinguished_name = req_distinguished_name |
| 69 | string_mask = utf8only |
| 70 | x509_extensions = v3_intermediate_ca |
| 71 | |
| 72 | [ req_distinguished_name ] |
| 73 | # See <https://en.wikipedia.org/wiki/Certificate_signing_request>. |
| 74 | countryName = Country Name (2 letter code) |
| 75 | stateOrProvinceName = State or Province Name |
| 76 | localityName = Locality Name |
| 77 | 0.organizationName = Organization Name |
| 78 | organizationalUnitName = Organizational Unit Name |
| 79 | commonName = Common Name |
| 80 | emailAddress = Email Address |
| 81 | |
| 82 | # Some defaults |
| 83 | countryName_default = US |
| 84 | stateOrProvinceName_default = California |
| 85 | localityName_default = Menlo Park |
| 86 | 0.organizationName_default = ON.Lab |
Zack Williams | 44845c6 | 2017-04-21 13:57:14 -0700 | [diff] [blame] | 87 | organizationalUnitName_default = {{ site_humanname }} |
Zack Williams | c047c87 | 2017-01-11 08:38:15 -0700 | [diff] [blame] | 88 | emailAddress_default = privateca@opencord.org |
| 89 | |
| 90 | [ v3_intermediate_ca ] |
| 91 | # Extensions for a typical intermediate CA (`man x509v3_config`). |
| 92 | subjectKeyIdentifier = hash |
| 93 | authorityKeyIdentifier = keyid:always,issuer |
| 94 | basicConstraints = critical, CA:TRUE, pathlen:0 |
| 95 | keyUsage = critical, digitalSignature, cRLSign, keyCertSign |
| 96 | |
| 97 | [ server_cert ] |
| 98 | # Extensions for server certificates (`man x509v3_config`). |
| 99 | subjectKeyIdentifier = hash |
| 100 | authorityKeyIdentifier = keyid,issuer:always |
| 101 | basicConstraints = CA:FALSE |
| 102 | keyUsage = critical, digitalSignature, keyEncipherment |
| 103 | extendedKeyUsage = serverAuth |
| 104 | subjectAltName = ${ENV::KEY_ALTNAMES} |
| 105 | |
| 106 | [ user_cert ] |
| 107 | # Extensions for client certificates (`man x509v3_config`). |
| 108 | subjectKeyIdentifier = hash |
| 109 | authorityKeyIdentifier = keyid,issuer:always |
| 110 | basicConstraints = CA:FALSE |
| 111 | keyUsage = critical, digitalSignature, keyEncipherment, nonRepudiation |
| 112 | extendedKeyUsage = clientAuth, emailProtection |
| 113 | |
| 114 | [ crl_ext ] |
| 115 | # Extension for CRLs (`man x509v3_config`). |
| 116 | authorityKeyIdentifier=keyid:always |
| 117 | |
| 118 | [ ocsp ] |
| 119 | # Extension for OCSP signing certificates (`man ocsp`). |
| 120 | basicConstraints = CA:FALSE |
| 121 | subjectKeyIdentifier = hash |
| 122 | authorityKeyIdentifier = keyid,issuer |
| 123 | keyUsage = critical, digitalSignature |
| 124 | extendedKeyUsage = critical, OCSPSigning |
| 125 | |