blob: ffaeb924305e5505d46ec8891130f2014b5d10e5 [file] [log] [blame]
David Benjamin33b56922022-12-31 17:16:53 -05001# [ usr_cert ]
2
3# These extensions are added when 'ca' signs a request.
4
5# This goes against PKIX guidelines but some CAs do it and some software
6# requires this to avoid interpreting an end user certificate as a CA.
7
8basicConstraints=CA:FALSE
9
10# Here are some examples of the usage of nsCertType. If it is omitted
11# the certificate can be used for anything *except* object signing.
12
13# This is OK for an SSL server.
14# nsCertType = server
15
16# For an object signing certificate this would be used.
17# nsCertType = objsign
18
19# For normal client use this is typical
20# nsCertType = client, email
21
22# and for everything including object signing:
23# nsCertType = client, email, objsign
24
25# This is typical in keyUsage for a client certificate.
26# keyUsage = nonRepudiation, digitalSignature, keyEncipherment
27
28# This will be displayed in Netscape's comment listbox.
29nsComment = "OpenSSL Generated Certificate"
30
31# PKIX recommendations harmless if included in all certificates.
32subjectKeyIdentifier=hash
33authorityKeyIdentifier=keyid,issuer
34
35# This stuff is for subjectAltName and issuerAltname.
36# Import the email address.
37# subjectAltName=email:copy
38# An alternative to produce certificates that aren't
39# deprecated according to PKIX.
40# subjectAltName=email:move
41
42# Copy subject details
43# issuerAltName=issuer:copy
44
45#nsCaRevocationUrl = http://www.domain.dom/ca-crl.pem
46#nsBaseUrl
47#nsRevocationUrl
48#nsRenewalUrl
49#nsCaPolicyUrl
50#nsSslServerName
51
52# This is required for TSA certificates.
53# extendedKeyUsage = critical,timeStamping
54
55#
56# OpenSSL example configuration file.
57# This is mostly being used for generation of certificate requests.
58#
59
60# Note that you can include other files from the main configuration
61# file using the .include directive.
62#.include filename
63
64# This definition stops the following lines choking if HOME isn't
65# defined.
66HOME = .
67
68# Extra OBJECT IDENTIFIER info:
69#oid_file = $ENV::HOME/.oid
70oid_section = new_oids
71
72# To use this configuration file with the "-extfile" option of the
73# "openssl x509" utility, name here the section containing the
74# X.509v3 extensions to use:
75# extensions =
76# (Alternatively, use a configuration file that has only
77# X.509v3 extensions in its main [= default] section.)
78
79[ new_oids ]
80
81# We can add new OIDs in here for use by 'ca', 'req' and 'ts'.
82# Add a simple OID like this:
83# testoid1=1.2.3.4
84# Or use config file substitution like this:
85# testoid2=${testoid1}.5.6
86
87# Policies used by the TSA examples.
88tsa_policy1 = 1.2.3.4.1
89tsa_policy2 = 1.2.3.4.5.6
90tsa_policy3 = 1.2.3.4.5.7
91
92####################################################################
93[ ca ]
94default_ca = CA_default # The default ca section
95
96####################################################################
97[ CA_default ]
98
99dir = ./demoCA # Where everything is kept
100certs = $dir/certs # Where the issued certs are kept
101crl_dir = $dir/crl # Where the issued crl are kept
102database = $dir/index.txt # database index file.
103#unique_subject = no # Set to 'no' to allow creation of
104 # several certs with same subject.
105new_certs_dir = $dir/newcerts # default place for new certs.
106
107certificate = $dir/cacert.pem # The CA certificate
108serial = $dir/serial # The current serial number
109crlnumber = $dir/crlnumber # the current crl number
110 # must be commented out to leave a V1 CRL
111crl = $dir/crl.pem # The current CRL
112private_key = $dir/private/cakey.pem# The private key
113
114x509_extensions = usr_cert # The extensions to add to the cert
115
116# Comment out the following two lines for the "traditional"
117# (and highly broken) format.
118name_opt = ca_default # Subject Name options
119cert_opt = ca_default # Certificate field options
120
121# Extension copying option: use with caution.
122# copy_extensions = copy
123
124# Extensions to add to a CRL. Note: Netscape communicator chokes on V2 CRLs
125# so this is commented out by default to leave a V1 CRL.
126# crlnumber must also be commented out to leave a V1 CRL.
127# crl_extensions = crl_ext
128
129default_days = 365 # how long to certify for
130default_crl_days= 30 # how long before next CRL
131default_md = default # use public key default MD
132preserve = no # keep passed DN ordering
133
134# A few difference way of specifying how similar the request should look
135# For type CA, the listed attributes must be the same, and the optional
136# and supplied fields are just that :-)
137policy = policy_match
138
139# For the CA policy
140[ policy_match ]
141countryName = match
142stateOrProvinceName = match
143organizationName = match
144organizationalUnitName = optional
145commonName = supplied
146emailAddress = optional
147
148# For the 'anything' policy
149# At this point in time, you must list all acceptable 'object'
150# types.
151[ policy_anything ]
152countryName = optional
153stateOrProvinceName = optional
154localityName = optional
155organizationName = optional
156organizationalUnitName = optional
157commonName = supplied
158emailAddress = optional
159
160####################################################################
161[ req ]
162default_bits = 2048
163default_keyfile = privkey.pem
164distinguished_name = req_distinguished_name
165attributes = req_attributes
166x509_extensions = v3_ca # The extensions to add to the self signed cert
167
168# Passwords for private keys if not present they will be prompted for
169# input_password = secret
170# output_password = secret
171
172# This sets a mask for permitted string types. There are several options.
173# default: PrintableString, T61String, BMPString.
174# pkix : PrintableString, BMPString (PKIX recommendation before 2004)
175# utf8only: only UTF8Strings (PKIX recommendation after 2004).
176# nombstr : PrintableString, T61String (no BMPStrings or UTF8Strings).
177# MASK:XXXX a literal mask value.
178# WARNING: ancient versions of Netscape crash on BMPStrings or UTF8Strings.
179string_mask = utf8only
180
181# req_extensions = v3_req # The extensions to add to a certificate request
182
183[ req_distinguished_name ]
184countryName = Country Name (2 letter code)
185countryName_default = AU
186countryName_min = 2
187countryName_max = 2
188
189stateOrProvinceName = State or Province Name (full name)
190stateOrProvinceName_default = Some-State
191
192localityName = Locality Name (eg, city)
193
1940.organizationName = Organization Name (eg, company)
1950.organizationName_default = Internet Widgits Pty Ltd
196
197# we can do this but it is not needed normally :-)
198#1.organizationName = Second Organization Name (eg, company)
199#1.organizationName_default = World Wide Web Pty Ltd
200
201organizationalUnitName = Organizational Unit Name (eg, section)
202#organizationalUnitName_default =
203
204commonName = Common Name (e.g. server FQDN or YOUR name)
205commonName_max = 64
206
207emailAddress = Email Address
208emailAddress_max = 64
209
210# SET-ex3 = SET extension number 3
211
212[ req_attributes ]
213challengePassword = A challenge password
214challengePassword_min = 4
215challengePassword_max = 20
216
217unstructuredName = An optional company name
218
219[ usr_cert ]
220
221# These extensions are added when 'ca' signs a request.
222
223# This goes against PKIX guidelines but some CAs do it and some software
224# requires this to avoid interpreting an end user certificate as a CA.
225
226basicConstraints=CA:FALSE
227
228# Here are some examples of the usage of nsCertType. If it is omitted
229# the certificate can be used for anything *except* object signing.
230
231# This is OK for an SSL server.
232# nsCertType = server
233
234# For an object signing certificate this would be used.
235# nsCertType = objsign
236
237# For normal client use this is typical
238# nsCertType = client, email
239
240# and for everything including object signing:
241# nsCertType = client, email, objsign
242
243# This is typical in keyUsage for a client certificate.
244# keyUsage = nonRepudiation, digitalSignature, keyEncipherment
245
246# This will be displayed in Netscape's comment listbox.
247nsComment = "OpenSSL Generated Certificate"
248
249# PKIX recommendations harmless if included in all certificates.
250subjectKeyIdentifier=hash
251authorityKeyIdentifier=keyid,issuer
252
253# This stuff is for subjectAltName and issuerAltname.
254# Import the email address.
255# subjectAltName=email:copy
256# An alternative to produce certificates that aren't
257# deprecated according to PKIX.
258# subjectAltName=email:move
259
260# Copy subject details
261# issuerAltName=issuer:copy
262
263#nsCaRevocationUrl = http://www.domain.dom/ca-crl.pem
264#nsBaseUrl
265#nsRevocationUrl
266#nsRenewalUrl
267#nsCaPolicyUrl
268#nsSslServerName
269
270# This is required for TSA certificates.
271# extendedKeyUsage = critical,timeStamping
272
273[ v3_req ]
274
275# Extensions to add to a certificate request
276
277basicConstraints = CA:FALSE
278keyUsage = nonRepudiation, digitalSignature, keyEncipherment
279
280[ v3_ca ]
281
282
283# Extensions for a typical CA
284
285
286# PKIX recommendation.
287
288subjectKeyIdentifier=hash
289
290authorityKeyIdentifier=keyid:always,issuer
291
292basicConstraints = critical,CA:true
293
294# Key usage: this is typical for a CA certificate. However since it will
295# prevent it being used as an test self-signed certificate it is best
296# left out by default.
297# keyUsage = cRLSign, keyCertSign
298
299# Some might want this also
300# nsCertType = sslCA, emailCA
301
302# Include email address in subject alt name: another PKIX recommendation
303# subjectAltName=email:copy
304# Copy issuer details
305# issuerAltName=issuer:copy
306
307# DER hex encoding of an extension: beware experts only!
308# obj=DER:02:03
309# Where 'obj' is a standard or added object
310# You can even override a supported extension:
311# basicConstraints= critical, DER:30:03:01:01:FF
312
313[ crl_ext ]
314
315# CRL extensions.
316# Only issuerAltName and authorityKeyIdentifier make any sense in a CRL.
317
318# issuerAltName=issuer:copy
319authorityKeyIdentifier=keyid:always
320
321[ proxy_cert_ext ]
322# These extensions should be added when creating a proxy certificate
323
324# This goes against PKIX guidelines but some CAs do it and some software
325# requires this to avoid interpreting an end user certificate as a CA.
326
327basicConstraints=CA:FALSE
328
329# Here are some examples of the usage of nsCertType. If it is omitted
330# the certificate can be used for anything *except* object signing.
331
332# This is OK for an SSL server.
333# nsCertType = server
334
335# For an object signing certificate this would be used.
336# nsCertType = objsign
337
338# For normal client use this is typical
339# nsCertType = client, email
340
341# and for everything including object signing:
342# nsCertType = client, email, objsign
343
344# This is typical in keyUsage for a client certificate.
345# keyUsage = nonRepudiation, digitalSignature, keyEncipherment
346
347# This will be displayed in Netscape's comment listbox.
348nsComment = "OpenSSL Generated Certificate"
349
350# PKIX recommendations harmless if included in all certificates.
351subjectKeyIdentifier=hash
352authorityKeyIdentifier=keyid,issuer
353
354# This stuff is for subjectAltName and issuerAltname.
355# Import the email address.
356# subjectAltName=email:copy
357# An alternative to produce certificates that aren't
358# deprecated according to PKIX.
359# subjectAltName=email:move
360
361# Copy subject details
362# issuerAltName=issuer:copy
363
364#nsCaRevocationUrl = http://www.domain.dom/ca-crl.pem
365#nsBaseUrl
366#nsRevocationUrl
367#nsRenewalUrl
368#nsCaPolicyUrl
369#nsSslServerName
370
371# This really needs to be in place for it to be a proxy certificate.
372proxyCertInfo=critical,language:id-ppl-anyLanguage,pathlen:3,policy:foo
373
374####################################################################
375[ tsa ]
376
377default_tsa = tsa_config1 # the default TSA section
378
379[ tsa_config1 ]
380
381# These are used by the TSA reply generation only.
382dir = ./demoCA # TSA root directory
383serial = $dir/tsaserial # The current serial number (mandatory)
384crypto_device = builtin # OpenSSL engine to use for signing
385signer_cert = $dir/tsacert.pem # The TSA signing certificate
386 # (optional)
387certs = $dir/cacert.pem # Certificate chain to include in reply
388 # (optional)
389signer_key = $dir/private/tsakey.pem # The TSA private key (optional)
390signer_digest = sha256 # Signing digest to use. (Optional)
391default_policy = tsa_policy1 # Policy if request did not specify it
392 # (optional)
393other_policies = tsa_policy2, tsa_policy3 # acceptable policies (optional)
394digests = sha1, sha256, sha384, sha512 # Acceptable message digests (mandatory)
395accuracy = secs:1, millisecs:500, microsecs:100 # (optional)
396clock_precision_digits = 0 # number of digits after dot. (optional)
397ordering = yes # Is ordering defined for timestamps?
398 # (optional, default: no)
399tsa_name = yes # Must the TSA name be included in the reply?
400 # (optional, default: no)
401ess_cert_id_chain = no # Must the ESS cert id chain be included?
402 # (optional, default: no)
403ess_cert_id_alg = sha1 # algorithm to compute certificate
404 # identifier (optional, default: sha1)