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