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