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