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