/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/tests/ssl_certs/openssl-server.cnf

  • Committer: Jelmer Vernooij
  • Date: 2018-11-23 01:35:56 UTC
  • mto: (7211.10.3 git-empty-dirs)
  • mto: This revision was merged to the branch mainline in revision 7215.
  • Revision ID: jelmer@jelmer.uk-20181123013556-mu7ct9ovl7fozjc2
Update comment about ssl.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# OpenSSL example configuration file.
 
3
# This is mostly being used for generation of certificate requests.
 
4
#
 
5
 
 
6
# Note that you can include other files from the main configuration
 
7
# file using the .include directive.
 
8
#.include filename
 
9
 
 
10
# This definition stops the following lines choking if HOME isn't
 
11
# defined.
 
12
HOME                    = .
 
13
RANDFILE                = $ENV::HOME/.rnd
 
14
 
 
15
# Extra OBJECT IDENTIFIER info:
 
16
#oid_file               = $ENV::HOME/.oid
 
17
oid_section             = new_oids
 
18
 
 
19
# System default
 
20
openssl_conf = default_conf
 
21
 
 
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:
 
25
# extensions            = 
 
26
# (Alternatively, use a configuration file that has only
 
27
# X.509v3 extensions in its main [= default] section.)
 
28
 
 
29
[ new_oids ]
 
30
 
 
31
# We can add new OIDs in here for use by 'ca', 'req' and 'ts'.
 
32
# Add a simple OID like this:
 
33
# testoid1=1.2.3.4
 
34
# Or use config file substitution like this:
 
35
# testoid2=${testoid1}.5.6
 
36
 
 
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
 
41
 
 
42
####################################################################
 
43
[ ca ]
 
44
default_ca      = CA_default            # The default ca section
 
45
 
 
46
####################################################################
 
47
[ CA_default ]
 
48
 
 
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.
 
56
 
 
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
 
64
 
 
65
x509_extensions = usr_cert              # The extensions to add to the cert
 
66
 
 
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
 
71
 
 
72
# Extension copying option: use with caution.
 
73
# copy_extensions = copy
 
74
 
 
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
 
79
 
 
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
 
84
 
 
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 :-)
 
88
policy          = policy_match
 
89
 
 
90
# For the CA policy
 
91
[ policy_match ]
 
92
countryName             = match
 
93
stateOrProvinceName     = match
 
94
organizationName        = match
 
95
organizationalUnitName  = optional
 
96
commonName              = supplied
 
97
emailAddress            = optional
 
98
 
 
99
# For the 'anything' policy
 
100
# At this point in time, you must list all acceptable 'object'
 
101
# types.
 
102
[ policy_anything ]
 
103
countryName             = optional
 
104
stateOrProvinceName     = optional
 
105
localityName            = optional
 
106
organizationName        = optional
 
107
organizationalUnitName  = optional
 
108
commonName              = supplied
 
109
emailAddress            = optional
 
110
 
 
111
####################################################################
 
112
[ req ]
 
113
default_bits            = 2048
 
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
 
118
 
 
119
# Passwords for private keys if not present they will be prompted for
 
120
# input_password = secret
 
121
# output_password = secret
 
122
 
 
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
 
131
 
 
132
# req_extensions = v3_req # The extensions to add to a certificate request
 
133
 
 
134
[ req_distinguished_name ]
 
135
countryName                     = Country Name (2 letter code)
 
136
countryName_default             = AU
 
137
countryName_min                 = 2
 
138
countryName_max                 = 2
 
139
 
 
140
stateOrProvinceName             = State or Province Name (full name)
 
141
stateOrProvinceName_default     = Some-State
 
142
 
 
143
localityName                    = Locality Name (eg, city)
 
144
 
 
145
0.organizationName              = Organization Name (eg, company)
 
146
0.organizationName_default      = Internet Widgits Pty Ltd
 
147
 
 
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
 
151
 
 
152
organizationalUnitName          = Organizational Unit Name (eg, section)
 
153
#organizationalUnitName_default =
 
154
 
 
155
commonName                      = Common Name (e.g. server FQDN or YOUR name)
 
156
commonName_max                  = 64
 
157
 
 
158
emailAddress                    = Email Address
 
159
emailAddress_max                = 64
 
160
 
 
161
# SET-ex3                       = SET extension number 3
 
162
 
 
163
[ req_attributes ]
 
164
challengePassword               = A challenge password
 
165
challengePassword_min           = 4
 
166
challengePassword_max           = 20
 
167
 
 
168
unstructuredName                = An optional company name
 
169
 
 
170
[ usr_cert ]
 
171
 
 
172
# These extensions are added when 'ca' signs a request.
 
173
 
 
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.
 
176
 
 
177
basicConstraints=CA:FALSE
 
178
 
 
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.
 
181
 
 
182
# This is OK for an SSL server.
 
183
# nsCertType                    = server
 
184
 
 
185
# For an object signing certificate this would be used.
 
186
# nsCertType = objsign
 
