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