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