-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathopenssl_root_ca.cnf
334 lines (295 loc) · 13.6 KB
/
openssl_root_ca.cnf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
# Copyright © 2017 Alessandro Menti
#
# This file is licensed under the terms and conditions of the MIT license.
# See the LICENSE file for more details.
# OpenSSL configuration file for a root CA.
# Replace the URLs with the paths to your OCSP responder and to the root CA
# certificate/current CRL.
OCSP_RESPONDER = http://myca.example.com/ocsp/rootca
ROOT_CA_CERTIFICATE = http://myca.example.com/repository/rootca.cer
ROOT_CA_CRL = http://myca.example.com/repository/rootca.crl
oid_file = additional_oids
[ca]
default_ca = root_ca
[req]
default_bits = 4096
default_md = sha256
string_mask = utf8only
prompt = no
# Change the distinguished name section to use depending on the subordinate CA
# you generate.
distinguished_name = webserver-extendedvalidation_ca_distinguished_name
[root_ca]
dir = ./root
database = $dir/index
serial = $dir/serial
crlnumber = $dir/crlserial
certificate = $dir/rootca.cer
private_key = $dir/rootca.pvk
new_certs_dir = $dir/newcerts
# Choose SHA-256 as the hash algorithm.
default_md = sha256
# Though there is no explicit provision for the duration of intermediate CA
# certificates, rotating them every five years is a good practice.
default_days = 1825
default_crl_days = 365
# To ease key rollover, allow certificates to have the same Subject DN and be
# valid at the same time.
unique_subject = no
# Only add the DN components/extensions we specify here to the issued
# certificates.
preserve = no
copy_extensions = none
email_in_dn = no
policy = root_ca_dn_policy
# Show (almost all) details when signing a certificate request.
name_opt = ca_default
cert_opt = ca_default
crl_extensions = root_ca_crl_extensions
# Change the following DNs as needed.
[root_ca_distinguished_name]
countryName=IT
organizationName=My CA
commonName=My CA Root Certificate
[personal-emailvalidated_ca_distinguished_name]
countryName=IT
organizationName=My CA
commonName=My CA E-mail Validated Personal CA
[personal-individualvalidated_ca_distinguished_name]
countryName=IT
organizationName=My CA
commonName=My CA Individual Validated Personal CA
[personal-organizationvalidated_ca_distinguished_name]
countryName=IT
organizationName=My CA
commonName=My CA Organization Validated Personal CA
[webserver-domainvalidated_ca_distinguished_name]
countryName=IT
organizationName=My CA
commonName=My CA Domain Validated Web Server CA
[webserver-individualvalidated_ca_distinguished_name]
countryName=IT
organizationName=My CA
commonName=My CA Individual Validated Web Server CA
[webserver-organizationvalidated_ca_distinguished_name]
countryName=IT
organizationName=My CA
commonName=My CA Organization Validated Web Server CA
[webserver-extendedvalidation_ca_distinguished_name]
countryName=IT
organizationName=My CA
commonName=My CA Extended Validation Web Server CA
[codesigning-individualvalidated_ca_distinguished_name]
countryName=IT
organizationName=My CA
commonName=My CA Individual Validated Code Signing CA
[codesigning-organizationvalidated_ca_distinguished_name]
countryName=IT
organizationName=My CA
commonName=My CA Organization Validated Code Signing CA
[codesigning-extendedvalidation_ca_distinguished_name]
countryName=IT
organizationName=My CA
commonName=My CA Extended Validation Code Signing CA
[timestamping_ca_distinguished_name]
countryName=IT
organizationName=My CA
commonName=My CA Time Stamping CA
[timestamping-extendedvalidation_ca_distinguished_name]
countryName=IT
organizationName=My CA
commonName=My CA Extended Validation Time Stamping CA
[ocspresponder_distinguished_name]
countryName=IT
organizationName=My CA
commonName=My CA Root CA OCSP Responder
# Extensions for the root CA certificate.
[root_ca_extensions]
basicConstraints = critical,CA:TRUE
keyUsage = critical,keyCertSign,cRLSign
subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid:always
# Extensions for the personal, e-mail validated CA certificate. This CA will
# only be able to issue client authentication and S/MIME certificates. OCSP
# responses will be signed directly.
[personal-emailvalidated_ca_certificate_extensions]
basicConstraints = critical,CA:TRUE,pathlen:0
keyUsage = critical,keyCertSign,cRLSign,digitalSignature
extendedKeyUsage = clientAuth,emailProtection
subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid:always
authorityInfoAccess = OCSP;URI:${OCSP_RESPONDER},caIssuers;URI:${ROOT_CA_CERTIFICATE}
crlDistributionPoints = URI:${ROOT_CA_CRL}
# If you are following the validation practices mandated by the CA/Browser
# Forum, add "cabBRDomainValidated" to the line below.
certificatePolicies = @root_ca_polsect
# If you would like to restrict certificate issuance to a single e-mail
# domain (recommended for internal CAs), uncomment the following line.
# nameConstraints = critical,permitted;email:.example.com
# Extensions for the personal, individual validated CA certificates. This CA
# will only be able to issue client authentication, document/PDF signing and
# S/MIME certificates. OCSP responses will be signed directly.
[personal-individualvalidated_ca_certificate_extensions]
basicConstraints = critical,CA:TRUE,pathlen:0
keyUsage = critical,keyCertSign,cRLSign,digitalSignature
extendedKeyUsage = clientAuth,emailProtection,adobeAuthenticDocumentsTrust,kpDocumentSigning
subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid:always
authorityInfoAccess = OCSP;URI:${OCSP_RESPONDER},caIssuers;URI:${ROOT_CA_CERTIFICATE}
crlDistributionPoints = URI:${ROOT_CA_CRL}
# If you are following the validation practices mandated by the CA/Browser
# Forum, add "cabBRIndividualValidated" to the line below.
certificatePolicies = @root_ca_polsect
# If you would like to restrict certificate issuance to a single e-mail
# domain (recommended for internal CAs), uncomment the following line.
# nameConstraints = critical,permitted;email:.example.com
# Extensions for the personal, organization validated CA certificates. This CA
# will only be able to issue client authentication, document/PDF signing and
# S/MIME certificates. OCSP responses will be signed directly.
[personal-organizationvalidated_ca_certificate_extensions]
basicConstraints = critical,CA:TRUE,pathlen:0
keyUsage = critical,keyCertSign,cRLSign,digitalSignature
extendedKeyUsage = clientAuth,emailProtection,adobeAuthenticDocumentsTrust,kpDocumentSigning
subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid:always
authorityInfoAccess = OCSP;URI:${OCSP_RESPONDER},caIssuers;URI:${ROOT_CA_CERTIFICATE}
crlDistributionPoints = URI:${ROOT_CA_CRL}
# If you are following the validation practices mandated by the CA/Browser
# Forum, add "cabBROrganizationValidated" to the line below.
certificatePolicies = @root_ca_polsect
# If you would like to restrict certificate issuance to a single e-mail
# domain (recommended for internal CAs), uncomment the following line.
# nameConstraints = critical,permitted;email:.example.com
# Extensions for the Web server, domain validated CA certificate. This CA will
# only be able to issue client/server authentication certificates. OCSP
# responses will be signed directly.
[webserver-domainvalidated_ca_certificate_extensions]
basicConstraints = critical,CA:TRUE,pathlen:0
keyUsage = critical,keyCertSign,cRLSign,digitalSignature
extendedKeyUsage = clientAuth,serverAuth
subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid:always
authorityInfoAccess = OCSP;URI:${OCSP_RESPONDER},caIssuers;URI:${ROOT_CA_CERTIFICATE}
crlDistributionPoints = URI:${ROOT_CA_CRL}
# If you are following the validation practices mandated by the CA/Browser
# Forum, add "cabBRDomainValidated" to the line below.
certificatePolicies = @root_ca_polsect
# If you would like to restrict certificate issuance to a single domain
# (recommended for internal CAs) and forbid certificate issuance to IP
# addresses, uncomment the following line.
# nameConstraints = critical,permitted;domain:.example.com,forbidden:IP:0.0.0.0/0,forbidden:IP:::0/0
# Extensions for the Web server, individual validated CA certificate. This CA
# will only be able to issue client/server authentication certificates. OCSP
# responses will be signed directly.
[webserver-individualvalidated_ca_certificate_extensions]
basicConstraints = critical,CA:TRUE,pathlen:0
keyUsage = critical,keyCertSign,cRLSign,digitalSignature
extendedKeyUsage = clientAuth,serverAuth
subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid:always
authorityInfoAccess = OCSP;URI:${OCSP_RESPONDER},caIssuers;URI:${ROOT_CA_CERTIFICATE}
crlDistributionPoints = URI:${ROOT_CA_CRL}
# If you are following the validation practices mandated by the CA/Browser
# Forum, add "cabBRIndividualValidated" to the line below.
certificatePolicies = @root_ca_polsect
# If you would like to restrict certificate issuance to a single domain
# (recommended for internal CAs) and forbid certificate issuance to IP
# addresses, uncomment the following line.
# nameConstraints = critical,permitted;domain:.example.com,forbidden:IP:0.0.0.0/0,forbidden:IP:::0/0
# Extensions for the Web server, organization validated CA certificate. This CA
# will only be able to issue client/server authentication certificates. OCSP
# responses will be signed directly.
[webserver-organizationvalidated_ca_certificate_extensions]
basicConstraints = critical,CA:TRUE,pathlen:0
keyUsage = critical,keyCertSign,cRLSign,digitalSignature
extendedKeyUsage = clientAuth,serverAuth
subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid:always
authorityInfoAccess = OCSP;URI:${OCSP_RESPONDER},caIssuers;URI:${ROOT_CA_CERTIFICATE}
crlDistributionPoints = URI:${ROOT_CA_CRL}
# If you are following the validation practices mandated by the CA/Browser
# Forum, add "cabBROrganizationValidated" to the line below.
certificatePolicies = @root_ca_polsect
# If you would like to restrict certificate issuance to a single domain
# (recommended for internal CAs) and forbid certificate issuance to IP
# addresses, uncomment the following line.
# nameConstraints = critical,permitted;domain:.example.com,forbidden:IP:0.0.0.0/0,forbidden:IP:::0/0
# Extensions for the Web server, EV CA certificate. This CA will only be able
# to issue client/server authentication certificates. OCSP responses will be
# signed directly.
[webserver-extendedvalidation_ca_certificate_extensions]
basicConstraints = critical,CA:TRUE,pathlen:0
keyUsage = critical,keyCertSign,cRLSign,digitalSignature
extendedKeyUsage = clientAuth,serverAuth
subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid:always
authorityInfoAccess = OCSP;URI:${OCSP_RESPONDER},caIssuers;URI:${ROOT_CA_CERTIFICATE}
crlDistributionPoints = URI:${ROOT_CA_CRL}
certificatePolicies = @root_ca_polsect
# If you would like to restrict certificate issuance to a single domain
# (recommended for internal CAs) and forbid certificate issuance to IP
# addresses, uncomment the following line.
# nameConstraints = critical,permitted;domain:.example.com,forbidden:IP:0.0.0.0/0,forbidden:IP:::0/0
# Extensions for the code signing CA certificates. These CAs will only be able
# to issue code signing certificates. OCSP responses will be signed directly.
[codesigning_ca_certificate_extensions]
basicConstraints = critical,CA:TRUE,pathlen:0
keyUsage = critical,keyCertSign,cRLSign,digitalSignature
extendedKeyUsage = codeSigning
subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid:always
authorityInfoAccess = OCSP;URI:${OCSP_RESPONDER},caIssuers;URI:${ROOT_CA_CERTIFICATE}
crlDistributionPoints = URI:${ROOT_CA_CRL}
# If you are following the validation practices mandated by the CA/Browser
# Forum, add "cabCSGuidelines" to the line below.
certificatePolicies = @root_ca_polsect
# Extensions for the EV code signing CA certificates. These CAs will only be
# able to issue code signing certificates. OCSP responses will be signed
# directly.
[codesigning-extendedvalidation_ca_certificate_extensions]
basicConstraints = critical,CA:TRUE,pathlen:0
keyUsage = critical,keyCertSign,cRLSign,digitalSignature
extendedKeyUsage = codeSigning
subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid:always
authorityInfoAccess = OCSP;URI:${OCSP_RESPONDER},caIssuers;URI:${ROOT_CA_CERTIFICATE}
crlDistributionPoints = URI:${ROOT_CA_CRL}
certificatePolicies = @root_ca_polsect
# Extensions for the time stamping CA certificates. These CAs will only be able
# to issue time stamping certificates. OCSP responses will be signed directly.
[timestamping_ca_certificate_extensions]
basicConstraints = critical,CA:TRUE,pathlen:0
keyUsage = critical,keyCertSign,cRLSign,digitalSignature
extendedKeyUsage = timeStamping
subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid:always
authorityInfoAccess = OCSP;URI:${OCSP_RESPONDER},caIssuers;URI:${ROOT_CA_CERTIFICATE}
crlDistributionPoints = URI:${ROOT_CA_CRL}
certificatePolicies = @root_ca_polsect
# Extensions for the root CA OCSP responder certificates.
[root_ca_ocsp_responder_certificate_extensions]
basicConstraints = critical,CA:FALSE
keyUsage = critical,digitalSignature
extendedKeyUsage = ocspSigning
subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid:always
authorityInfoAccess = caIssuers;URI:${ROOT_CA_CERTIFICATE}
crlDistributionPoints = URI:${ROOT_CA_CRL}
# If you would like to disable revocation checking entirely, uncomment the
# noCheck attribute and comment crlDistributionPoints above. In that case,
# the OCSP responder certificate should have a limited maximum validity (we
# suggest a few days).
# noCheck = ignored
certificatePolicies = @root_ca_polsect
[root_ca_dn_policy]
countryName = match
organizationName = match
commonName = supplied
[root_ca_polsect]
# Replace myCPSOID with the OID associated to your CPS.
policyIdentifier = 1.2.3.4
# Replace the following URL with the one pointing to your CPS.
CPS.1 = "http://myca.example.com/repository/cps.pdf"
[root_ca_crl_extensions]
authorityInfoAccess = caIssuers;URI:${ROOT_CA_CERTIFICATE}
authorityKeyIdentifier = keyid:always