sl@0
|
1 |
#
|
sl@0
|
2 |
# OpenSSL example configuration file.
|
sl@0
|
3 |
# This is mostly being used for generation of certificate requests.
|
sl@0
|
4 |
#
|
sl@0
|
5 |
|
sl@0
|
6 |
# This definition stops the following lines choking if HOME isn't
|
sl@0
|
7 |
# defined.
|
sl@0
|
8 |
HOME = .
|
sl@0
|
9 |
RANDFILE = $ENV::HOME/.rnd
|
sl@0
|
10 |
|
sl@0
|
11 |
# Extra OBJECT IDENTIFIER info:
|
sl@0
|
12 |
#oid_file = $ENV::HOME/.oid
|
sl@0
|
13 |
oid_section = new_oids
|
sl@0
|
14 |
|
sl@0
|
15 |
# To use this configuration file with the "-extfile" option of the
|
sl@0
|
16 |
# "openssl x509" utility, name here the section containing the
|
sl@0
|
17 |
# X.509v3 extensions to use:
|
sl@0
|
18 |
# extensions =
|
sl@0
|
19 |
# (Alternatively, use a configuration file that has only
|
sl@0
|
20 |
# X.509v3 extensions in its main [= default] section.)
|
sl@0
|
21 |
|
sl@0
|
22 |
[ new_oids ]
|
sl@0
|
23 |
|
sl@0
|
24 |
# We can add new OIDs in here for use by 'ca' and 'req'.
|
sl@0
|
25 |
# Add a simple OID like this:
|
sl@0
|
26 |
# testoid1=1.2.3.4
|
sl@0
|
27 |
# Or use config file substitution like this:
|
sl@0
|
28 |
# testoid2=${testoid1}.5.6
|
sl@0
|
29 |
|
sl@0
|
30 |
####################################################################
|
sl@0
|
31 |
[ ca ]
|
sl@0
|
32 |
default_ca = CA_default # The default ca section
|
sl@0
|
33 |
|
sl@0
|
34 |
####################################################################
|
sl@0
|
35 |
[ CA_default ]
|
sl@0
|
36 |
|
sl@0
|
37 |
dir = ./demoCA # Where everything is kept
|
sl@0
|
38 |
certs = $dir/certs # Where the issued certs are kept
|
sl@0
|
39 |
crl_dir = $dir/crl # Where the issued crl are kept
|
sl@0
|
40 |
database = $dir/index.txt # database index file.
|
sl@0
|
41 |
#unique_subject = no # Set to 'no' to allow creation of
|
sl@0
|
42 |
# several ctificates with same subject.
|
sl@0
|
43 |
new_certs_dir = $dir/newcerts # default place for new certs.
|
sl@0
|
44 |
|
sl@0
|
45 |
certificate = $dir/cacert.pem # The CA certificate
|
sl@0
|
46 |
serial = $dir/serial # The current serial number
|
sl@0
|
47 |
crlnumber = $dir/crlnumber # the current crl number
|
sl@0
|
48 |
# must be commented out to leave a V1 CRL
|
sl@0
|
49 |
crl = $dir/crl.pem # The current CRL
|
sl@0
|
50 |
private_key = $dir/private/cakey.pem# The private key
|
sl@0
|
51 |
RANDFILE = $dir/private/.rand # private random number file
|
sl@0
|
52 |
|
sl@0
|
53 |
x509_extensions = usr_cert # The extentions to add to the cert
|
sl@0
|
54 |
|
sl@0
|
55 |
# Comment out the following two lines for the "traditional"
|
sl@0
|
56 |
# (and highly broken) format.
|
sl@0
|
57 |
name_opt = ca_default # Subject Name options
|
sl@0
|
58 |
cert_opt = ca_default # Certificate field options
|
sl@0
|
59 |
|
sl@0
|
60 |
# Extension copying option: use with caution.
|
sl@0
|
61 |
# copy_extensions = copy
|
sl@0
|
62 |
|
sl@0
|
63 |
# Extensions to add to a CRL. Note: Netscape communicator chokes on V2 CRLs
|
sl@0
|
64 |
# so this is commented out by default to leave a V1 CRL.
|
sl@0
|
65 |
# crlnumber must also be commented out to leave a V1 CRL.
|
sl@0
|
66 |
# crl_extensions = crl_ext
|
sl@0
|
67 |
|
sl@0
|
68 |
default_days = 365 # how long to certify for
|
sl@0
|
69 |
default_crl_days= 30 # how long before next CRL
|
sl@0
|
70 |
default_md = sha1 # which md to use.
|
sl@0
|
71 |
preserve = no # keep passed DN ordering
|
sl@0
|
72 |
|
sl@0
|
73 |
# A few difference way of specifying how similar the request should look
|
sl@0
|
74 |
# For type CA, the listed attributes must be the same, and the optional
|
sl@0
|
75 |
# and supplied fields are just that :-)
|
sl@0
|
76 |
policy = policy_match
|
sl@0
|
77 |
|
sl@0
|
78 |
# For the CA policy
|
sl@0
|
79 |
[ policy_match ]
|
sl@0
|
80 |
countryName = match
|
sl@0
|
81 |
stateOrProvinceName = match
|
sl@0
|
82 |
organizationName = match
|
sl@0
|
83 |
organizationalUnitName = optional
|
sl@0
|
84 |
commonName = supplied
|
sl@0
|
85 |
emailAddress = optional
|
sl@0
|
86 |
|
sl@0
|
87 |
# For the 'anything' policy
|
sl@0
|
88 |
# At this point in time, you must list all acceptable 'object'
|
sl@0
|
89 |
# types.
|
sl@0
|
90 |
[ policy_anything ]
|
sl@0
|
91 |
countryName = optional
|
sl@0
|
92 |
stateOrProvinceName = optional
|
sl@0
|
93 |
localityName = optional
|
sl@0
|
94 |
organizationName = optional
|
sl@0
|
95 |
organizationalUnitName = optional
|
sl@0
|
96 |
commonName = supplied
|
sl@0
|
97 |
emailAddress = optional
|
sl@0
|
98 |
|
sl@0
|
99 |
####################################################################
|
sl@0
|
100 |
[ req ]
|
sl@0
|
101 |
default_bits = 1024
|
sl@0
|
102 |
default_keyfile = privkey.pem
|
sl@0
|
103 |
distinguished_name = req_distinguished_name
|
sl@0
|
104 |
attributes = req_attributes
|
sl@0
|
105 |
x509_extensions = v3_ca # The extentions to add to the self signed cert
|
sl@0
|
106 |
|
sl@0
|
107 |
# Passwords for private keys if not present they will be prompted for
|
sl@0
|
108 |
# input_password = secret
|
sl@0
|
109 |
# output_password = secret
|
sl@0
|
110 |
|
sl@0
|
111 |
# This sets a mask for permitted string types. There are several options.
|
sl@0
|
112 |
# default: PrintableString, T61String, BMPString.
|
sl@0
|
113 |
# pkix : PrintableString, BMPString.
|
sl@0
|
114 |
# utf8only: only UTF8Strings.
|
sl@0
|
115 |
# nombstr : PrintableString, T61String (no BMPStrings or UTF8Strings).
|
sl@0
|
116 |
# MASK:XXXX a literal mask value.
|
sl@0
|
117 |
# WARNING: current versions of Netscape crash on BMPStrings or UTF8Strings
|
sl@0
|
118 |
# so use this option with caution!
|
sl@0
|
119 |
string_mask = nombstr
|
sl@0
|
120 |
|
sl@0
|
121 |
# req_extensions = v3_req # The extensions to add to a certificate request
|
sl@0
|
122 |
|
sl@0
|
123 |
[ req_distinguished_name ]
|
sl@0
|
124 |
countryName = Country Name (2 letter code)
|
sl@0
|
125 |
countryName_default = AU
|
sl@0
|
126 |
countryName_min = 2
|
sl@0
|
127 |
countryName_max = 2
|
sl@0
|
128 |
|
sl@0
|
129 |
stateOrProvinceName = State or Province Name (full name)
|
sl@0
|
130 |
stateOrProvinceName_default = Some-State
|
sl@0
|
131 |
|
sl@0
|
132 |
localityName = Locality Name (eg, city)
|
sl@0
|
133 |
|
sl@0
|
134 |
0.organizationName = Organization Name (eg, company)
|
sl@0
|
135 |
0.organizationName_default = Internet Widgits Pty Ltd
|
sl@0
|
136 |
|
sl@0
|
137 |
# we can do this but it is not needed normally :-)
|
sl@0
|
138 |
#1.organizationName = Second Organization Name (eg, company)
|
sl@0
|
139 |
#1.organizationName_default = World Wide Web Pty Ltd
|
sl@0
|
140 |
|
sl@0
|
141 |
organizationalUnitName = Organizational Unit Name (eg, section)
|
sl@0
|
142 |
#organizationalUnitName_default =
|
sl@0
|
143 |
|
sl@0
|
144 |
commonName = Common Name (eg, YOUR name)
|
sl@0
|
145 |
commonName_max = 64
|
sl@0
|
146 |
|
sl@0
|
147 |
emailAddress = Email Address
|
sl@0
|
148 |
emailAddress_max = 64
|
sl@0
|
149 |
|
sl@0
|
150 |
# SET-ex3 = SET extension number 3
|
sl@0
|
151 |
|
sl@0
|
152 |
[ req_attributes ]
|
sl@0
|
153 |
challengePassword = A challenge password
|
sl@0
|
154 |
challengePassword_min = 4
|
sl@0
|
155 |
challengePassword_max = 20
|
sl@0
|
156 |
|
sl@0
|
157 |
unstructuredName = An optional company name
|
sl@0
|
158 |
|
sl@0
|
159 |
[ usr_cert ]
|
sl@0
|
160 |
|
sl@0
|
161 |
# These extensions are added when 'ca' signs a request.
|
sl@0
|
162 |
|
sl@0
|
163 |
# This goes against PKIX guidelines but some CAs do it and some software
|
sl@0
|
164 |
# requires this to avoid interpreting an end user certificate as a CA.
|
sl@0
|
165 |
|
sl@0
|
166 |
basicConstraints=CA:FALSE
|
sl@0
|
167 |
|
sl@0
|
168 |
# Here are some examples of the usage of nsCertType. If it is omitted
|
sl@0
|
169 |
# the certificate can be used for anything *except* object signing.
|
sl@0
|
170 |
|
sl@0
|
171 |
# This is OK for an SSL server.
|
sl@0
|
172 |
# nsCertType = server
|
sl@0
|
173 |
|
sl@0
|
174 |
# For an object signing certificate this would be used.
|
sl@0
|
175 |
# nsCertType = objsign
|
sl@0
|
176 |
|
sl@0
|
177 |
# For normal client use this is typical
|
sl@0
|
178 |
# nsCertType = client, email
|
sl@0
|
179 |
|
sl@0
|
180 |
# and for everything including object signing:
|
sl@0
|
181 |
# nsCertType = client, email, objsign
|
sl@0
|
182 |
|
sl@0
|
183 |
# This is typical in keyUsage for a client certificate.
|
sl@0
|
184 |
# keyUsage = nonRepudiation, digitalSignature, keyEncipherment
|
sl@0
|
185 |
|
sl@0
|
186 |
# This will be displayed in Netscape's comment listbox.
|
sl@0
|
187 |
nsComment = "OpenSSL Generated Certificate"
|
sl@0
|
188 |
|
sl@0
|
189 |
# PKIX recommendations harmless if included in all certificates.
|
sl@0
|
190 |
subjectKeyIdentifier=hash
|
sl@0
|
191 |
authorityKeyIdentifier=keyid,issuer
|
sl@0
|
192 |
|
sl@0
|
193 |
# This stuff is for subjectAltName and issuerAltname.
|
sl@0
|
194 |
# Import the email address.
|
sl@0
|
195 |
# subjectAltName=email:copy
|
sl@0
|
196 |
# An alternative to produce certificates that aren't
|
sl@0
|
197 |
# deprecated according to PKIX.
|
sl@0
|
198 |
# subjectAltName=email:move
|
sl@0
|
199 |
|
sl@0
|
200 |
# Copy subject details
|
sl@0
|
201 |
# issuerAltName=issuer:copy
|
sl@0
|
202 |
|
sl@0
|
203 |
#nsCaRevocationUrl = http://www.domain.dom/ca-crl.pem
|
sl@0
|
204 |
#nsBaseUrl
|
sl@0
|
205 |
#nsRevocationUrl
|
sl@0
|
206 |
#nsRenewalUrl
|
sl@0
|
207 |
#nsCaPolicyUrl
|
sl@0
|
208 |
#nsSslServerName
|
sl@0
|
209 |
|
sl@0
|
210 |
[ v3_req ]
|
sl@0
|
211 |
|
sl@0
|
212 |
# Extensions to add to a certificate request
|
sl@0
|
213 |
|
sl@0
|
214 |
basicConstraints = CA:FALSE
|
sl@0
|
215 |
keyUsage = nonRepudiation, digitalSignature, keyEncipherment
|
sl@0
|
216 |
|
sl@0
|
217 |
[ v3_ca ]
|
sl@0
|
218 |
|
sl@0
|
219 |
|
sl@0
|
220 |
# Extensions for a typical CA
|
sl@0
|
221 |
|
sl@0
|
222 |
|
sl@0
|
223 |
# PKIX recommendation.
|
sl@0
|
224 |
|
sl@0
|
225 |
subjectKeyIdentifier=hash
|
sl@0
|
226 |
|
sl@0
|
227 |
authorityKeyIdentifier=keyid:always,issuer:always
|
sl@0
|
228 |
|
sl@0
|
229 |
# This is what PKIX recommends but some broken software chokes on critical
|
sl@0
|
230 |
# extensions.
|
sl@0
|
231 |
#basicConstraints = critical,CA:true
|
sl@0
|
232 |
# So we do this instead.
|
sl@0
|
233 |
basicConstraints = CA:true
|
sl@0
|
234 |
|
sl@0
|
235 |
# Key usage: this is typical for a CA certificate. However since it will
|
sl@0
|
236 |
# prevent it being used as an test self-signed certificate it is best
|
sl@0
|
237 |
# left out by default.
|
sl@0
|
238 |
# keyUsage = cRLSign, keyCertSign
|
sl@0
|
239 |
|
sl@0
|
240 |
# Some might want this also
|
sl@0
|
241 |
# nsCertType = sslCA, emailCA
|
sl@0
|
242 |
|
sl@0
|
243 |
# Include email address in subject alt name: another PKIX recommendation
|
sl@0
|
244 |
# subjectAltName=email:copy
|
sl@0
|
245 |
# Copy issuer details
|
sl@0
|
246 |
# issuerAltName=issuer:copy
|
sl@0
|
247 |
|
sl@0
|
248 |
# DER hex encoding of an extension: beware experts only!
|
sl@0
|
249 |
# obj=DER:02:03
|
sl@0
|
250 |
# Where 'obj' is a standard or added object
|
sl@0
|
251 |
# You can even override a supported extension:
|
sl@0
|
252 |
# basicConstraints= critical, DER:30:03:01:01:FF
|
sl@0
|
253 |
|
sl@0
|
254 |
[ crl_ext ]
|
sl@0
|
255 |
|
sl@0
|
256 |
# CRL extensions.
|
sl@0
|
257 |
# Only issuerAltName and authorityKeyIdentifier make any sense in a CRL.
|
sl@0
|
258 |
|
sl@0
|
259 |
# issuerAltName=issuer:copy
|
sl@0
|
260 |
authorityKeyIdentifier=keyid:always,issuer:always
|
sl@0
|
261 |
|
sl@0
|
262 |
[ proxy_cert_ext ]
|
sl@0
|
263 |
# These extensions should be added when creating a proxy certificate
|
sl@0
|
264 |
|
sl@0
|
265 |
# This goes against PKIX guidelines but some CAs do it and some software
|
sl@0
|
266 |
# requires this to avoid interpreting an end user certificate as a CA.
|
sl@0
|
267 |
|
sl@0
|
268 |
basicConstraints=CA:FALSE
|
sl@0
|
269 |
|
sl@0
|
270 |
# Here are some examples of the usage of nsCertType. If it is omitted
|
sl@0
|
271 |
# the certificate can be used for anything *except* object signing.
|
sl@0
|
272 |
|
sl@0
|
273 |
# This is OK for an SSL server.
|
sl@0
|
274 |
# nsCertType = server
|
sl@0
|
275 |
|
sl@0
|
276 |
# For an object signing certificate this would be used.
|
sl@0
|
277 |
# nsCertType = objsign
|
sl@0
|
278 |
|
sl@0
|
279 |
# For normal client use this is typical
|
sl@0
|
280 |
# nsCertType = client, email
|
sl@0
|
281 |
|
sl@0
|
282 |
# and for everything including object signing:
|
sl@0
|
283 |
# nsCertType = client, email, objsign
|
sl@0
|
284 |
|
sl@0
|
285 |
# This is typical in keyUsage for a client certificate.
|
sl@0
|
286 |
# keyUsage = nonRepudiation, digitalSignature, keyEncipherment
|
sl@0
|
287 |
|
sl@0
|
288 |
# This will be displayed in Netscape's comment listbox.
|
sl@0
|
289 |
nsComment = "OpenSSL Generated Certificate"
|
sl@0
|
290 |
|
sl@0
|
291 |
# PKIX recommendations harmless if included in all certificates.
|
sl@0
|
292 |
subjectKeyIdentifier=hash
|
sl@0
|
293 |
authorityKeyIdentifier=keyid,issuer:always
|
sl@0
|
294 |
|
sl@0
|
295 |
# This stuff is for subjectAltName and issuerAltname.
|
sl@0
|
296 |
# Import the email address.
|
sl@0
|
297 |
# subjectAltName=email:copy
|
sl@0
|
298 |
# An alternative to produce certificates that aren't
|
sl@0
|
299 |
# deprecated according to PKIX.
|
sl@0
|
300 |
# subjectAltName=email:move
|
sl@0
|
301 |
|
sl@0
|
302 |
# Copy subject details
|
sl@0
|
303 |
# issuerAltName=issuer:copy
|
sl@0
|
304 |
|
sl@0
|
305 |
#nsCaRevocationUrl = http://www.domain.dom/ca-crl.pem
|
sl@0
|
306 |
#nsBaseUrl
|
sl@0
|
307 |
#nsRevocationUrl
|
sl@0
|
308 |
#nsRenewalUrl
|
sl@0
|
309 |
#nsCaPolicyUrl
|
sl@0
|
310 |
#nsSslServerName
|
sl@0
|
311 |
|
sl@0
|
312 |
# This really needs to be in place for it to be a proxy certificate.
|
sl@0
|
313 |
proxyCertInfo=critical,language:id-ppl-anyLanguage,pathlen:3,policy:foo
|