187
 
 
188
# For normal client use this is typical
 
189
# nsCertType = client, email
 
190
 
 
191
# and for everything including object signing:
 
192
# nsCertType = client, email, objsign
 
193
 
 
194
# This is typical in keyUsage for a client certificate.
 
195
# keyUsage = nonRepudiation, digitalSignature, keyEncipherment
 
196
 
 
197
# This will be displayed in Netscape's comment listbox.
 
198
nsComment                       = "OpenSSL Generated Certificate"
 
199
 
 
200
# PKIX recommendations harmless if included in all certificates.
 
201
subjectKeyIdentifier=hash
 
202
authorityKeyIdentifier=keyid,issuer
 
203
 
 
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
 
210
 
 
211
# Copy subject details
 
212
# issuerAltName=issuer:copy
 
213
 
 
214
#nsCaRevocationUrl              = http://www.domain.dom/ca-crl.pem
 
215
#nsBaseUrl
 
216
#nsRevocationUrl
 
217
#nsRenewalUrl
 
218
#nsCaPolicyUrl
 
219
#nsSslServerName
 
220
 
 
221
# This is required for TSA certificates.
 
222
# extendedKeyUsage = critical,timeStamping
 
223
 
 
224
[ v3_req ]
 
225
subjectAltName = IP:127.0.0.1
 
226
 
 
227
# Extensions to add to a certificate request
 
228
 
 
229
basicConstraints = CA:FALSE
 
230
keyUsage = nonRepudiation, digitalSignature, keyEncipherment
 
231
 
 
232
[ v3_ca ]
 
233
subjectAltName = IP:127.0.0.1
 
234
 
 
235
# Extensions for a typical CA
 
236
 
 
237
 
 
238
# PKIX recommendation.
 
239
 
 
240
subjectKeyIdentifier=hash
 
241
 
 
242
authorityKeyIdentifier=keyid:always,issuer
 
243
 
 
244
basicConstraints = critical,CA:true
 
245
 
 
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
 
250
 
 
251
# Some might want this also
 
252
# nsCertType = sslCA, emailCA
 
253
 
 
254
# Include email address in subject alt name: another PKIX recommendation
 
255
# subjectAltName=email:copy
 
256
# Copy issuer details
 
257
# issuerAltName=issuer:copy
 
258
 
 
259
# DER hex encoding of an extension: beware experts only!
 
260
# obj=DER:02:03
 
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
 
264
 
 
265
[ crl_ext ]
 
266
 
 
267
# CRL extensions.
 
268
# Only issuerAltName and authorityKeyIdentifier make any sense in a CRL.
 
269
 
 
270
# issuerAltName=issuer:copy
 
271
authorityKeyIdentifier=keyid:always
 
272
 
 
273
[ proxy_cert_ext ]
 
274
# These extensions should be added when creating a proxy certificate
 
275
 
 
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.
 
278
 
 
279
basicConstraints=CA:FALSE
 
280
 
 
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.
 
283
 
 
284
# This is OK for an SSL server.
 
285
# nsCertType                    = server
 
286
 
 
287
# For an object signing certificate this would be used.
 
288
# nsCertType = objsign
 
289
 
 
290
# For normal client use this is typical
 
291
# nsCertType = client, email
 
292
 
 
293
# and for everything including object signing:
 
294
# nsCertType = client, email, objsign
 
295
 
 
296
# This is typical in keyUsage for a client certificate.
 
297
# keyUsage = nonRepudiation, digitalSignature, keyEncipherment
 
298
 
 
299
# This will be displayed in Netscape's comment listbox.
 
300
nsComment                       = "OpenSSL Generated Certificate"
 
301
 
 
302
# PKIX recommendations harmless if included in all certificates.
 
303
subjectKeyIdentifier=hash
 
304
authorityKeyIdentifier=keyid,issuer
 
305
 
 
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
 
312
 
 
313
# Copy subject details
 
314
# issuerAltName=issuer:copy
 
315
 
 
316
#nsCaRevocationUrl              = http://www.domain.dom/ca-crl.pem
 
317
#nsBaseUrl
 
318
#nsRevocationUrl
 
319
#nsRenewalUrl
 
320
#nsCaPolicyUrl
 
321
#nsSslServerName
 
322
 
 
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
 
325
 
 
326
####################################################################
 
327
[ tsa ]
 
328
 
 
329
default_tsa = tsa_config1       # the default TSA section
 
330
 
 
331
[ tsa_config1 ]
 
332
 
 
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
 
338
                                        # (optional)
 
339
certs           = $dir/cacert.pem       # Certificate chain to include in reply
 
340
                                        # (optional)
 
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
 
344
                                        # (optional)
 
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)
 
357
[default_conf]
 
358
ssl_conf = ssl_sect
 
359
 
 
360
[ssl_sect]
 
361
system_default = system_default_sect
 
362
 
 
363
[system_default_sect]
 
364
MinProtocol = TLSv1.2
 
365
CipherString = DEFAULT@SECLEVEL=2