2
# OpenSSL example configuration file.
3
# This is mostly being used for generation of certificate requests.
6
# Note that you can include other files from the main configuration
7
# file using the .include directive.
10
# This definition stops the following lines choking if HOME isn't
13
RANDFILE = $ENV::HOME/.rnd
15
# Extra OBJECT IDENTIFIER info:
16
#oid_file = $ENV::HOME/.oid
17
oid_section = new_oids
20
openssl_conf = default_conf
22
# To use this configuration file with the "-extfile" option of the
23
# "openssl x509" utility, name here the section containing the
24
# X.509v3 extensions to use:
26
# (Alternatively, use a configuration file that has only
27
# X.509v3 extensions in its main [= default] section.)
31
# We can add new OIDs in here for use by 'ca', 'req' and 'ts'.
32
# Add a simple OID like this:
34
# Or use config file substitution like this:
35
# testoid2=${testoid1}.5.6
37
# Policies used by the TSA examples.
38
tsa_policy1 = 1.2.3.4.1
39
tsa_policy2 = 1.2.3.4.5.6
40
tsa_policy3 = 1.2.3.4.5.7
42
####################################################################
44
default_ca = CA_default # The default ca section
46
####################################################################
49
dir = ./demoCA # Where everything is kept
50
certs = $dir/certs # Where the issued certs are kept
51
crl_dir = $dir/crl # Where the issued crl are kept
52
database = $dir/index.txt # database index file.
53
#unique_subject = no # Set to 'no' to allow creation of
54
# several certs with same subject.
55
new_certs_dir = $dir/newcerts # default place for new certs.
57
certificate = $dir/cacert.pem # The CA certificate
58
serial = $dir/serial # The current serial number
59
crlnumber = $dir/crlnumber # the current crl number
60
# must be commented out to leave a V1 CRL
61
crl = $dir/crl.pem # The current CRL
62
private_key = $dir/private/cakey.pem# The private key
63
RANDFILE = $dir/private/.rand # private random number file
65
x509_extensions = usr_cert # The extensions to add to the cert
67
# Comment out the following two lines for the "traditional"
68
# (and highly broken) format.
69
name_opt = ca_default # Subject Name options
70
cert_opt = ca_default # Certificate field options
72
# Extension copying option: use with caution.
73
# copy_extensions = copy
75
# Extensions to add to a CRL. Note: Netscape communicator chokes on V2 CRLs
76
# so this is commented out by default to leave a V1 CRL.
77
# crlnumber must also be commented out to leave a V1 CRL.
78
# crl_extensions = crl_ext
80
default_days = 365 # how long to certify for
81
default_crl_days= 30 # how long before next CRL
82
default_md = default # use public key default MD
83
preserve = no # keep passed DN ordering
85
# A few difference way of specifying how similar the request should look
86
# For type CA, the listed attributes must be the same, and the optional
87
# and supplied fields are just that :-)
93
stateOrProvinceName = match
94
organizationName = match
95
organizationalUnitName = optional
97
emailAddress = optional
99
# For the 'anything' policy
100
# At this point in time, you must list all acceptable 'object'
103
countryName = optional
104
stateOrProvinceName = optional
105
localityName = optional
106
organizationName = optional
107
organizationalUnitName = optional
108
commonName = supplied
109
emailAddress = optional
111
####################################################################
114
default_keyfile = privkey.pem
115
distinguished_name = req_distinguished_name
116
attributes = req_attributes
117
x509_extensions = v3_ca # The extensions to add to the self signed cert
119
# Passwords for private keys if not present they will be prompted for
120
# input_password = secret
121
# output_password = secret
123
# This sets a mask for permitted string types. There are several options.
124
# default: PrintableString, T61String, BMPString.
125
# pkix : PrintableString, BMPString (PKIX recommendation before 2004)
126
# utf8only: only UTF8Strings (PKIX recommendation after 2004).
127
# nombstr : PrintableString, T61String (no BMPStrings or UTF8Strings).
128
# MASK:XXXX a literal mask value.
129
# WARNING: ancient versions of Netscape crash on BMPStrings or UTF8Strings.
130
string_mask = utf8only
132
# req_extensions = v3_req # The extensions to add to a certificate request
134
[ req_distinguished_name ]
135
countryName = Country Name (2 letter code)
136
countryName_default = AU
140
stateOrProvinceName = State or Province Name (full name)
141
stateOrProvinceName_default = Some-State
143
localityName = Locality Name (eg, city)
145
0.organizationName = Organization Name (eg, company)
146
0.organizationName_default = Internet Widgits Pty Ltd
148
# we can do this but it is not needed normally :-)
149
#1.organizationName = Second Organization Name (eg, company)
150
#1.organizationName_default = World Wide Web Pty Ltd
152
organizationalUnitName = Organizational Unit Name (eg, section)
153
#organizationalUnitName_default =
155
commonName = Common Name (e.g. server FQDN or YOUR name)
158
emailAddress = Email Address
159
emailAddress_max = 64
161
# SET-ex3 = SET extension number 3
164
challengePassword = A challenge password
165
challengePassword_min = 4
166
challengePassword_max = 20
168
unstructuredName = An optional company name
172
# These extensions are added when 'ca' signs a request.
174
# This goes against PKIX guidelines but some CAs do it and some software
175
# requires this to avoid interpreting an end user certificate as a CA.
177
basicConstraints=CA:FALSE
179
# Here are some examples of the usage of nsCertType. If it is omitted
180
# the certificate can be used for anything *except* object signing.
182
# This is OK for an SSL server.
183
# nsCertType = server
185
# For an object signing certificate this would be used.
186
# nsCertType = objsign
188
# For normal client use this is typical
189
# nsCertType = client, email
191
# and for everything including object signing:
192
# nsCertType = client, email, objsign
194
# This is typical in keyUsage for a client certificate.
195
# keyUsage = nonRepudiation, digitalSignature, keyEncipherment
197
# This will be displayed in Netscape's comment listbox.
198
nsComment = "OpenSSL Generated Certificate"
200
# PKIX recommendations harmless if included in all certificates.
201
subjectKeyIdentifier=hash
202
authorityKeyIdentifier=keyid,issuer
204
# This stuff is for subjectAltName and issuerAltname.
205
# Import the email address.
206
# subjectAltName=email:copy
207
# An alternative to produce certificates that aren't
208
# deprecated according to PKIX.
209
# subjectAltName=email:move
211
# Copy subject details
212
# issuerAltName=issuer:copy
214
#nsCaRevocationUrl = http://www.domain.dom/ca-crl.pem
221
# This is required for TSA certificates.
222
# extendedKeyUsage = critical,timeStamping
225
subjectAltName = IP:127.0.0.1
227
# Extensions to add to a certificate request
229
basicConstraints = CA:FALSE
230
keyUsage = nonRepudiation, digitalSignature, keyEncipherment
233
subjectAltName = IP:127.0.0.1
235
# Extensions for a typical CA
238
# PKIX recommendation.
240
subjectKeyIdentifier=hash
242
authorityKeyIdentifier=keyid:always,issuer
244
basicConstraints = critical,CA:true
246
# Key usage: this is typical for a CA certificate. However since it will
247
# prevent it being used as an test self-signed certificate it is best
248
# left out by default.
249
# keyUsage = cRLSign, keyCertSign
251
# Some might want this also
252
# nsCertType = sslCA, emailCA
254
# Include email address in subject alt name: another PKIX recommendation
255
# subjectAltName=email:copy
256
# Copy issuer details
257
# issuerAltName=issuer:copy
259
# DER hex encoding of an extension: beware experts only!
261
# Where 'obj' is a standard or added object
262
# You can even override a supported extension:
263
# basicConstraints= critical, DER:30:03:01:01:FF
268
# Only issuerAltName and authorityKeyIdentifier make any sense in a CRL.
270
# issuerAltName=issuer:copy
271
authorityKeyIdentifier=keyid:always
274
# These extensions should be added when creating a proxy certificate
276
# This goes against PKIX guidelines but some CAs do it and some software
277
# requires this to avoid interpreting an end user certificate as a CA.
279
basicConstraints=CA:FALSE
281
# Here are some examples of the usage of nsCertType. If it is omitted
282
# the certificate can be used for anything *except* object signing.
284
# This is OK for an SSL server.
285
# nsCertType = server
287
# For an object signing certificate this would be used.
288
# nsCertType = objsign
290
# For normal client use this is typical
291
# nsCertType = client, email
293
# and for everything including object signing:
294
# nsCertType = client, email, objsign
296
# This is typical in keyUsage for a client certificate.
297
# keyUsage = nonRepudiation, digitalSignature, keyEncipherment
299
# This will be displayed in Netscape's comment listbox.
300
nsComment = "OpenSSL Generated Certificate"
302
# PKIX recommendations harmless if included in all certificates.
303
subjectKeyIdentifier=hash
304
authorityKeyIdentifier=keyid,issuer
306
# This stuff is for subjectAltName and issuerAltname.
307
# Import the email address.
308
# subjectAltName=email:copy
309
# An alternative to produce certificates that aren't
310
# deprecated according to PKIX.
311
# subjectAltName=email:move
313
# Copy subject details
314
# issuerAltName=issuer:copy
316
#nsCaRevocationUrl = http://www.domain.dom/ca-crl.pem
323
# This really needs to be in place for it to be a proxy certificate.
324
proxyCertInfo=critical,language:id-ppl-anyLanguage,pathlen:3,policy:foo
326
####################################################################
329
default_tsa = tsa_config1 # the default TSA section
333
# These are used by the TSA reply generation only.
334
dir = ./demoCA # TSA root directory
335
serial = $dir/tsaserial # The current serial number (mandatory)
336
crypto_device = builtin # OpenSSL engine to use for signing
337
signer_cert = $dir/tsacert.pem # The TSA signing certificate
339
certs = $dir/cacert.pem # Certificate chain to include in reply
341
signer_key = $dir/private/tsakey.pem # The TSA private key (optional)
342
signer_digest = sha256 # Signing digest to use. (Optional)
343
default_policy = tsa_policy1 # Policy if request did not specify it
345
other_policies = tsa_policy2, tsa_policy3 # acceptable policies (optional)
346
digests = sha1, sha256, sha384, sha512 # Acceptable message digests (mandatory)
347
accuracy = secs:1, millisecs:500, microsecs:100 # (optional)
348
clock_precision_digits = 0 # number of digits after dot. (optional)
349
ordering = yes # Is ordering defined for timestamps?
350
# (optional, default: no)
351
tsa_name = yes # Must the TSA name be included in the reply?
352
# (optional, default: no)
353
ess_cert_id_chain = no # Must the ESS cert id chain be included?
354
# (optional, default: no)
355
ess_cert_id_alg = sha1 # algorithm to compute certificate
356
# identifier (optional, default: sha1)
361
system_default = system_default_sect
363
[system_default_sect]
364
MinProtocol = TLSv1.2
365
CipherString = DEFAULT@SECLEVEL=2