blob: abb2892fb44826f11d45f1ab7f46f20ba775b0ff [file] [log] [blame]
Instrumental7a1817b2018-11-05 11:11:15 -06001#!/bin/bash
2#########
3# ============LICENSE_START====================================================
4# org.onap.aaf
5# ===========================================================================
6# Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
7# ===========================================================================
8# Licensed under the Apache License, Version 2.0 (the "License");
9# you may not use this file except in compliance with the License.
10# You may obtain a copy of the License at
11#
12# http://www.apache.org/licenses/LICENSE-2.0
13#
14# Unless required by applicable law or agreed to in writing, software
15# distributed under the License is distributed on an "AS IS" BASIS,
16# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17# See the License for the specific language governing permissions and
18# limitations under the License.
19# ============LICENSE_END====================================================
20#
Instrumental31d847e2018-03-26 14:17:19 -070021# OpenSSL root CA configuration file.
22# Copy to `/opt/app/osaaf/CA/openssl.cnf`.
23
24[ ca ]
25# `man ca`
26default_ca = CA_default
27
28[ CA_default ]
29# Directory and file locations.
30dir = .
31certs = $dir/certs
32crl_dir = $dir/crl
33new_certs_dir = $dir/newcerts
34database = $dir/index.txt
35serial = $dir/serial
36RANDFILE = $dir/private/.rand
37
38# The root key and root certificate.
39private_key = $dir/private/ca.key
40certificate = $dir/certs/ca.crt
41
42# For certificate revocation lists.
43crlnumber = $dir/crlnumber
44crl = $dir/crl/ca.crl.pem
45crl_extensions = crl_ext
46default_crl_days = 30
47
48# SHA-1 is deprecated, so use SHA-2 instead.
49default_md = sha256
50
51name_opt = ca_default
52cert_opt = ca_default
53default_days = 60
54preserve = no
55policy = policy_strict
56
57[ policy_strict ]
58# The root CA should only sign intermediate certificates that match.
59# See the POLICY FORMAT section of `man ca`.
60countryName = match
61stateOrProvinceName = optional
62organizationName = match
63organizationalUnitName = supplied
64commonName = supplied
65
66[ policy_loose ]
67# Allow the intermediate CA to sign a more diverse range of certificates.
68# See the POLICY FORMAT section of the `ca` man page.
69countryName = optional
70stateOrProvinceName = optional
71localityName = optional
72organizationName = optional
73organizationalUnitName = optional
74commonName = supplied
75emailAddress = optional
76
77[ req ]
78# Options for the `req` tool (`man req`).
79default_bits = 2048
80distinguished_name = req_distinguished_name
81string_mask = utf8only
82
83# SHA-1 is deprecated, so use SHA-2 instead.
84default_md = sha256
85
86# Extension to add when the -x509 option is used.
87x509_extensions = v3_ca
88
89[ req_distinguished_name ]
90# See <https://en.wikipedia.org/wiki/Certificate_signing_request>.
91countryName = Country Name (2 letter code)
92stateOrProvinceName = State or Province Name
93localityName = Locality Name
940.organizationName = Organization Name
95organizationalUnitName = Organizational Unit Name
96commonName = Common Name
97emailAddress = Email Address
98
99# Optionally, specify some defaults.
100countryName_default =
101stateOrProvinceName_default =
102localityName_default =
1030.organizationName_default =
104organizationalUnitName_default =
105emailAddress_default =
106
107[ v3_ca ]
108# Extensions for a typical CA (`man x509v3_config`).
109subjectKeyIdentifier = hash
110authorityKeyIdentifier = keyid:always,issuer
111basicConstraints = critical, CA:true
112keyUsage = critical, digitalSignature, cRLSign, keyCertSign
113
114[ v3_intermediate_ca ]
115# Extensions for a typical intermediate CA (`man x509v3_config`).
116subjectKeyIdentifier = hash
117authorityKeyIdentifier = keyid:always,issuer
118basicConstraints = critical, CA:true, pathlen:0
119keyUsage = critical, digitalSignature, cRLSign, keyCertSign
120
121[ usr_cert ]
122# Extensions for client certificates (`man x509v3_config`).
123basicConstraints = CA:FALSE
124nsCertType = client, email
125nsComment = "OpenSSL Generated Client Certificate"
126subjectKeyIdentifier = hash
127authorityKeyIdentifier = keyid,issuer
128keyUsage = critical, nonRepudiation, digitalSignature, keyEncipherment
129extendedKeyUsage = clientAuth, emailProtection
130
131[ server_cert ]
132# Extensions for server certificates (`man x509v3_config`).
133basicConstraints = CA:FALSE
134nsCertType = server, client
135nsComment = "OpenSSL Generated Server Certificate"
136subjectKeyIdentifier = hash
137authorityKeyIdentifier = keyid,issuer:always
138keyUsage = critical, digitalSignature, keyEncipherment, nonRepudiation
139extendedKeyUsage = serverAuth, clientAuth
140
141[ crl_ext ]
142# Extension for CRLs (`man x509v3_config`).
143authorityKeyIdentifier=keyid:always
144
145[ ocsp ]
146# Extension for OCSP signing certificates (`man ocsp`).
147basicConstraints = CA:FALSE
148subjectKeyIdentifier = hash
149authorityKeyIdentifier = keyid,issuer
150keyUsage = critical, digitalSignature
151extendedKeyUsage = critical, OCSPSigning