summaryrefslogtreecommitdiff
path: root/src/regress/lib/libcrypto/CA/root.cnf
diff options
context:
space:
mode:
Diffstat (limited to 'src/regress/lib/libcrypto/CA/root.cnf')
-rw-r--r--src/regress/lib/libcrypto/CA/root.cnf129
1 files changed, 129 insertions, 0 deletions
diff --git a/src/regress/lib/libcrypto/CA/root.cnf b/src/regress/lib/libcrypto/CA/root.cnf
new file mode 100644
index 0000000000..7915a6ab0e
--- /dev/null
+++ b/src/regress/lib/libcrypto/CA/root.cnf
@@ -0,0 +1,129 @@
1# For regression tests
2default_ca = CA_regress
3
4[ CA_regress ]
5# Directory and file locations.
6dir = .
7certs = $dir
8crl_dir = $dir
9database = $dir/root.txt
10serial = $dir/rootserial
11new_certs_dir = $dir
12
13# The root key and root certificate.
14private_key = $dir/root.key.pem
15certificate = $dir/root.cert.pem
16
17# For certificate revocation lists.
18crlnumber = $dir/crlnumber
19crl = $dir/ca.crl.pem
20crl_extensions = crl_ext
21default_crl_days = 30
22
23# SHA-1 is deprecated, so use SHA-2 instead.
24default_md = sha256
25
26name_opt = ca_default
27cert_opt = ca_default
28default_days = 375
29preserve = no
30policy = policy_strict
31
32[ policy_strict ]
33# The root CA should only sign intermediate certificates that match.
34# See the POLICY FORMAT section of `man ca`.
35countryName = match
36stateOrProvinceName = match
37organizationName = match
38organizationalUnitName = optional
39commonName = supplied
40emailAddress = optional
41
42[ policy_loose ]
43# Allow the intermediate CA to sign a more diverse range of certificates.
44# See the POLICY FORMAT section of the `ca` man page.
45countryName = optional
46stateOrProvinceName = optional
47localityName = optional
48organizationName = optional
49organizationalUnitName = optional
50commonName = supplied
51emailAddress = optional
52
53[ req ]
54# Options for the `req` tool (`man req`).
55default_bits = 2048
56distinguished_name = req_distinguished_name
57string_mask = utf8only
58
59# SHA-1 is deprecated, so use SHA-2 instead.
60default_md = sha256
61
62# Extension to add when the -x509 option is used.
63x509_extensions = v3_ca
64
65[ req_distinguished_name ]
66# See <https://en.wikipedia.org/wiki/Certificate_signing_request>.
67countryName = Country Name (2 letter code)
68stateOrProvinceName = State or Province Name
69localityName = Locality Name
700.organizationName = Organization Name
71organizationalUnitName = Organizational Unit Name
72commonName = Common Name
73emailAddress = Email Address
74
75# Optionally, specify some defaults.
76countryName_default = CA
77stateOrProvinceName_default = Alberta
78localityName_default = Edmonton
790.organizationName_default = OpenBSD
80organizationalUnitName_default = So and Sos
81emailAddress_default = evilsoandsos@openbsd.org
82commonName_default = Regress Root CA
83
84[ v3_ca ]
85# Extensions for a typical CA (`man x509v3_config`).
86subjectKeyIdentifier = hash
87authorityKeyIdentifier = keyid:always,issuer
88basicConstraints = critical, CA:true
89keyUsage = critical, digitalSignature, cRLSign, keyCertSign
90
91[ v3_intermediate_ca ]
92# Extensions for a typical intermediate CA (`man x509v3_config`).
93subjectKeyIdentifier = hash
94authorityKeyIdentifier = keyid:always,issuer
95basicConstraints = critical, CA:true, pathlen:0
96keyUsage = critical, digitalSignature, cRLSign, keyCertSign
97
98[ usr_cert ]
99# Extensions for client certificates (`man x509v3_config`).
100basicConstraints = CA:FALSE
101nsCertType = client, email
102nsComment = "OpenSSL Generated Client Certificate"
103subjectKeyIdentifier = hash
104authorityKeyIdentifier = keyid,issuer
105keyUsage = critical, nonRepudiation, digitalSignature, keyEncipherment
106extendedKeyUsage = clientAuth, emailProtection
107
108[ server_cert ]
109# Extensions for server certificates (`man x509v3_config`).
110basicConstraints = CA:FALSE
111nsCertType = server
112nsComment = "OpenSSL Generated Server Certificate"
113subjectKeyIdentifier = hash
114authorityKeyIdentifier = keyid,issuer:always
115keyUsage = critical, digitalSignature, keyEncipherment
116extendedKeyUsage = serverAuth
117
118[ crl_ext ]
119# Extension for CRLs (`man x509v3_config`).
120authorityKeyIdentifier=keyid:always
121
122[ ocsp ]
123# Extension for OCSP signing certificates (`man ocsp`).
124basicConstraints = CA:FALSE
125subjectKeyIdentifier = hash
126authorityKeyIdentifier = keyid,issuer
127keyUsage = critical, digitalSignature
128extendedKeyUsage = critical, OCSPSigning
129