···11+#
22+# OpenSSL example configuration file.
33+# This is mostly being used for generation of certificate requests.
44+#
55+66+# This definition stops the following lines choking if HOME isn't
77+# defined.
88+HOME = .
99+RANDFILE = $ENV::HOME/.rnd
1010+1111+# Extra OBJECT IDENTIFIER info:
1212+#oid_file = $ENV::HOME/.oid
1313+oid_section = new_oids
1414+1515+# To use this configuration file with the "-extfile" option of the
1616+# "openssl x509" utility, name here the section containing the
1717+# X.509v3 extensions to use:
1818+# extensions =
1919+# (Alternatively, use a configuration file that has only
2020+# X.509v3 extensions in its main [= default] section.)
2121+2222+[ new_oids ]
2323+2424+# We can add new OIDs in here for use by 'ca', 'req' and 'ts'.
2525+# Add a simple OID like this:
2626+# testoid1=1.2.3.4
2727+# Or use config file substitution like this:
2828+# testoid2=${testoid1}.5.6
2929+3030+# Policies used by the TSA examples.
3131+tsa_policy1 = 1.2.3.4.1
3232+tsa_policy2 = 1.2.3.4.5.6
3333+tsa_policy3 = 1.2.3.4.5.7
3434+3535+####################################################################
3636+[ ca ]
3737+default_ca = CA_default # The default ca section
3838+3939+####################################################################
4040+[ CA_default ]
4141+4242+dir = ./demoCA # Where everything is kept
4343+certs = $dir/certs # Where the issued certs are kept
4444+crl_dir = $dir/crl # Where the issued crl are kept
4545+database = $dir/index.txt # database index file.
4646+#unique_subject = no # Set to 'no' to allow creation of
4747+ # several ctificates with same subject.
4848+new_certs_dir = $dir/newcerts # default place for new certs.
4949+5050+certificate = $dir/cacert.pem # The CA certificate
5151+serial = $dir/serial # The current serial number
5252+crlnumber = $dir/crlnumber # the current crl number
5353+ # must be commented out to leave a V1 CRL
5454+crl = $dir/crl.pem # The current CRL
5555+private_key = $dir/private/cakey.pem# The private key
5656+RANDFILE = $dir/private/.rand # private random number file
5757+5858+x509_extensions = usr_cert # The extentions to add to the cert
5959+6060+# Comment out the following two lines for the "traditional"
6161+# (and highly broken) format.
6262+name_opt = ca_default # Subject Name options
6363+cert_opt = ca_default # Certificate field options
6464+6565+# Extension copying option: use with caution.
6666+# copy_extensions = copy
6767+6868+# Extensions to add to a CRL. Note: Netscape communicator chokes on V2 CRLs
6969+# so this is commented out by default to leave a V1 CRL.
7070+# crlnumber must also be commented out to leave a V1 CRL.
7171+# crl_extensions = crl_ext
7272+7373+default_days = 365 # how long to certify for
7474+default_crl_days= 30 # how long before next CRL
7575+default_md = default # use public key default MD
7676+preserve = no # keep passed DN ordering
7777+7878+# A few difference way of specifying how similar the request should look
7979+# For type CA, the listed attributes must be the same, and the optional
8080+# and supplied fields are just that :-)
8181+policy = policy_match
8282+8383+# For the CA policy
8484+[ policy_match ]
8585+countryName = match
8686+stateOrProvinceName = match
8787+organizationName = match
8888+organizationalUnitName = optional
8989+commonName = supplied
9090+emailAddress = optional
9191+9292+# For the 'anything' policy
9393+# At this point in time, you must list all acceptable 'object'
9494+# types.
9595+[ policy_anything ]
9696+countryName = optional
9797+stateOrProvinceName = optional
9898+localityName = optional
9999+organizationName = optional
100100+organizationalUnitName = optional
101101+commonName = supplied
102102+emailAddress = optional
103103+104104+####################################################################
105105+[ req ]
106106+default_bits = 2048
107107+default_keyfile = privkey.pem
108108+distinguished_name = req_distinguished_name
109109+attributes = req_attributes
110110+x509_extensions = v3_ca # The extentions to add to the self signed cert
111111+112112+# Passwords for private keys if not present they will be prompted for
113113+# input_password = secret
114114+# output_password = secret
115115+116116+# This sets a mask for permitted string types. There are several options.
117117+# default: PrintableString, T61String, BMPString.
118118+# pkix : PrintableString, BMPString (PKIX recommendation before 2004)
119119+# utf8only: only UTF8Strings (PKIX recommendation after 2004).
120120+# nombstr : PrintableString, T61String (no BMPStrings or UTF8Strings).
121121+# MASK:XXXX a literal mask value.
122122+# WARNING: ancient versions of Netscape crash on BMPStrings or UTF8Strings.
123123+string_mask = utf8only
124124+125125+# req_extensions = v3_req # The extensions to add to a certificate request
126126+127127+[ req_distinguished_name ]
128128+countryName = Country Name (2 letter code)
129129+countryName_default = AU
130130+countryName_min = 2
131131+countryName_max = 2
132132+133133+stateOrProvinceName = State or Province Name (full name)
134134+stateOrProvinceName_default = Some-State
135135+136136+localityName = Locality Name (eg, city)
137137+138138+0.organizationName = Organization Name (eg, company)
139139+0.organizationName_default = Internet Widgits Pty Ltd
140140+141141+# we can do this but it is not needed normally :-)
142142+#1.organizationName = Second Organization Name (eg, company)
143143+#1.organizationName_default = World Wide Web Pty Ltd
144144+145145+organizationalUnitName = Organizational Unit Name (eg, section)
146146+#organizationalUnitName_default =
147147+148148+commonName = Common Name (e.g. server FQDN or YOUR name)
149149+commonName_max = 64
150150+151151+emailAddress = Email Address
152152+emailAddress_max = 64
153153+154154+# SET-ex3 = SET extension number 3
155155+156156+[ req_attributes ]
157157+challengePassword = A challenge password
158158+challengePassword_min = 4
159159+challengePassword_max = 20
160160+161161+unstructuredName = An optional company name
162162+163163+[ usr_cert ]
164164+165165+# These extensions are added when 'ca' signs a request.
166166+167167+# This goes against PKIX guidelines but some CAs do it and some software
168168+# requires this to avoid interpreting an end user certificate as a CA.
169169+170170+basicConstraints=CA:FALSE
171171+172172+# Here are some examples of the usage of nsCertType. If it is omitted
173173+# the certificate can be used for anything *except* object signing.
174174+175175+# This is OK for an SSL server.
176176+# nsCertType = server
177177+178178+# For an object signing certificate this would be used.
179179+# nsCertType = objsign
180180+181181+# For normal client use this is typical
182182+# nsCertType = client, email
183183+184184+# and for everything including object signing:
185185+# nsCertType = client, email, objsign
186186+187187+# This is typical in keyUsage for a client certificate.
188188+# keyUsage = nonRepudiation, digitalSignature, keyEncipherment
189189+190190+# This will be displayed in Netscape's comment listbox.
191191+nsComment = "OpenSSL Generated Certificate"
192192+193193+# PKIX recommendations harmless if included in all certificates.
194194+subjectKeyIdentifier=hash
195195+authorityKeyIdentifier=keyid,issuer
196196+197197+# This stuff is for subjectAltName and issuerAltname.
198198+# Import the email address.
199199+# subjectAltName=email:copy
200200+# An alternative to produce certificates that aren't
201201+# deprecated according to PKIX.
202202+# subjectAltName=email:move
203203+204204+# Copy subject details
205205+# issuerAltName=issuer:copy
206206+207207+#nsCaRevocationUrl = http://www.domain.dom/ca-crl.pem
208208+#nsBaseUrl
209209+#nsRevocationUrl
210210+#nsRenewalUrl
211211+#nsCaPolicyUrl
212212+#nsSslServerName
213213+214214+# This is required for TSA certificates.
215215+# extendedKeyUsage = critical,timeStamping
216216+217217+[ v3_req ]
218218+219219+# Extensions to add to a certificate request
220220+221221+basicConstraints = CA:FALSE
222222+keyUsage = nonRepudiation, digitalSignature, keyEncipherment
223223+224224+[ v3_ca ]
225225+226226+227227+# Extensions for a typical CA
228228+229229+230230+# PKIX recommendation.
231231+232232+subjectKeyIdentifier=hash
233233+234234+authorityKeyIdentifier=keyid:always,issuer
235235+236236+# This is what PKIX recommends but some broken software chokes on critical
237237+# extensions.
238238+#basicConstraints = critical,CA:true
239239+# So we do this instead.
240240+basicConstraints = CA:true
241241+242242+# Key usage: this is typical for a CA certificate. However since it will
243243+# prevent it being used as an test self-signed certificate it is best
244244+# left out by default.
245245+# keyUsage = cRLSign, keyCertSign
246246+247247+# Some might want this also
248248+# nsCertType = sslCA, emailCA
249249+250250+# Include email address in subject alt name: another PKIX recommendation
251251+# subjectAltName=email:copy
252252+# Copy issuer details
253253+# issuerAltName=issuer:copy
254254+255255+# DER hex encoding of an extension: beware experts only!
256256+# obj=DER:02:03
257257+# Where 'obj' is a standard or added object
258258+# You can even override a supported extension:
259259+# basicConstraints= critical, DER:30:03:01:01:FF
260260+261261+subjectAltName = @alt_names
262262+[alt_names]
263263+DNS.1 = *.localhost
264264+DNS.2 = *.*.localhost
265265+266266+[ crl_ext ]
267267+268268+# CRL extensions.
269269+# Only issuerAltName and authorityKeyIdentifier make any sense in a CRL.
270270+271271+# issuerAltName=issuer:copy
272272+authorityKeyIdentifier=keyid:always
273273+274274+[ proxy_cert_ext ]
275275+# These extensions should be added when creating a proxy certificate
276276+277277+# This goes against PKIX guidelines but some CAs do it and some software
278278+# requires this to avoid interpreting an end user certificate as a CA.
279279+280280+basicConstraints=CA:FALSE
281281+282282+# Here are some examples of the usage of nsCertType. If it is omitted
283283+# the certificate can be used for anything *except* object signing.
284284+285285+# This is OK for an SSL server.
286286+# nsCertType = server
287287+288288+# For an object signing certificate this would be used.
289289+# nsCertType = objsign
290290+291291+# For normal client use this is typical
292292+# nsCertType = client, email
293293+294294+# and for everything including object signing:
295295+# nsCertType = client, email, objsign
296296+297297+# This is typical in keyUsage for a client certificate.
298298+# keyUsage = nonRepudiation, digitalSignature, keyEncipherment
299299+300300+# This will be displayed in Netscape's comment listbox.
301301+nsComment = "OpenSSL Generated Certificate"
302302+303303+# PKIX recommendations harmless if included in all certificates.
304304+subjectKeyIdentifier=hash
305305+authorityKeyIdentifier=keyid,issuer
306306+307307+# This stuff is for subjectAltName and issuerAltname.
308308+# Import the email address.
309309+# subjectAltName=email:copy
310310+# An alternative to produce certificates that aren't
311311+# deprecated according to PKIX.
312312+# subjectAltName=email:move
313313+314314+# Copy subject details
315315+# issuerAltName=issuer:copy
316316+317317+#nsCaRevocationUrl = http://www.domain.dom/ca-crl.pem
318318+#nsBaseUrl
319319+#nsRevocationUrl
320320+#nsRenewalUrl
321321+#nsCaPolicyUrl
322322+#nsSslServerName
323323+324324+# This really needs to be in place for it to be a proxy certificate.
325325+proxyCertInfo=critical,language:id-ppl-anyLanguage,pathlen:3,policy:foo
326326+327327+####################################################################
328328+[ tsa ]
329329+330330+default_tsa = tsa_config1 # the default TSA section
331331+332332+[ tsa_config1 ]
333333+334334+# These are used by the TSA reply generation only.
335335+dir = ./demoCA # TSA root directory
336336+serial = $dir/tsaserial # The current serial number (mandatory)
337337+crypto_device = builtin # OpenSSL engine to use for signing
338338+signer_cert = $dir/tsacert.pem # The TSA signing certificate
339339+ # (optional)
340340+certs = $dir/cacert.pem # Certificate chain to include in reply
341341+ # (optional)
342342+signer_key = $dir/private/tsakey.pem # The TSA private key (optional)
343343+344344+default_policy = tsa_policy1 # Policy if request did not specify it
345345+ # (optional)
346346+other_policies = tsa_policy2, tsa_policy3 # acceptable policies (optional)
347347+digests = md5, sha1 # Acceptable message digests (mandatory)
348348+accuracy = secs:1, millisecs:500, microsecs:100 # (optional)
349349+clock_precision_digits = 0 # number of digits after dot. (optional)
350350+ordering = yes # Is ordering defined for timestamps?
351351+ # (optional, default: no)
352352+tsa_name = yes # Must the TSA name be included in the reply?
353353+ # (optional, default: no)
354354+ess_cert_id_chain = no # Must the ESS cert id chain be included?
355355+ # (optional, default: no)