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