]> granicus.if.org Git - apache/blob - docs/manual/mod/mod_ssl.xml
Mention ECC support
[apache] / docs / manual / mod / mod_ssl.xml
1 <?xml version="1.0"?>
2 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
3 <?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>
4 <!-- $LastChangedRevision$ -->
5
6 <!--
7  Licensed to the Apache Software Foundation (ASF) under one or more
8  contributor license agreements.  See the NOTICE file distributed with
9  this work for additional information regarding copyright ownership.
10  The ASF licenses this file to You under the Apache License, Version 2.0
11  (the "License"); you may not use this file except in compliance with
12  the License.  You may obtain a copy of the License at
13
14      http://www.apache.org/licenses/LICENSE-2.0
15
16  Unless required by applicable law or agreed to in writing, software
17  distributed under the License is distributed on an "AS IS" BASIS,
18  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19  See the License for the specific language governing permissions and
20  limitations under the License.
21 -->
22
23 <modulesynopsis metafile="mod_ssl.xml.meta">
24
25 <name>mod_ssl</name>
26 <description>Strong cryptography using the Secure Sockets
27 Layer (SSL) and Transport Layer Security (TLS) protocols</description>
28 <status>Extension</status>
29 <sourcefile>mod_ssl.c</sourcefile>
30 <identifier>ssl_module</identifier>
31
32 <summary>
33 <p>This module provides SSL v3 and TLS v1.x support for the Apache
34 HTTP Server. SSL v2 is no longer supported.</p>
35
36 <p>This module relies on <a href="http://www.openssl.org/">OpenSSL</a>
37 to provide the cryptography engine.</p>
38
39 <p>Further details, discussion, and examples are provided in the
40 <a href="../ssl/">SSL documentation</a>.</p>
41 </summary>
42
43 <section id="envvars"><title>Environment Variables</title>
44
45 <p>This module can be configured to provide several items of SSL information
46 as additional environment variables to the SSI and CGI namespace. This
47 information is not provided by default for performance reasons. (See
48 <directive>SSLOptions</directive> StdEnvVars, below.) The generated variables
49 are listed in the table below. For backward compatibility the information can
50 be made available under different names, too. Look in the <a
51 href="../ssl/ssl_compat.html">Compatibility</a> chapter for details on the
52 compatibility variables.</p>
53
54 <table border="1">
55 <columnspec><column width=".3"/><column width=".2"/><column width=".5"/>
56 </columnspec>
57 <tr>
58  <th><a name="table3">Variable Name:</a></th>
59  <th>Value Type:</th>
60  <th>Description:</th>
61 </tr>
62 <tr><td><code>HTTPS</code></td>                         <td>flag</td>      <td>HTTPS is being used.</td></tr>
63 <tr><td><code>SSL_PROTOCOL</code></td>                  <td>string</td>    <td>The SSL protocol version (SSLv3, TLSv1, TLSv1.1, TLSv1.2)</td></tr>
64 <tr><td><code>SSL_SESSION_ID</code></td>                <td>string</td>    <td>The hex-encoded SSL session id</td></tr>
65 <tr><td><code>SSL_SESSION_RESUMED</code></td>           <td>string</td>    <td>Initial or Resumed SSL Session.  Note: multiple requests may be served over the same (Initial or Resumed) SSL session if HTTP KeepAlive is in use</td></tr>
66 <tr><td><code>SSL_SECURE_RENEG</code></td>              <td>string</td>    <td><code>true</code> if secure renegotiation is supported, else <code>false</code></td></tr>
67 <tr><td><code>SSL_CIPHER</code></td>                    <td>string</td>    <td>The cipher specification name</td></tr>
68 <tr><td><code>SSL_CIPHER_EXPORT</code></td>             <td>string</td>    <td><code>true</code> if cipher is an export cipher</td></tr>
69 <tr><td><code>SSL_CIPHER_USEKEYSIZE</code></td>         <td>number</td>    <td>Number of cipher bits (actually used)</td></tr>
70 <tr><td><code>SSL_CIPHER_ALGKEYSIZE</code></td>         <td>number</td>    <td>Number of cipher bits (possible)</td></tr>
71 <tr><td><code>SSL_COMPRESS_METHOD</code></td>           <td>string</td>    <td>SSL compression method negotiated</td></tr>
72 <tr><td><code>SSL_VERSION_INTERFACE</code></td>         <td>string</td>    <td>The mod_ssl program version</td></tr>
73 <tr><td><code>SSL_VERSION_LIBRARY</code></td>           <td>string</td>    <td>The OpenSSL program version</td></tr>
74 <tr><td><code>SSL_CLIENT_M_VERSION</code></td>          <td>string</td>    <td>The version of the client certificate</td></tr>
75 <tr><td><code>SSL_CLIENT_M_SERIAL</code></td>           <td>string</td>    <td>The serial of the client certificate</td></tr>
76 <tr><td><code>SSL_CLIENT_S_DN</code></td>               <td>string</td>    <td>Subject DN in client's certificate</td></tr>
77 <tr><td><code>SSL_CLIENT_S_DN_</code><em>x509</em></td> <td>string</td>    <td>Component of client's Subject DN</td></tr>
78 <tr><td><code>SSL_CLIENT_I_DN</code></td>               <td>string</td>    <td>Issuer DN of client's certificate</td></tr>
79 <tr><td><code>SSL_CLIENT_I_DN_</code><em>x509</em></td> <td>string</td>    <td>Component of client's Issuer DN</td></tr>
80 <tr><td><code>SSL_CLIENT_V_START</code></td>            <td>string</td>    <td>Validity of client's certificate (start time)</td></tr>
81 <tr><td><code>SSL_CLIENT_V_END</code></td>              <td>string</td>    <td>Validity of client's certificate (end time)</td></tr>
82 <tr><td><code>SSL_CLIENT_V_REMAIN</code></td>           <td>string</td>    <td>Number of days until client's certificate expires</td></tr>
83 <tr><td><code>SSL_CLIENT_A_SIG</code></td>              <td>string</td>    <td>Algorithm used for the signature of client's certificate</td></tr>
84 <tr><td><code>SSL_CLIENT_A_KEY</code></td>              <td>string</td>    <td>Algorithm used for the public key of client's certificate</td></tr>
85 <tr><td><code>SSL_CLIENT_CERT</code></td>               <td>string</td>    <td>PEM-encoded client certificate</td></tr>
86 <tr><td><code>SSL_CLIENT_CERT_CHAIN_</code><em>n</em></td> <td>string</td>    <td>PEM-encoded certificates in client certificate chain</td></tr>
87 <tr><td><code>SSL_CLIENT_VERIFY</code></td>             <td>string</td>    <td><code>NONE</code>, <code>SUCCESS</code>, <code>GENEROUS</code> or <code>FAILED:</code><em>reason</em></td></tr>
88 <tr><td><code>SSL_SERVER_M_VERSION</code></td>          <td>string</td>    <td>The version of the server certificate</td></tr>
89 <tr><td><code>SSL_SERVER_M_SERIAL</code></td>           <td>string</td>    <td>The serial of the server certificate</td></tr>
90 <tr><td><code>SSL_SERVER_S_DN</code></td>               <td>string</td>    <td>Subject DN in server's certificate</td></tr>
91 <tr><td><code>SSL_SERVER_S_DN_</code><em>x509</em></td> <td>string</td>    <td>Component of server's Subject DN</td></tr>
92 <tr><td><code>SSL_SERVER_I_DN</code></td>               <td>string</td>    <td>Issuer DN of server's certificate</td></tr>
93 <tr><td><code>SSL_SERVER_I_DN_</code><em>x509</em></td> <td>string</td>    <td>Component of server's Issuer DN</td></tr>
94 <tr><td><code>SSL_SERVER_V_START</code></td>            <td>string</td>    <td>Validity of server's certificate (start time)</td></tr>
95 <tr><td><code>SSL_SERVER_V_END</code></td>              <td>string</td>    <td>Validity of server's certificate (end time)</td></tr>
96 <tr><td><code>SSL_SERVER_A_SIG</code></td>              <td>string</td>    <td>Algorithm used for the signature of server's certificate</td></tr>
97 <tr><td><code>SSL_SERVER_A_KEY</code></td>              <td>string</td>    <td>Algorithm used for the public key of server's certificate</td></tr>
98 <tr><td><code>SSL_SERVER_CERT</code></td>               <td>string</td>    <td>PEM-encoded server certificate</td></tr>
99 <tr><td><code>SSL_SRP_USER</code></td>                  <td>string</td>    <td>SRP username</td></tr>
100 <tr><td><code>SSL_SRP_USERINFO</code></td>              <td>string</td>    <td>SRP user info</td></tr>
101 <tr><td><code>SSL_TLS_SNI</code></td>                   <td>string</td>    <td>Contents of the SNI TLS extension (if supplied with ClientHello)</td></tr>
102 </table>
103
104 <p><em>x509</em> specifies a component of an X.509 DN; one of
105 <code>C,ST,L,O,OU,CN,T,I,G,S,D,UID,Email</code>.  In Apache 2.1 and
106 later, <em>x509</em> may also include a numeric <code>_n</code>
107 suffix.  If the DN in question contains multiple attributes of the
108 same name, this suffix is used as a zero-based index to select a
109 particular attribute.  For example, where the server certificate
110 subject DN included two OU attributes, <code>SSL_SERVER_S_DN_OU_0</code>
111 and
112 <code>SSL_SERVER_S_DN_OU_1</code> could be used to reference each.  A
113 variable name without a <code>_n</code> suffix is equivalent to that
114 name with a <code>_0</code> suffix; the first (or only) attribute.
115 When the environment table is populated using
116 the <code>StdEnvVars</code> option of
117 the <directive module="mod_ssl">SSLOptions</directive> directive, the
118 first (or only) attribute of any DN is added only under a non-suffixed
119 name; i.e. no <code>_0</code> suffixed entries are added.</p>
120
121 <p>The format of the <em>*_DN</em> variables has changed in Apache HTTPD
122 2.3.11. See the <code>LegacyDNStringFormat</code> option for
123 <directive module="mod_ssl">SSLOptions</directive> for details.</p>
124
125 <p><code>SSL_CLIENT_V_REMAIN</code> is only available in version 2.1
126 and later.</p>
127
128 <p>A number of additional environment variables can also be used
129 in <directive>SSLRequire</directive> expressions, or in custom log
130 formats:</p>
131
132 <note><pre>HTTP_USER_AGENT        PATH_INFO             AUTH_TYPE
133 HTTP_REFERER           QUERY_STRING          SERVER_SOFTWARE
134 HTTP_COOKIE            REMOTE_HOST           API_VERSION
135 HTTP_FORWARDED         REMOTE_IDENT          TIME_YEAR
136 HTTP_HOST              IS_SUBREQ             TIME_MON
137 HTTP_PROXY_CONNECTION  DOCUMENT_ROOT         TIME_DAY
138 HTTP_ACCEPT            SERVER_ADMIN          TIME_HOUR
139 THE_REQUEST            SERVER_NAME           TIME_MIN
140 REQUEST_FILENAME       SERVER_PORT           TIME_SEC
141 REQUEST_METHOD         SERVER_PROTOCOL       TIME_WDAY
142 REQUEST_SCHEME         REMOTE_ADDR           TIME
143 REQUEST_URI            REMOTE_USER</pre></note>
144
145 <p>In these contexts, two special formats can also be used:</p>
146
147 <dl>
148   <dt><code>ENV:<em>variablename</em></code></dt>
149   <dd>This will expand to the standard environment
150   variable <em>variablename</em>.</dd>
151
152   <dt><code>HTTP:<em>headername</em></code></dt>
153   <dd>This will expand to the value of the request header with name
154   <em>headername</em>.</dd>
155 </dl>
156
157 </section>
158
159 <section id="logformats"><title>Custom Log Formats</title>
160
161 <p>When <module>mod_ssl</module> is built into Apache or at least
162 loaded (under DSO situation) additional functions exist for the <a
163 href="mod_log_config.html#formats">Custom Log Format</a> of
164 <module>mod_log_config</module>. First there is an
165 additional ``<code>%{</code><em>varname</em><code>}x</code>''
166 eXtension format function which can be used to expand any variables
167 provided by any module, especially those provided by mod_ssl which can
168 you find in the above table.</p>
169 <p>
170 For backward compatibility there is additionally a special
171 ``<code>%{</code><em>name</em><code>}c</code>'' cryptography format function
172 provided. Information about this function is provided in the <a
173 href="../ssl/ssl_compat.html">Compatibility</a> chapter.</p>
174 <example><title>Example</title>
175 <highlight language="config">
176 CustomLog logs/ssl_request_log "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
177 </highlight>
178 </example>
179 </section>
180
181 <section id="notes"><title>Request Notes</title>
182
183 <p><module>mod_ssl</module> sets "notes" for the request which can be
184 used in logging with the <code>%{<em>name</em>}n</code> format
185 string in <module>mod_log_config</module>.</p>
186
187 <p>The notes supported are as follows:</p>
188
189 <dl>
190   <dt><code>ssl-access-forbidden</code></dt>
191   <dd>This note is set to the value <code>1</code> if access was
192   denied due to an <directive>SSLRequire</directive>
193   or <directive>SSLRequireSSL</directive> directive.</dd>
194
195   <dt><code>ssl-secure-reneg</code></dt>
196   <dd>If <module>mod_ssl</module> is built against a version of
197   OpenSSL which supports the secure renegotiation extension, this note
198   is set to the value <code>1</code> if SSL is in used for the current
199   connection, and the client also supports the secure renegotiation
200   extension.  If the client does not support the secure renegotiation
201   extension, the note is set to the value <code>0</code>.
202   If <module>mod_ssl</module> is not built against a version of
203   OpenSSL which supports secure renegotiation, or if SSL is not in use
204   for the current connection, the note is not set.</dd>
205 </dl>
206
207 </section>
208
209 <section id="authzproviders"><title>Authorization providers for use with Require</title>
210
211   <p><module>mod_ssl</module> provides a few authentication providers for use
212   with <module>mod_authz_core</module>'s
213   <directive module="mod_authz_core">Require</directive> directive.</p>
214
215   <section id="reqssl"><title>Require ssl</title>
216
217     <p>The <code>ssl</code> provider denies access if a connection is not
218        encrypted with SSL. This is similar to the
219        <directive>SSLRequireSSL</directive> directive.</p>
220
221     <highlight language="config">
222       Require ssl
223     </highlight>
224
225   </section>
226
227   <section id="reqverifyclient"><title>Require ssl-verify-client</title>
228
229     <p>The <code>ssl</code> provider allows access if the user is
230        authenticated with a valid client certificate. This is only
231        useful if <code>SSLVerifyClient optional</code> is in effect.</p>
232
233     <p>The following example grants access if the user is authenticated
234        either with a client certificate or by username and password.</p>
235
236     <highlight language="config">
237       Require ssl-verify-client<br/>
238       Require valid-user
239     </highlight>
240
241   </section>
242
243 </section>
244
245 <directivesynopsis>
246 <name>SSLPassPhraseDialog</name>
247 <description>Type of pass phrase dialog for encrypted private
248 keys</description>
249 <syntax>SSLPassPhraseDialog <em>type</em></syntax>
250 <default>SSLPassPhraseDialog builtin</default>
251 <contextlist><context>server config</context></contextlist>
252
253 <usage>
254 <p>
255 When Apache starts up it has to read the various Certificate (see
256 <directive module="mod_ssl">SSLCertificateFile</directive>) and
257 Private Key (see <directive
258 module="mod_ssl">SSLCertificateKeyFile</directive>) files of the
259 SSL-enabled virtual servers. Because for security reasons the Private
260 Key files are usually encrypted, mod_ssl needs to query the
261 administrator for a Pass Phrase in order to decrypt those files. This
262 query can be done in two ways which can be configured by
263 <em>type</em>:</p>
264 <ul>
265 <li><code>builtin</code>
266     <p>
267     This is the default where an interactive terminal dialog occurs at startup
268     time just before Apache detaches from the terminal. Here the administrator
269     has to manually enter the Pass Phrase for each encrypted Private Key file.
270     Because a lot of SSL-enabled virtual hosts can be configured, the
271     following reuse-scheme is used to minimize the dialog: When a Private Key
272     file is encrypted, all known Pass Phrases (at the beginning there are
273     none, of course) are tried. If one of those known Pass Phrases succeeds no
274     dialog pops up for this particular Private Key file. If none succeeded,
275     another Pass Phrase is queried on the terminal and remembered for the next
276     round (where it perhaps can be reused).</p>
277     <p>
278     This scheme allows mod_ssl to be maximally flexible (because for N encrypted
279     Private Key files you <em>can</em> use N different Pass Phrases - but then
280     you have to enter all of them, of course) while minimizing the terminal
281     dialog (i.e. when you use a single Pass Phrase for all N Private Key files
282     this Pass Phrase is queried only once).</p></li>
283
284 <li><code>|/path/to/program [args...]</code>
285
286    <p>This mode allows an external program to be used which acts as a
287    pipe to a particular input device; the program is sent the standard
288    prompt text used for the <code>builtin</code> mode on
289    <code>stdin</code>, and is expected to write password strings on
290    <code>stdout</code>.  If several passwords are needed (or an
291    incorrect password is entered), additional prompt text will be
292    written subsequent to the first password being returned, and more
293    passwords must then be written back.</p></li>
294
295 <li><code>exec:/path/to/program</code>
296     <p>
297     Here an external program is configured which is called at startup for each
298     encrypted Private Key file. It is called with two arguments (the first is
299     of the form ``<code>servername:portnumber</code>'', the second is either
300     ``<code>RSA</code>'', ``<code>DSA</code>'', or ``<code>ECC</code>''), which
301     indicate for which server and algorithm it has to print the corresponding
302     Pass Phrase to <code>stdout</code>.  The intent is that this external
303     program first runs security checks to make sure that the system is not
304     compromised by an attacker, and only when these checks were passed
305     successfully it provides the Pass Phrase.</p>
306     <p>
307     Both these security checks, and the way the Pass Phrase is determined, can
308     be as complex as you like. Mod_ssl just defines the interface: an
309     executable program which provides the Pass Phrase on <code>stdout</code>.
310     Nothing more or less! So, if you're really paranoid about security, here
311     is your interface. Anything else has to be left as an exercise to the
312     administrator, because local security requirements are so different.</p>
313     <p>
314     The reuse-algorithm above is used here, too. In other words: The external
315     program is called only once per unique Pass Phrase.</p></li>
316 </ul>
317 <example><title>Example</title>
318 <highlight language="config">
319 SSLPassPhraseDialog exec:/usr/local/apache/sbin/pp-filter
320 </highlight>
321 </example>
322 </usage>
323 </directivesynopsis>
324
325 <directivesynopsis>
326 <name>SSLRandomSeed</name>
327 <description>Pseudo Random Number Generator (PRNG) seeding
328 source</description>
329 <syntax>SSLRandomSeed <em>context</em> <em>source</em>
330 [<em>bytes</em>]</syntax>
331 <contextlist><context>server config</context></contextlist>
332
333 <usage>
334 <p>
335 This configures one or more sources for seeding the Pseudo Random Number
336 Generator (PRNG) in OpenSSL at startup time (<em>context</em> is
337 <code>startup</code>) and/or just before a new SSL connection is established
338 (<em>context</em> is <code>connect</code>). This directive can only be used
339 in the global server context because the PRNG is a global facility.</p>
340 <p>
341 The following <em>source</em> variants are available:</p>
342 <ul>
343 <li><code>builtin</code>
344     <p> This is the always available builtin seeding source. Its usage
345     consumes minimum CPU cycles under runtime and hence can be always used
346     without drawbacks. The source used for seeding the PRNG contains of the
347     current time, the current process id and (when applicable) a randomly
348     chosen 1KB extract of the inter-process scoreboard structure of Apache.
349     The drawback is that this is not really a strong source and at startup
350     time (where the scoreboard is still not available) this source just
351     produces a few bytes of entropy. So you should always, at least for the
352     startup, use an additional seeding source.</p></li>
353 <li><code>file:/path/to/source</code>
354     <p>
355     This variant uses an external file <code>/path/to/source</code> as the
356     source for seeding the PRNG. When <em>bytes</em> is specified, only the
357     first <em>bytes</em> number of bytes of the file form the entropy (and
358     <em>bytes</em> is given to <code>/path/to/source</code> as the first
359     argument). When <em>bytes</em> is not specified the whole file forms the
360     entropy (and <code>0</code> is given to <code>/path/to/source</code> as
361     the first argument). Use this especially at startup time, for instance
362     with an available <code>/dev/random</code> and/or
363     <code>/dev/urandom</code> devices (which usually exist on modern Unix
364     derivatives like FreeBSD and Linux).</p>
365     <p>
366     <em>But be careful</em>: Usually <code>/dev/random</code> provides only as
367     much entropy data as it actually has, i.e. when you request 512 bytes of
368     entropy, but the device currently has only 100 bytes available two things
369     can happen: On some platforms you receive only the 100 bytes while on
370     other platforms the read blocks until enough bytes are available (which
371     can take a long time). Here using an existing <code>/dev/urandom</code> is
372     better, because it never blocks and actually gives the amount of requested
373     data. The drawback is just that the quality of the received data may not
374     be the best.</p></li>
375
376 <li><code>exec:/path/to/program</code>
377     <p>
378     This variant uses an external executable
379     <code>/path/to/program</code> as the source for seeding the
380     PRNG. When <em>bytes</em> is specified, only the first
381     <em>bytes</em> number of bytes of its <code>stdout</code> contents
382     form the entropy. When <em>bytes</em> is not specified, the
383     entirety of the data produced on <code>stdout</code> form the
384     entropy. Use this only at startup time when you need a very strong
385     seeding with the help of an external program (for instance as in
386     the example above with the <code>truerand</code> utility you can
387     find in the mod_ssl distribution which is based on the AT&amp;T
388     <em>truerand</em> library). Using this in the connection context
389     slows down the server too dramatically, of course.  So usually you
390     should avoid using external programs in that context.</p></li>
391 <li><code>egd:/path/to/egd-socket</code> (Unix only)
392     <p>
393     This variant uses the Unix domain socket of the
394     external Entropy Gathering Daemon (EGD) (see <a
395     href="http://www.lothar.com/tech/crypto/">http://www.lothar.com/tech
396     /crypto/</a>) to seed the PRNG. Use this if no random device exists
397     on your platform.</p></li>
398 </ul>
399 <example><title>Example</title>
400 <highlight language="config">
401 SSLRandomSeed startup builtin
402 SSLRandomSeed startup file:/dev/random
403 SSLRandomSeed startup file:/dev/urandom 1024
404 SSLRandomSeed startup exec:/usr/local/bin/truerand 16
405 SSLRandomSeed connect builtin
406 SSLRandomSeed connect file:/dev/random
407 SSLRandomSeed connect file:/dev/urandom 1024
408 </highlight>
409 </example>
410 </usage>
411 </directivesynopsis>
412
413 <directivesynopsis>
414 <name>SSLSessionCache</name>
415 <description>Type of the global/inter-process SSL Session
416 Cache</description>
417 <syntax>SSLSessionCache <em>type</em></syntax>
418 <default>SSLSessionCache none</default>
419 <contextlist><context>server config</context></contextlist>
420
421 <usage>
422 <p>
423 This configures the storage type of the global/inter-process SSL Session
424 Cache. This cache is an optional facility which speeds up parallel request
425 processing. For requests to the same server process (via HTTP keep-alive),
426 OpenSSL already caches the SSL session information locally. But because modern
427 clients request inlined images and other data via parallel requests (usually
428 up to four parallel requests are common) those requests are served by
429 <em>different</em> pre-forked server processes. Here an inter-process cache
430 helps to avoid unnecessary session handshakes.</p>
431 <p>
432 The following five storage <em>type</em>s are currently supported:</p>
433 <ul>
434 <li><code>none</code>
435
436     <p>This disables the global/inter-process Session Cache.  This
437     will incur a noticeable speed penalty and may cause problems if
438     using certain browsers, particularly if client certificates are
439     enabled.  This setting is not recommended.</p></li>
440
441 <li><code>nonenotnull</code>
442
443     <p>This disables any global/inter-process Session Cache.  However
444     it does force OpenSSL to send a non-null session ID to
445     accommodate buggy clients that require one.</p></li>
446
447 <li><code>dbm:/path/to/datafile</code>
448
449     <p>This makes use of a DBM hashfile on the local disk to
450     synchronize the local OpenSSL memory caches of the server
451     processes. This session cache may suffer reliability issues under
452     high load. To use this, ensure that
453     <module>mod_socache_dbm</module> is loaded.</p></li>
454
455 <li><code>shmcb:/path/to/datafile</code>[<code>(</code><em>size</em><code>)</code>]
456
457     <p>This makes use of a high-performance cyclic buffer
458     (approx. <em>size</em> bytes in size) inside a shared memory
459     segment in RAM (established via <code>/path/to/datafile</code>) to
460     synchronize the local OpenSSL memory caches of the server
461     processes.  This is the recommended session cache. To use this,
462     ensure that <module>mod_socache_shmcb</module> is loaded.</p></li>
463
464 <li><code>dc:UNIX:/path/to/socket</code>
465
466     <p>This makes use of the <a
467     href="http://www.distcache.org/">distcache</a> distributed session
468     caching libraries.  The argument should specify the location of
469     the server or proxy to be used using the distcache address syntax;
470     for example, <code>UNIX:/path/to/socket</code> specifies a UNIX
471     domain socket (typically a local dc_client proxy);
472     <code>IP:server.example.com:9001</code> specifies an IP
473     address. To use this, ensure that
474     <module>mod_socache_dc</module> is loaded.</p></li>
475
476 </ul>
477
478 <example><title>Examples</title>
479 <highlight language="config">
480 SSLSessionCache dbm:/usr/local/apache/logs/ssl_gcache_data
481 SSLSessionCache shmcb:/usr/local/apache/logs/ssl_gcache_data(512000)
482 </highlight>
483 </example>
484
485 <p>The <code>ssl-cache</code> mutex is used to serialize access to
486 the session cache to prevent corruption.  This mutex can be configured
487 using the <directive module="core">Mutex</directive> directive.</p>
488 </usage>
489 </directivesynopsis>
490
491 <directivesynopsis>
492 <name>SSLSessionCacheTimeout</name>
493 <description>Number of seconds before an SSL session expires
494 in the Session Cache</description>
495 <syntax>SSLSessionCacheTimeout <em>seconds</em></syntax>
496 <default>SSLSessionCacheTimeout 300</default>
497 <contextlist><context>server config</context>
498 <context>virtual host</context></contextlist>
499
500 <usage>
501 <p>
502 This directive sets the timeout in seconds for the information stored in the
503 global/inter-process SSL Session Cache and the OpenSSL internal memory cache.
504 It can be set as low as 15 for testing, but should be set to higher
505 values like 300 in real life.</p>
506 <example><title>Example</title>
507 <highlight language="config">
508 SSLSessionCacheTimeout 600
509 </highlight>
510 </example>
511 </usage>
512 </directivesynopsis>
513
514 <directivesynopsis>
515 <name>SSLEngine</name>
516 <description>SSL Engine Operation Switch</description>
517 <syntax>SSLEngine on|off|optional</syntax>
518 <default>SSLEngine off</default>
519 <contextlist><context>server config</context>
520 <context>virtual host</context></contextlist>
521
522 <usage>
523 <p>
524 This directive toggles the usage of the SSL/TLS Protocol Engine. This
525 is should be used inside a <directive module="core"
526 type="section">VirtualHost</directive> section to enable SSL/TLS for a
527 that virtual host. By default the SSL/TLS Protocol Engine is
528 disabled for both the main server and all configured virtual hosts.</p>
529 <example><title>Example</title>
530 <highlight language="config">
531 &lt;VirtualHost _default_:443&gt;
532 SSLEngine on
533 #...
534 &lt;/VirtualHost&gt;
535 </highlight>
536 </example>
537 <p>In Apache 2.1 and later, <directive>SSLEngine</directive> can be set to
538 <code>optional</code>. This enables support for
539 <a href="http://www.ietf.org/rfc/rfc2817.txt">RFC 2817</a>, Upgrading to TLS
540 Within HTTP/1.1. At this time no web browsers support RFC 2817.</p>
541 </usage>
542 </directivesynopsis>
543
544 <directivesynopsis>
545 <name>SSLFIPS</name>
546 <description>SSL FIPS mode Switch</description>
547 <syntax>SSLFIPS on|off</syntax>
548 <default>SSLFIPS off</default>
549 <contextlist><context>server config</context></contextlist>
550
551 <usage>
552 <p>
553 This directive toggles the usage of the SSL library FIPS_mode flag.
554 It must be set in the global server context and cannot be configured
555 with conflicting settings (SSLFIPS on followed by SSLFIPS off or
556 similar).  The mode applies to all SSL library operations.
557 </p>
558 <p>
559 If httpd was compiled against an SSL library which did not support
560 the FIPS_mode flag, <code>SSLFIPS on</code> will fail.  Refer to the
561 FIPS 140-2 Security Policy document of the SSL provider library for
562 specific requirements to use mod_ssl in a FIPS 140-2 approved mode
563 of operation; note that mod_ssl itself is not validated, but may be
564 described as using FIPS 140-2 validated cryptographic module, when
565 all components are assembled and operated under the guidelines imposed
566 by the applicable Security Policy.
567 </p>
568 </usage>
569 </directivesynopsis>
570
571 <directivesynopsis>
572 <name>SSLProtocol</name>
573 <description>Configure usable SSL/TLS protocol versions</description>
574 <syntax>SSLProtocol [+|-]<em>protocol</em> ...</syntax>
575 <default>SSLProtocol all</default>
576 <contextlist><context>server config</context>
577 <context>virtual host</context></contextlist>
578
579 <usage>
580 <p>
581 This directive can be used to control which versions of the SSL/TLS protocol
582 will be accepted in new connections.</p>
583 <p>
584 The available (case-insensitive) <em>protocol</em>s are:</p>
585 <ul>
586 <li><code>SSLv3</code>
587     <p>
588     This is the Secure Sockets Layer (SSL) protocol, version 3.0, from
589     the Netscape Corporation.
590     It is the successor to SSLv2 and the predecessor to TLSv1.</p></li>
591
592 <li><code>TLSv1</code>
593     <p>
594     This is the Transport Layer Security (TLS) protocol, version 1.0.
595     It is the successor to SSLv3 and is defined in
596     <a href="http://www.ietf.org/rfc/rfc2246.txt">RFC 2246</a>.
597     It is supported by nearly every client.</p></li>
598
599 <li><code>TLSv1.1</code> (when using OpenSSL 1.0.1 and later)
600     <p>
601     A revision of the TLS 1.0 protocol, as defined in
602     <a href="http://www.ietf.org/rfc/rfc4346.txt">RFC 4346</a>.</p></li>
603
604 <li><code>TLSv1.2</code> (when using OpenSSL 1.0.1 and later)
605     <p>
606     A revision of the TLS 1.1 protocol, as defined in
607     <a href="http://www.ietf.org/rfc/rfc5246.txt">RFC 5246</a>.</p></li>
608
609 <li><code>all</code>
610     <p>
611     This is a shortcut for ``<code>+SSLv3 +TLSv1</code>'' or
612     - when using OpenSSL 1.0.1 and later -
613     ``<code>+SSLv3 +TLSv1 +TLSv1.1 +TLSv1.2</code>, respectively.</p></li>
614 </ul>
615 <example><title>Example</title>
616 <highlight language="config">
617 SSLProtocol TLSv1
618 </highlight>
619 </example>
620 </usage>
621 </directivesynopsis>
622
623 <directivesynopsis>
624 <name>SSLCipherSuite</name>
625 <description>Cipher Suite available for negotiation in SSL
626 handshake</description>
627 <syntax>SSLCipherSuite <em>cipher-spec</em></syntax>
628 <default>SSLCipherSuite DEFAULT (depends on OpenSSL version)</default>
629 <contextlist><context>server config</context>
630 <context>virtual host</context>
631 <context>directory</context>
632 <context>.htaccess</context></contextlist>
633 <override>AuthConfig</override>
634
635 <usage>
636 <p>
637 This complex directive uses a colon-separated <em>cipher-spec</em> string
638 consisting of OpenSSL cipher specifications to configure the Cipher Suite the
639 client is permitted to negotiate in the SSL handshake phase. Notice that this
640 directive can be used both in per-server and per-directory context. In
641 per-server context it applies to the standard SSL handshake when a connection
642 is established. In per-directory context it forces a SSL renegotiation with the
643 reconfigured Cipher Suite after the HTTP request was read but before the HTTP
644 response is sent.</p>
645 <p>
646 An SSL cipher specification in <em>cipher-spec</em> is composed of 4 major
647 attributes plus a few extra minor ones:</p>
648 <ul>
649 <li><em>Key Exchange Algorithm</em>:<br />
650     RSA, Diffie-Hellman, Elliptic Curve Diffie-Hellman, Secure Remote Password
651 </li>
652 <li><em>Authentication Algorithm</em>:<br />
653     RSA, Diffie-Hellman, DSS, ECDSA, or none.
654 </li>
655 <li><em>Cipher/Encryption Algorithm</em>:<br />
656     AES, DES, Triple-DES, RC4, RC2, IDEA, etc.
657 </li>
658 <li><em>MAC Digest Algorithm</em>:<br />
659     MD5, SHA or SHA1, SHA256, SHA384.
660 </li>
661 </ul>
662 <p>An SSL cipher can also be an export cipher. SSLv2 ciphers are no longer
663 supported. To specify which ciphers to use, one can either specify all the
664 Ciphers, one at a time, or use aliases to specify the preference and order
665 for the ciphers (see <a href="#table1">Table
666 1</a>). The actually available ciphers and aliases depends on the used
667 openssl version. Newer openssl versions may include additional ciphers.</p>
668
669 <table border="1">
670 <columnspec><column width=".5"/><column width=".5"/></columnspec>
671 <tr><th><a name="table1">Tag</a></th> <th>Description</th></tr>
672 <tr><td colspan="2"><em>Key Exchange Algorithm:</em></td></tr>
673 <tr><td><code>kRSA</code></td>   <td>RSA key exchange</td></tr>
674 <tr><td><code>kDHr</code></td>   <td>Diffie-Hellman key exchange with RSA key</td></tr>
675 <tr><td><code>kDHd</code></td>   <td>Diffie-Hellman key exchange with DSA key</td></tr>
676 <tr><td><code>kEDH</code></td>   <td>Ephemeral (temp.key) Diffie-Hellman key exchange (no cert)</td>   </tr>
677 <tr><td><code>kSRP</code></td>   <td>Secure Remote Password (SRP) key exchange</td></tr>
678 <tr><td colspan="2"><em>Authentication Algorithm:</em></td></tr>
679 <tr><td><code>aNULL</code></td>  <td>No authentication</td></tr>
680 <tr><td><code>aRSA</code></td>   <td>RSA authentication</td></tr>
681 <tr><td><code>aDSS</code></td>   <td>DSS authentication</td> </tr>
682 <tr><td><code>aDH</code></td>    <td>Diffie-Hellman authentication</td></tr>
683 <tr><td colspan="2"><em>Cipher Encoding Algorithm:</em></td></tr>
684 <tr><td><code>eNULL</code></td>  <td>No encryption</td>         </tr>
685 <tr><td><code>NULL</code></td>   <td>alias for eNULL</td>         </tr>
686 <tr><td><code>AES</code></td>    <td>AES encryption</td>        </tr>
687 <tr><td><code>DES</code></td>    <td>DES encryption</td>        </tr>
688 <tr><td><code>3DES</code></td>   <td>Triple-DES encryption</td> </tr>
689 <tr><td><code>RC4</code></td>    <td>RC4 encryption</td>       </tr>
690 <tr><td><code>RC2</code></td>    <td>RC2 encryption</td>       </tr>
691 <tr><td><code>IDEA</code></td>   <td>IDEA encryption</td>       </tr>
692 <tr><td colspan="2"><em>MAC Digest Algorithm</em>:</td></tr>
693 <tr><td><code>MD5</code></td>    <td>MD5 hash function</td></tr>
694 <tr><td><code>SHA1</code></td>   <td>SHA1 hash function</td></tr>
695 <tr><td><code>SHA</code></td>    <td>alias for SHA1</td> </tr>
696 <tr><td><code>SHA256</code></td> <td>SHA256 hash function</td> </tr>
697 <tr><td><code>SHA384</code></td> <td>SHA384 hash function</td> </tr>
698 <tr><td colspan="2"><em>Aliases:</em></td></tr>
699 <tr><td><code>SSLv3</code></td>  <td>all SSL version 3.0 ciphers</td> </tr>
700 <tr><td><code>TLSv1</code></td>  <td>all TLS version 1.0 ciphers</td> </tr>
701 <tr><td><code>EXP</code></td>    <td>all export ciphers</td>  </tr>
702 <tr><td><code>EXPORT40</code></td> <td>all 40-bit export ciphers only</td>  </tr>
703 <tr><td><code>EXPORT56</code></td> <td>all 56-bit export ciphers only</td>  </tr>
704 <tr><td><code>LOW</code></td>    <td>all low strength ciphers (no export, single DES)</td></tr>
705 <tr><td><code>MEDIUM</code></td> <td>all ciphers with 128 bit encryption</td> </tr>
706 <tr><td><code>HIGH</code></td>   <td>all ciphers using Triple-DES</td>     </tr>
707 <tr><td><code>RSA</code></td>    <td>all ciphers using RSA key exchange</td> </tr>
708 <tr><td><code>DH</code></td>     <td>all ciphers using Diffie-Hellman key exchange</td> </tr>
709 <tr><td><code>EDH</code></td>    <td>all ciphers using Ephemeral Diffie-Hellman key exchange</td> </tr>
710 <tr><td><code>ECDH</code></td>   <td>Elliptic Curve Diffie-Hellman key exchange</td>   </tr>
711 <tr><td><code>ADH</code></td>    <td>all ciphers using Anonymous Diffie-Hellman key exchange</td> </tr>
712 <tr><td><code>AECDH</code></td>    <td>all ciphers using Anonymous Elliptic Curve Diffie-Hellman key exchange</td> </tr>
713 <tr><td><code>SRP</code></td>    <td>all ciphers using Secure Remote Password (SRP) key exchange</td> </tr>
714 <tr><td><code>DSS</code></td>    <td>all ciphers using DSS authentication</td> </tr>
715 <tr><td><code>ECDSA</code></td>    <td>all ciphers using ECDSA authentication</td> </tr>
716 <tr><td><code>aNULL</code></td>   <td>all ciphers using no authentication</td> </tr>
717 </table>
718 <p>
719 Now where this becomes interesting is that these can be put together
720 to specify the order and ciphers you wish to use. To speed this up
721 there are also aliases (<code>SSLv3, TLSv1, EXP, LOW, MEDIUM,
722 HIGH</code>) for certain groups of ciphers. These tags can be joined
723 together with prefixes to form the <em>cipher-spec</em>. Available
724 prefixes are:</p>
725 <ul>
726 <li>none: add cipher to list</li>
727 <li><code>+</code>: move matching ciphers to the current location in list</li>
728 <li><code>-</code>: remove cipher from list (can be added later again)</li>
729 <li><code>!</code>: kill cipher from list completely (can <strong>not</strong> be added later again)</li>
730 </ul>
731 <p>A simpler way to look at all of this is to use the ``<code>openssl ciphers
732 -v</code>'' command which provides a nice way to successively create the
733 correct <em>cipher-spec</em> string. The default <em>cipher-spec</em> string
734 depends on the version of the OpenSSL libraries used. Let's suppose it is
735 ``<code>RC4-SHA:AES128-SHA:HIGH:MEDIUM:!aNULL:!MD5</code>'' which
736 means the following: Put <code>RC4-SHA</code> and <code>AES128-SHA</code> at
737 the beginning. We do this, because these ciphers offer a good compromise
738 between speed and security. Next, include high and medium security ciphers.
739 Finally, remove all ciphers which do not authenticate, i.e. for SSL the
740 Anonymous Diffie-Hellman ciphers, as well as all ciphers which use
741 <code>MD5</code> as hash algorithm, because it has been proven insufficient.</p>
742 <example>
743 <pre>
744 $ openssl ciphers -v 'RC4-SHA:AES128-SHA:HIGH:MEDIUM:!aNULL:!MD5'
745 RC4-SHA                 SSLv3 Kx=RSA      Au=RSA  Enc=RC4(128)  Mac=SHA1
746 AES128-SHA              SSLv3 Kx=RSA      Au=RSA  Enc=AES(128)  Mac=SHA1
747 DHE-RSA-AES256-SHA      SSLv3 Kx=DH       Au=RSA  Enc=AES(256)  Mac=SHA1
748 ...                     ...               ...     ...           ...
749 SEED-SHA                SSLv3 Kx=RSA      Au=RSA  Enc=SEED(128) Mac=SHA1
750 PSK-RC4-SHA             SSLv3 Kx=PSK      Au=PSK  Enc=RC4(128)  Mac=SHA1
751 KRB5-RC4-SHA            SSLv3 Kx=KRB5     Au=KRB5 Enc=RC4(128)  Mac=SHA1
752 </pre>
753 </example>
754 <p>The complete list of particular RSA &amp; DH ciphers for SSL is given in <a
755 href="#table2">Table 2</a>.</p>
756 <example><title>Example</title>
757 <highlight language="config">
758 SSLCipherSuite RSA:!EXP:!NULL:+HIGH:+MEDIUM:-LOW
759 </highlight>
760 </example>
761 <table border="1">
762 <columnspec><column width=".3"/><column width=".1"/><column width=".13"/>
763 <column width=".1"/><column width=".13"/><column width=".1"/>
764 <column width=".13"/></columnspec>
765 <tr><th><a name="table2">Cipher-Tag</a></th> <th>Protocol</th> <th>Key Ex.</th> <th>Auth.</th> <th>Enc.</th> <th>MAC</th> <th>Type</th> </tr>
766 <tr><td colspan="7"><em>RSA Ciphers:</em></td></tr>
767 <tr><td><code>DES-CBC3-SHA</code></td> <td>SSLv3</td> <td>RSA</td> <td>RSA</td> <td>3DES(168)</td> <td>SHA1</td> <td></td> </tr>
768 <tr><td><code>IDEA-CBC-SHA</code></td> <td>SSLv3</td> <td>RSA</td> <td>RSA</td> <td>IDEA(128)</td> <td>SHA1</td> <td></td> </tr>
769 <tr><td><code>RC4-SHA</code></td> <td>SSLv3</td> <td>RSA</td> <td>RSA</td> <td>RC4(128)</td> <td>SHA1</td> <td></td> </tr>
770 <tr><td><code>RC4-MD5</code></td> <td>SSLv3</td> <td>RSA</td> <td>RSA</td> <td>RC4(128)</td> <td>MD5</td> <td></td> </tr>
771 <tr><td><code>DES-CBC-SHA</code></td> <td>SSLv3</td> <td>RSA</td> <td>RSA</td> <td>DES(56)</td> <td>SHA1</td> <td></td> </tr>
772 <tr><td><code>EXP-DES-CBC-SHA</code></td> <td>SSLv3</td> <td>RSA(512)</td> <td>RSA</td> <td>DES(40)</td> <td>SHA1</td> <td> export</td> </tr>
773 <tr><td><code>EXP-RC2-CBC-MD5</code></td> <td>SSLv3</td> <td>RSA(512)</td> <td>RSA</td> <td>RC2(40)</td> <td>MD5</td> <td>  export</td> </tr>
774 <tr><td><code>EXP-RC4-MD5</code></td> <td>SSLv3</td> <td>RSA(512)</td> <td>RSA</td> <td>RC4(40)</td> <td>MD5</td> <td>  export</td> </tr>
775 <tr><td><code>NULL-SHA</code></td> <td>SSLv3</td> <td>RSA</td> <td>RSA</td> <td>None</td> <td>SHA1</td> <td></td> </tr>
776 <tr><td><code>NULL-MD5</code></td> <td>SSLv3</td> <td>RSA</td> <td>RSA</td> <td>None</td> <td>MD5</td> <td></td> </tr>
777 <tr><td colspan="7"><em>Diffie-Hellman Ciphers:</em></td></tr>
778 <tr><td><code>ADH-DES-CBC3-SHA</code></td> <td>SSLv3</td> <td>DH</td> <td>None</td> <td>3DES(168)</td> <td>SHA1</td> <td></td> </tr>
779 <tr><td><code>ADH-DES-CBC-SHA</code></td> <td>SSLv3</td> <td>DH</td> <td>None</td> <td>DES(56)</td> <td>SHA1</td> <td></td> </tr>
780 <tr><td><code>ADH-RC4-MD5</code></td> <td>SSLv3</td> <td>DH</td> <td>None</td> <td>RC4(128)</td> <td>MD5</td> <td></td> </tr>
781 <tr><td><code>EDH-RSA-DES-CBC3-SHA</code></td> <td>SSLv3</td> <td>DH</td> <td>RSA</td> <td>3DES(168)</td> <td>SHA1</td> <td></td> </tr>
782 <tr><td><code>EDH-DSS-DES-CBC3-SHA</code></td> <td>SSLv3</td> <td>DH</td> <td>DSS</td> <td>3DES(168)</td> <td>SHA1</td> <td></td> </tr>
783 <tr><td><code>EDH-RSA-DES-CBC-SHA</code></td> <td>SSLv3</td> <td>DH</td> <td>RSA</td> <td>DES(56)</td> <td>SHA1</td> <td></td> </tr>
784 <tr><td><code>EDH-DSS-DES-CBC-SHA</code></td> <td>SSLv3</td> <td>DH</td> <td>DSS</td> <td>DES(56)</td> <td>SHA1</td> <td></td> </tr>
785 <tr><td><code>EXP-EDH-RSA-DES-CBC-SHA</code></td> <td>SSLv3</td> <td>DH(512)</td> <td>RSA</td> <td>DES(40)</td> <td>SHA1</td> <td> export</td> </tr>
786 <tr><td><code>EXP-EDH-DSS-DES-CBC-SHA</code></td> <td>SSLv3</td> <td>DH(512)</td> <td>DSS</td> <td>DES(40)</td> <td>SHA1</td> <td> export</td> </tr>
787 <tr><td><code>EXP-ADH-DES-CBC-SHA</code></td> <td>SSLv3</td> <td>DH(512)</td> <td>None</td> <td>DES(40)</td> <td>SHA1</td> <td> export</td> </tr>
788 <tr><td><code>EXP-ADH-RC4-MD5</code></td> <td>SSLv3</td> <td>DH(512)</td> <td>None</td> <td>RC4(40)</td> <td>MD5</td> <td>  export</td> </tr>
789 </table>
790 </usage>
791 </directivesynopsis>
792
793 <directivesynopsis>
794 <name>SSLCertificateFile</name>
795 <description>Server PEM-encoded X.509 Certificate file</description>
796 <syntax>SSLCertificateFile <em>file-path</em></syntax>
797 <contextlist><context>server config</context>
798 <context>virtual host</context></contextlist>
799
800 <usage>
801 <p>
802 This directive points to the PEM-encoded Certificate file for the server and
803 optionally also to the corresponding RSA or DSA Private Key file for it
804 (contained in the same file). If the contained Private Key is encrypted the
805 Pass Phrase dialog is forced at startup time. This directive can be used up to
806 three times (referencing different filenames) when both a RSA, a DSA, and an
807 ECC based server certificate is used in parallel.</p>
808 <example><title>Example</title>
809 <highlight language="config">
810 SSLCertificateFile /usr/local/apache2/conf/ssl.crt/server.crt
811 </highlight>
812 </example>
813 </usage>
814 </directivesynopsis>
815
816 <directivesynopsis>
817 <name>SSLCertificateKeyFile</name>
818 <description>Server PEM-encoded Private Key file</description>
819 <syntax>SSLCertificateKeyFile <em>file-path</em></syntax>
820 <contextlist><context>server config</context>
821 <context>virtual host</context></contextlist>
822
823 <usage>
824 <p>
825 This directive points to the PEM-encoded Private Key file for the
826 server. If the Private Key is not combined with the Certificate in the
827 <directive>SSLCertificateFile</directive>, use this additional directive to
828 point to the file with the stand-alone Private Key. When
829 <directive>SSLCertificateFile</directive> is used and the file
830 contains both the Certificate and the Private Key this directive need
831 not be used. But we strongly discourage this practice.  Instead we
832 recommend you to separate the Certificate and the Private Key. If the
833 contained Private Key is encrypted, the Pass Phrase dialog is forced
834 at startup time. This directive can be used up to three times
835 (referencing different filenames) when both a RSA, a DSA, and an ECC based
836 private key is used in parallel.</p>
837 <example><title>Example</title>
838 <highlight language="config">
839 SSLCertificateKeyFile /usr/local/apache2/conf/ssl.key/server.key
840 </highlight>
841 </example>
842 </usage>
843 </directivesynopsis>
844
845 <directivesynopsis>
846 <name>SSLCertificateChainFile</name>
847 <description>File of PEM-encoded Server CA Certificates</description>
848 <syntax>SSLCertificateChainFile <em>file-path</em></syntax>
849 <contextlist><context>server config</context>
850 <context>virtual host</context></contextlist>
851
852 <usage>
853 <p>
854 This directive sets the optional <em>all-in-one</em> file where you can
855 assemble the certificates of Certification Authorities (CA) which form the
856 certificate chain of the server certificate. This starts with the issuing CA
857 certificate of the server certificate and can range up to the root CA
858 certificate. Such a file is simply the concatenation of the various
859 PEM-encoded CA Certificate files, usually in certificate chain order.</p>
860 <p>
861 This should be used alternatively and/or additionally to <directive
862 module="mod_ssl">SSLCACertificatePath</directive> for explicitly
863 constructing the server certificate chain which is sent to the browser
864 in addition to the server certificate. It is especially useful to
865 avoid conflicts with CA certificates when using client
866 authentication. Because although placing a CA certificate of the
867 server certificate chain into <directive
868 module="mod_ssl">SSLCACertificatePath</directive> has the same effect
869 for the certificate chain construction, it has the side-effect that
870 client certificates issued by this same CA certificate are also
871 accepted on client authentication.</p>
872 <p>
873 But be careful: Providing the certificate chain works only if you are using a
874 <em>single</em> RSA <em>or</em> DSA based server certificate. If you are
875 using a coupled RSA+DSA certificate pair, this will work only if actually both
876 certificates use the <em>same</em> certificate chain. Else the browsers will be
877 confused in this situation.</p>
878 <example><title>Example</title>
879 <highlight language="config">
880 SSLCertificateChainFile /usr/local/apache2/conf/ssl.crt/ca.crt
881 </highlight>
882 </example>
883 </usage>
884 </directivesynopsis>
885
886 <directivesynopsis>
887 <name>SSLCACertificatePath</name>
888 <description>Directory of PEM-encoded CA Certificates for
889 Client Auth</description>
890 <syntax>SSLCACertificatePath <em>directory-path</em></syntax>
891 <contextlist><context>server config</context>
892 <context>virtual host</context></contextlist>
893
894 <usage>
895 <p>
896 This directive sets the directory where you keep the Certificates of
897 Certification Authorities (CAs) whose clients you deal with. These are used to
898 verify the client certificate on Client Authentication.</p>
899 <p>
900 The files in this directory have to be PEM-encoded and are accessed through
901 hash filenames. So usually you can't just place the Certificate files
902 there: you also have to create symbolic links named
903 <em>hash-value</em><code>.N</code>. And you should always make sure this directory
904 contains the appropriate symbolic links.</p>
905 <example><title>Example</title>
906 <highlight language="config">
907 SSLCACertificatePath /usr/local/apache2/conf/ssl.crt/
908 </highlight>
909 </example>
910 </usage>
911 </directivesynopsis>
912
913 <directivesynopsis>
914 <name>SSLCACertificateFile</name>
915 <description>File of concatenated PEM-encoded CA Certificates
916 for Client Auth</description>
917 <syntax>SSLCACertificateFile <em>file-path</em></syntax>
918 <contextlist><context>server config</context>
919 <context>virtual host</context></contextlist>
920
921 <usage>
922 <p>
923 This directive sets the <em>all-in-one</em> file where you can assemble the
924 Certificates of Certification Authorities (CA) whose <em>clients</em> you deal
925 with. These are used for Client Authentication. Such a file is simply the
926 concatenation of the various PEM-encoded Certificate files, in order of
927 preference. This can be used alternatively and/or additionally to
928 <directive module="mod_ssl">SSLCACertificatePath</directive>.</p>
929 <example><title>Example</title>
930 <highlight language="config">
931 SSLCACertificateFile /usr/local/apache2/conf/ssl.crt/ca-bundle-client.crt
932 </highlight>
933 </example>
934 </usage>
935 </directivesynopsis>
936
937 <directivesynopsis>
938 <name>SSLCADNRequestFile</name>
939 <description>File of concatenated PEM-encoded CA Certificates
940 for defining acceptable CA names</description>
941 <syntax>SSLCADNRequestFile <em>file-path</em></syntax>
942 <contextlist><context>server config</context>
943 <context>virtual host</context></contextlist>
944
945 <usage>
946 <p>When a client certificate is requested by mod_ssl, a list of
947 <em>acceptable Certificate Authority names</em> is sent to the client
948 in the SSL handshake.  These CA names can be used by the client to
949 select an appropriate client certificate out of those it has
950 available.</p>
951
952 <p>If neither of the directives <directive
953 module="mod_ssl">SSLCADNRequestPath</directive> or <directive
954 module="mod_ssl">SSLCADNRequestFile</directive> are given, then the
955 set of acceptable CA names sent to the client is the names of all the
956 CA certificates given by the <directive
957 module="mod_ssl">SSLCACertificateFile</directive> and <directive
958 module="mod_ssl">SSLCACertificatePath</directive> directives; in other
959 words, the names of the CAs which will actually be used to verify the
960 client certificate.</p>
961
962 <p>In some circumstances, it is useful to be able to send a set of
963 acceptable CA names which differs from the actual CAs used to verify
964 the client certificate - for example, if the client certificates are
965 signed by intermediate CAs.  In such cases, <directive
966 module="mod_ssl">SSLCADNRequestPath</directive> and/or <directive
967 module="mod_ssl">SSLCADNRequestFile</directive> can be used; the
968 acceptable CA names are then taken from the complete set of
969 certificates in the directory and/or file specified by this pair of
970 directives.</p>
971
972 <p><directive module="mod_ssl">SSLCADNRequestFile</directive> must
973 specify an <em>all-in-one</em> file containing a concatenation of
974 PEM-encoded CA certificates.</p>
975
976 <example><title>Example</title>
977 <highlight language="config">
978 SSLCADNRequestFile /usr/local/apache2/conf/ca-names.crt
979 </highlight>
980 </example>
981 </usage>
982 </directivesynopsis>
983
984 <directivesynopsis>
985 <name>SSLCADNRequestPath</name>
986 <description>Directory of PEM-encoded CA Certificates for
987 defining acceptable CA names</description>
988 <syntax>SSLCADNRequestPath <em>directory-path</em></syntax>
989 <contextlist><context>server config</context>
990 <context>virtual host</context></contextlist>
991
992 <usage>
993
994 <p>This optional directive can be used to specify the set of
995 <em>acceptable CA names</em> which will be sent to the client when a
996 client certificate is requested.  See the <directive
997 module="mod_ssl">SSLCADNRequestFile</directive> directive for more
998 details.</p>
999
1000 <p>The files in this directory have to be PEM-encoded and are accessed
1001 through hash filenames. So usually you can't just place the
1002 Certificate files there: you also have to create symbolic links named
1003 <em>hash-value</em><code>.N</code>. And you should always make sure
1004 this directory contains the appropriate symbolic links.</p>
1005 <example><title>Example</title>
1006 <highlight language="config">
1007 SSLCADNRequestPath /usr/local/apache2/conf/ca-names.crt/
1008 </highlight>
1009 </example>
1010 </usage>
1011 </directivesynopsis>
1012
1013 <directivesynopsis>
1014 <name>SSLCARevocationPath</name>
1015 <description>Directory of PEM-encoded CA CRLs for
1016 Client Auth</description>
1017 <syntax>SSLCARevocationPath <em>directory-path</em></syntax>
1018 <contextlist><context>server config</context>
1019 <context>virtual host</context></contextlist>
1020
1021 <usage>
1022 <p>
1023 This directive sets the directory where you keep the Certificate Revocation
1024 Lists (CRL) of Certification Authorities (CAs) whose clients you deal with.
1025 These are used to revoke the client certificate on Client Authentication.</p>
1026 <p>
1027 The files in this directory have to be PEM-encoded and are accessed through
1028 hash filenames. So usually you have not only to place the CRL files there.
1029 Additionally you have to create symbolic links named
1030 <em>hash-value</em><code>.rN</code>. And you should always make sure this directory
1031 contains the appropriate symbolic links.</p>
1032 <example><title>Example</title>
1033 <highlight language="config">
1034 SSLCARevocationPath /usr/local/apache2/conf/ssl.crl/
1035 </highlight>
1036 </example>
1037 </usage>
1038 </directivesynopsis>
1039
1040 <directivesynopsis>
1041 <name>SSLCARevocationFile</name>
1042 <description>File of concatenated PEM-encoded CA CRLs for
1043 Client Auth</description>
1044 <syntax>SSLCARevocationFile <em>file-path</em></syntax>
1045 <contextlist><context>server config</context>
1046 <context>virtual host</context></contextlist>
1047
1048 <usage>
1049 <p>
1050 This directive sets the <em>all-in-one</em> file where you can
1051 assemble the Certificate Revocation Lists (CRL) of Certification
1052 Authorities (CA) whose <em>clients</em> you deal with. These are used
1053 for Client Authentication.  Such a file is simply the concatenation of
1054 the various PEM-encoded CRL files, in order of preference. This can be
1055 used alternatively and/or additionally to <directive
1056 module="mod_ssl">SSLCARevocationPath</directive>.</p>
1057 <example><title>Example</title>
1058 <highlight language="config">
1059 SSLCARevocationFile /usr/local/apache2/conf/ssl.crl/ca-bundle-client.crl
1060 </highlight>
1061 </example>
1062 </usage>
1063 </directivesynopsis>
1064
1065 <directivesynopsis>
1066 <name>SSLCARevocationCheck</name>
1067 <description>Enable CRL-based revocation checking</description>
1068 <syntax>SSLCARevocationCheck chain|leaf|none</syntax>
1069 <default>SSLCARevocationCheck none</default>
1070 <contextlist><context>server config</context>
1071 <context>virtual host</context></contextlist>
1072
1073 <usage>
1074 <p>
1075 Enables certificate revocation list (CRL) checking. At least one of
1076 <directive module="mod_ssl">SSLCARevocationFile</directive>
1077 or <directive module="mod_ssl">SSLCARevocationPath</directive> must be
1078 configured. When set to <code>chain</code> (recommended setting),
1079 CRL checks are applied to all certificates in the chain, while setting it to
1080 <code>leaf</code> limits the checks to the end-entity cert.
1081 </p>
1082 <note>
1083 <title>When set to <code>chain</code> or <code>leaf</code>,
1084 CRLs <em>must</em> be available for successful validation</title>
1085 <p>
1086 Prior to version 2.3.15, CRL checking in mod_ssl also succeeded when
1087 no CRL(s) were found in any of the locations configured with
1088 <directive module="mod_ssl">SSLCARevocationFile</directive>
1089 or <directive module="mod_ssl">SSLCARevocationPath</directive>.
1090 With the introduction of this directive, the behavior has been changed:
1091 when checking is enabled, CRLs <em>must</em> be present for the validation
1092 to succeed - otherwise it will fail with an
1093 <code>"unable to get certificate CRL"</code> error.
1094 </p>
1095 </note>
1096 <example><title>Example</title>
1097 <highlight language="config">
1098 SSLCARevocationCheck chain
1099 </highlight>
1100 </example>
1101 </usage>
1102 </directivesynopsis>
1103
1104 <directivesynopsis>
1105 <name>SSLVerifyClient</name>
1106 <description>Type of Client Certificate verification</description>
1107 <syntax>SSLVerifyClient <em>level</em></syntax>
1108 <default>SSLVerifyClient none</default>
1109 <contextlist><context>server config</context>
1110 <context>virtual host</context>
1111 <context>directory</context>
1112 <context>.htaccess</context></contextlist>
1113 <override>AuthConfig</override>
1114
1115 <usage>
1116 <p>
1117 This directive sets the Certificate verification level for the Client
1118 Authentication. Notice that this directive can be used both in per-server and
1119 per-directory context. In per-server context it applies to the client
1120 authentication process used in the standard SSL handshake when a connection is
1121 established. In per-directory context it forces a SSL renegotiation with the
1122 reconfigured client verification level after the HTTP request was read but
1123 before the HTTP response is sent.</p>
1124 <p>
1125 The following levels are available for <em>level</em>:</p>
1126 <ul>
1127 <li><strong>none</strong>:
1128      no client Certificate is required at all</li>
1129 <li><strong>optional</strong>:
1130      the client <em>may</em> present a valid Certificate</li>
1131 <li><strong>require</strong>:
1132      the client <em>has to</em> present a valid Certificate</li>
1133 <li><strong>optional_no_ca</strong>:
1134      the client may present a valid Certificate<br />
1135      but it need not to be (successfully) verifiable.</li>
1136 </ul>
1137 <p>In practice only levels <strong>none</strong> and
1138 <strong>require</strong> are really interesting, because level
1139 <strong>optional</strong> doesn't work with all browsers and level
1140 <strong>optional_no_ca</strong> is actually against the idea of
1141 authentication (but can be used to establish SSL test pages, etc.)</p>
1142 <example><title>Example</title>
1143 <highlight language="config">
1144 SSLVerifyClient require
1145 </highlight>
1146 </example>
1147 </usage>
1148 </directivesynopsis>
1149
1150 <directivesynopsis>
1151 <name>SSLVerifyDepth</name>
1152 <description>Maximum depth of CA Certificates in Client
1153 Certificate verification</description>
1154 <syntax>SSLVerifyDepth <em>number</em></syntax>
1155 <default>SSLVerifyDepth 1</default>
1156 <contextlist><context>server config</context>
1157 <context>virtual host</context>
1158 <context>directory</context>
1159 <context>.htaccess</context></contextlist>
1160 <override>AuthConfig</override>
1161
1162 <usage>
1163 <p>
1164 This directive sets how deeply mod_ssl should verify before deciding that the
1165 clients don't have a valid certificate. Notice that this directive can be
1166 used both in per-server and per-directory context. In per-server context it
1167 applies to the client authentication process used in the standard SSL
1168 handshake when a connection is established. In per-directory context it forces
1169 a SSL renegotiation with the reconfigured client verification depth after the
1170 HTTP request was read but before the HTTP response is sent.</p>
1171 <p>
1172 The depth actually is the maximum number of intermediate certificate issuers,
1173 i.e. the number of CA certificates which are max allowed to be followed while
1174 verifying the client certificate. A depth of 0 means that self-signed client
1175 certificates are accepted only, the default depth of 1 means the client
1176 certificate can be self-signed or has to be signed by a CA which is directly
1177 known to the server (i.e. the CA's certificate is under
1178 <directive module="mod_ssl">SSLCACertificatePath</directive>), etc.</p>
1179 <example><title>Example</title>
1180 <highlight language="config">
1181 SSLVerifyDepth 10
1182 </highlight>
1183 </example>
1184 </usage>
1185 </directivesynopsis>
1186
1187 <directivesynopsis>
1188 <name>SSLSRPVerifierFile</name>
1189 <description>Path to SRP verifier file</description>
1190 <syntax>SSLSRPVerifierFile <em>file-path</em></syntax>
1191 <contextlist><context>server config</context>
1192 <context>virtual host</context></contextlist>
1193
1194 <usage>
1195 <p>
1196 This directive enables TLS-SRP and sets the path to the OpenSSL SRP (Secure
1197 Remote Password) verifier file containing TLS-SRP usernames, verifiers, salts,
1198 and group parameters.</p>
1199 <example><title>Example</title>
1200 SSLSRPVerifierFile "/path/to/file.srpv"
1201 </example>
1202 <p>
1203 The verifier file can be created with the <code>openssl</code> command line
1204 utility:</p>
1205 <example><title>Creating the SRP verifier file</title>
1206 openssl srp -srpvfile passwd.srpv -userinfo "some info" -add username
1207 </example>
1208 <p> The value given with the optional <code>-userinfo</code> parameter is
1209 avalable in the <code>SSL_SRP_USERINFO</code> request environment variable.</p>
1210
1211 </usage>
1212 </directivesynopsis>
1213
1214 <directivesynopsis>
1215 <name>SSLSRPUnknownUserSeed</name>
1216 <description>SRP unknown user seed</description>
1217 <syntax>SSLSRPUnknownUserSeed <em>secret-string</em></syntax>
1218 <contextlist><context>server config</context>
1219 <context>virtual host</context></contextlist>
1220
1221 <usage>
1222 <p>
1223 This directive sets the seed used to fake SRP user parameters for unknown
1224 users, to avoid leaking whether a given user exists. Specify a secret
1225 string. If this directive is not used, then Apache will return the
1226 UNKNOWN_PSK_IDENTITY alert to clients who specify an unknown username.
1227 </p>
1228 <example><title>Example</title>
1229 SSLSRPUnknownUserSeed "secret"
1230 </example>
1231 </usage>
1232 </directivesynopsis>
1233
1234 <directivesynopsis>
1235 <name>SSLOptions</name>
1236 <description>Configure various SSL engine run-time options</description>
1237 <syntax>SSLOptions [+|-]<em>option</em> ...</syntax>
1238 <contextlist><context>server config</context>
1239 <context>virtual host</context>
1240 <context>directory</context>
1241 <context>.htaccess</context></contextlist>
1242 <override>Options</override>
1243
1244 <usage>
1245 <p>
1246 This directive can be used to control various run-time options on a
1247 per-directory basis. Normally, if multiple <code>SSLOptions</code>
1248 could apply to a directory, then the most specific one is taken
1249 completely; the options are not merged. However if <em>all</em> the
1250 options on the <code>SSLOptions</code> directive are preceded by a
1251 plus (<code>+</code>) or minus (<code>-</code>) symbol, the options
1252 are merged. Any options preceded by a <code>+</code> are added to the
1253 options currently in force, and any options preceded by a
1254 <code>-</code> are removed from the options currently in force.</p>
1255 <p>
1256 The available <em>option</em>s are:</p>
1257 <ul>
1258 <li><code>StdEnvVars</code>
1259     <p>
1260     When this option is enabled, the standard set of SSL related CGI/SSI
1261     environment variables are created. This per default is disabled for
1262     performance reasons, because the information extraction step is a
1263     rather expensive operation. So one usually enables this option for
1264     CGI and SSI requests only.</p>
1265 </li>
1266 <li><code>ExportCertData</code>
1267     <p>
1268     When this option is enabled, additional CGI/SSI environment variables are
1269     created: <code>SSL_SERVER_CERT</code>, <code>SSL_CLIENT_CERT</code> and
1270     <code>SSL_CLIENT_CERT_CHAIN_</code><em>n</em> (with <em>n</em> = 0,1,2,..).
1271     These contain the PEM-encoded X.509 Certificates of server and client for
1272     the current HTTPS connection and can be used by CGI scripts for deeper
1273     Certificate checking. Additionally all other certificates of the client
1274     certificate chain are provided, too. This bloats up the environment a
1275     little bit which is why you have to use this option to enable it on
1276     demand.</p>
1277 </li>
1278 <li><code>FakeBasicAuth</code>
1279     <p>
1280     When this option is enabled, the Subject Distinguished Name (DN) of the
1281     Client X509 Certificate is translated into a HTTP Basic Authorization
1282     username. This means that the standard Apache authentication methods can
1283     be used for access control. The user name is just the Subject of the
1284     Client's X509 Certificate (can be determined by running OpenSSL's
1285     <code>openssl x509</code> command: <code>openssl x509 -noout -subject -in
1286     </code><em>certificate</em><code>.crt</code>). The optional <directive
1287     module="mod_ssl">SSLUserName</directive> directive can be used to
1288     specify which part of the certificate Subject is embedded in the username.
1289     Note that no password is obtained from the user. Every entry in the user
1290     file needs this password: ``<code>xxj31ZMTZzkVA</code>'', which is the
1291     DES-encrypted version of the word `<code>password</code>''. Those who
1292     live under MD5-based encryption (for instance under FreeBSD or BSD/OS,
1293     etc.) should use the following MD5 hash of the same word:
1294      ``<code>$1$OXLyS...$Owx8s2/m9/gfkcRVXzgoE/</code>''.</p>
1295
1296     <p>Note that the <directive module="mod_auth_basic">AuthBasicFake</directive>
1297     directive within <module>mod_auth_basic</module> can be used as a more
1298     general mechanism for faking basic authentication, giving control over the
1299     structure of both the username and password.</p>
1300 </li>
1301 <li><code>StrictRequire</code>
1302     <p>
1303     This <em>forces</em> forbidden access when <code>SSLRequireSSL</code> or
1304     <code>SSLRequire</code> successfully decided that access should be
1305     forbidden. Usually the default is that in the case where a ``<code>Satisfy
1306     any</code>'' directive is used, and other access restrictions are passed,
1307     denial of access due to <code>SSLRequireSSL</code> or
1308     <code>SSLRequire</code> is overridden (because that's how the Apache
1309     <code>Satisfy</code> mechanism should work.) But for strict access restriction
1310     you can use <code>SSLRequireSSL</code> and/or <code>SSLRequire</code> in
1311     combination with an ``<code>SSLOptions +StrictRequire</code>''. Then an
1312     additional ``<code>Satisfy Any</code>'' has no chance once mod_ssl has
1313     decided to deny access.</p>
1314 </li>
1315 <li><code>OptRenegotiate</code>
1316     <p>
1317     This enables optimized SSL connection renegotiation handling when SSL
1318     directives are used in per-directory context. By default a strict
1319     scheme is enabled where <em>every</em> per-directory reconfiguration of
1320     SSL parameters causes a <em>full</em> SSL renegotiation handshake. When this
1321     option is used mod_ssl tries to avoid unnecessary handshakes by doing more
1322     granular (but still safe) parameter checks. Nevertheless these granular
1323     checks sometimes maybe not what the user expects, so enable this on a
1324     per-directory basis only, please.</p>
1325 </li>
1326 <li><code>LegacyDNStringFormat</code>
1327     <p>
1328     This option influences how values of the
1329     <code>SSL_{CLIENT,SERVER}_{I,S}_DN</code> variables are formatted. Since
1330     version 2.3.11, Apache HTTPD uses a RFC 2253 compatible format by
1331     default. This uses commas as delimiters between the attributes, allows the
1332     use of non-ASCII characters (which are converted to UTF8), escapes
1333     various special characters with backslashes, and sorts the attributes
1334     with the "C" attribute last.</p>
1335
1336     <p>If <code>LegacyDNStringFormat</code> is set, the old format will be
1337     used which sorts the "C" attribute first, uses slashes as separators, and
1338     does not handle non-ASCII and special characters in any consistent way.
1339     </p>
1340 </li>
1341 </ul>
1342 <example><title>Example</title>
1343 <highlight language="config">
1344 SSLOptions +FakeBasicAuth -StrictRequire
1345 &lt;Files ~ "\.(cgi|shtml)$"&gt;
1346     SSLOptions +StdEnvVars -ExportCertData
1347 &lt;Files&gt;
1348 </highlight>
1349 </example>
1350 </usage>
1351 </directivesynopsis>
1352
1353 <directivesynopsis>
1354 <name>SSLRequireSSL</name>
1355 <description>Deny access when SSL is not used for the
1356 HTTP request</description>
1357 <syntax>SSLRequireSSL</syntax>
1358 <contextlist><context>directory</context>
1359 <context>.htaccess</context></contextlist>
1360 <override>AuthConfig</override>
1361
1362 <usage>
1363 <p><!-- XXX: I think the syntax is wrong -->
1364 This directive forbids access unless HTTP over SSL (i.e. HTTPS) is enabled for
1365 the current connection. This is very handy inside the SSL-enabled virtual
1366 host or directories for defending against configuration errors that expose
1367 stuff that should be protected. When this directive is present all requests
1368 are denied which are not using SSL.</p>
1369 <example><title>Example</title>
1370 <highlight language="config">
1371 SSLRequireSSL
1372 </highlight>
1373 </example>
1374 </usage>
1375 </directivesynopsis>
1376
1377 <directivesynopsis>
1378 <name>SSLRequire</name>
1379 <description>Allow access only when an arbitrarily complex
1380 boolean expression is true</description>
1381 <syntax>SSLRequire <em>expression</em></syntax>
1382 <contextlist><context>directory</context>
1383 <context>.htaccess</context></contextlist>
1384 <override>AuthConfig</override>
1385
1386 <usage>
1387
1388 <note><title>SSLRequire is deprecated</title>
1389 <p><code>SSLRequire</code> is deprecated and should in general be replaced
1390 by <a href="mod_authz_core.html#reqexpr">Require expr</a>. The so called
1391 <a href="../expr.html">ap_expr</a> syntax of <code>Require expr</code> is
1392 a superset of the syntax of <code>SSLRequire</code>, with the following
1393 exception:</p>
1394
1395 <p>In <code>SSLRequire</code>, the comparison operators <code>&lt;</code>,
1396 <code>&lt;=</code>, ... are completely equivalent to the operators
1397 <code>lt</code>, <code>le</code>, ... and work in a somewhat peculiar way that
1398 first compares the length of two strings and then the lexical order.
1399 On the other hand, <a href="../expr.html">ap_expr</a> has two sets of
1400 comparison operators: The operators <code>&lt;</code>,
1401 <code>&lt;=</code>, ... do lexical string comparison, while the operators
1402 <code>-lt</code>, <code>-le</code>, ... do integer comparison.
1403 For the latter, there are also aliases without the leading dashes:
1404 <code>lt</code>, <code>le</code>, ...
1405 </p>
1406
1407 </note>
1408
1409 <p>
1410 This directive specifies a general access requirement which has to be
1411 fulfilled in order to allow access. It is a very powerful directive because the
1412 requirement specification is an arbitrarily complex boolean expression
1413 containing any number of access checks.</p>
1414 <p>
1415 The <em>expression</em> must match the following syntax (given as a BNF
1416 grammar notation):</p>
1417 <blockquote>
1418 <pre>
1419 expr     ::= "<strong>true</strong>" | "<strong>false</strong>"
1420            | "<strong>!</strong>" expr
1421            | expr "<strong>&amp;&amp;</strong>" expr
1422            | expr "<strong>||</strong>" expr
1423            | "<strong>(</strong>" expr "<strong>)</strong>"
1424            | comp
1425
1426 comp     ::= word "<strong>==</strong>" word | word "<strong>eq</strong>" word
1427            | word "<strong>!=</strong>" word | word "<strong>ne</strong>" word
1428            | word "<strong>&lt;</strong>"  word | word "<strong>lt</strong>" word
1429            | word "<strong>&lt;=</strong>" word | word "<strong>le</strong>" word
1430            | word "<strong>&gt;</strong>"  word | word "<strong>gt</strong>" word
1431            | word "<strong>&gt;=</strong>" word | word "<strong>ge</strong>" word
1432            | word "<strong>in</strong>" "<strong>{</strong>" wordlist "<strong>}</strong>"
1433            | word "<strong>in</strong>" "<strong>PeerExtList(</strong>" word "<strong>)</strong>"
1434            | word "<strong>=~</strong>" regex
1435            | word "<strong>!~</strong>" regex
1436
1437 wordlist ::= word
1438            | wordlist "<strong>,</strong>" word
1439
1440 word     ::= digit
1441            | cstring
1442            | variable
1443            | function
1444
1445 digit    ::= [0-9]+
1446 cstring  ::= "..."
1447 variable ::= "<strong>%{</strong>" varname "<strong>}</strong>"
1448 function ::= funcname "<strong>(</strong>" funcargs "<strong>)</strong>"
1449 </pre>
1450 </blockquote>
1451 <p>For <code>varname</code> any of the variables described in <a
1452 href="#envvars">Environment Variables</a> can be used.  For
1453 <code>funcname</code> the available functions are listed in
1454 the <a href="../expr.html#functions">ap_expr documentation</a>.</p>
1455
1456 <p>The <em>expression</em> is parsed into an internal machine
1457 representation when the configuration is loaded, and then evaluated 
1458 during request processing.  In .htaccess context, the <em>expression</em> is 
1459 both parsed and executed each time the .htaccess file is encountered during 
1460 request processing.</p>
1461
1462 <example><title>Example</title>
1463 <highlight language="config">
1464 SSLRequire (    %{SSL_CIPHER} !~ m/^(EXP|NULL)-/                   \
1465             and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd."          \
1466             and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"}    \
1467             and %{TIME_WDAY} -ge 1 and %{TIME_WDAY} -le 5          \
1468             and %{TIME_HOUR} -ge 8 and %{TIME_HOUR} -le 20       ) \
1469            or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/
1470 </highlight>
1471 </example>
1472
1473 <p>The <code>PeerExtList(<em>object-ID</em>)</code> function expects
1474 to find zero or more instances of the X.509 certificate extension
1475 identified by the given <em>object ID</em> (OID) in the client certificate.
1476 The expression evaluates to true if the left-hand side string matches
1477 exactly against the value of an extension identified with this OID.
1478 (If multiple extensions with the same OID are present, at least one
1479 extension must match).</p>
1480
1481 <example><title>Example</title>
1482 <highlight language="config">
1483 SSLRequire "foobar" in PeerExtList("1.2.3.4.5.6")
1484 </highlight>
1485 </example>
1486
1487 <note><title>Notes on the PeerExtList function</title>
1488
1489 <ul>
1490
1491 <li><p>The object ID can be specified either as a descriptive
1492 name recognized by the SSL library, such as <code>"nsComment"</code>,
1493 or as a numeric OID, such as <code>"1.2.3.4.5.6"</code>.</p></li>
1494
1495 <li><p>Expressions with types known to the SSL library are rendered to
1496 a string before comparison.  For an extension with a type not
1497 recognized by the SSL library, mod_ssl will parse the value if it is
1498 one of the primitive ASN.1 types UTF8String, IA5String, VisibleString,
1499 or BMPString.  For an extension of one of these types, the string
1500 value will be converted to UTF-8 if necessary, then compared against
1501 the left-hand-side expression.</p></li>
1502
1503 </ul>
1504 </note>
1505
1506 </usage>
1507 <seealso><a href="../env.html">Environment Variables in Apache HTTP Server</a>,
1508 for additional examples.
1509 </seealso>
1510 <seealso><a href="mod_authz_core.html#reqexpr">Require expr</a></seealso>
1511 <seealso><a href="../expr.html">Generic expression syntax in Apache HTTP Server</a>
1512 </seealso>
1513 </directivesynopsis>
1514
1515 <directivesynopsis>
1516 <name>SSLRenegBufferSize</name>
1517 <description>Set the size for the SSL renegotiation buffer</description>
1518 <syntax>SSLRenegBufferSize <var>bytes</var></syntax>
1519 <default>SSLRenegBufferSize 131072</default>
1520 <contextlist><context>directory</context>
1521 <context>.htaccess</context></contextlist>
1522 <override>AuthConfig</override>
1523
1524 <usage>
1525
1526 <p>If an SSL renegotiation is required in per-location context, for
1527 example, any use of <directive
1528 module="mod_ssl">SSLVerifyClient</directive> in a Directory or
1529 Location block, then <module>mod_ssl</module> must buffer any HTTP
1530 request body into memory until the new SSL handshake can be performed.
1531 This directive can be used to set the amount of memory that will be
1532 used for this buffer. </p>
1533
1534 <note type="warning"><p>
1535 Note that in many configurations, the client sending the request body
1536 will be untrusted so a denial of service attack by consumption of
1537 memory must be considered when changing this configuration setting.
1538 </p></note>
1539
1540 <example><title>Example</title>
1541 <highlight language="config">
1542 SSLRenegBufferSize 262144
1543 </highlight>
1544 </example>
1545 </usage>
1546 </directivesynopsis>
1547
1548 <directivesynopsis>
1549 <name>SSLStrictSNIVHostCheck</name>
1550 <description>Whether to allow non-SNI clients to access a name-based virtual
1551 host.
1552 </description>
1553 <syntax>SSLStrictSNIVHostCheck on|off</syntax>
1554 <default>SSLStrictSNIVHostCheck off</default>
1555 <contextlist><context>server config</context>
1556 <context>virtual host</context></contextlist>
1557
1558 <usage>
1559 <p>
1560 This directive sets whether a non-SNI client is allowed to access a name-based
1561 virtual host. If set to <code>on</code> in the default name-based virtual
1562 host, clients that are SNI unaware will not be allowed to access <em>any</em>
1563 virtual host, belonging to this particular IP / port combination.
1564 If set to <code>on</code> in any other virtual host, SNI unaware clients
1565 are not allowed to access this particular virtual host.
1566 </p>
1567
1568 <note type="warning"><p>
1569 This option is only available if httpd was compiled against an SNI capable
1570 version of OpenSSL.
1571 </p></note>
1572
1573 <example><title>Example</title>
1574 <highlight language="config">
1575 SSLStrictSNIVHostCheck on
1576 </highlight>
1577 </example>
1578 </usage>
1579 </directivesynopsis>
1580
1581 <directivesynopsis>
1582 <name>SSLProxyMachineCertificatePath</name>
1583 <description>Directory of PEM-encoded client certificates and keys to be used by the proxy</description>
1584 <syntax>SSLProxyMachineCertificatePath <em>directory</em></syntax>
1585 <contextlist><context>server config</context></contextlist>
1586 <override>Not applicable</override>
1587
1588 <usage>
1589 <p>
1590 This directive sets the directory where you keep the certificates and
1591 keys used for authentication of the proxy server to remote servers.
1592 </p>
1593 <p>The files in this directory must be PEM-encoded and are accessed through
1594 hash filenames. Additionally, you must create symbolic links named
1595 <code><em>hash-value</em>.N</code>. And you should always make sure this
1596 directory contains the appropriate symbolic links.</p>
1597 <note type="warning">
1598 <p>Currently there is no support for encrypted private keys</p>
1599 </note>
1600 <example><title>Example</title>
1601 <highlight language="config">
1602 SSLProxyMachineCertificatePath /usr/local/apache2/conf/proxy.crt/
1603 </highlight>
1604 </example>
1605 </usage>
1606 </directivesynopsis>
1607
1608
1609 <directivesynopsis>
1610 <name>SSLProxyMachineCertificateFile</name>
1611 <description>File of concatenated PEM-encoded client certificates and keys to be used by the proxy</description>
1612 <syntax>SSLProxyMachineCertificateFile <em>filename</em></syntax>
1613 <contextlist><context>server config</context></contextlist>
1614 <override>Not applicable</override>
1615
1616 <usage>
1617 <p>
1618 This directive sets the all-in-one file where you keep the certificates and
1619 keys used for authentication of the proxy server to remote servers.
1620 </p>
1621 <p>
1622 This referenced file is simply the concatenation of the various PEM-encoded
1623 certificate files, in order of preference. Use this directive alternatively
1624 or additionally to <code>SSLProxyMachineCertificatePath</code>.
1625 </p>
1626 <note type="warning">
1627 <p>Currently there is no support for encrypted private keys</p>
1628 </note>
1629 <example><title>Example</title>
1630 <highlight language="config">
1631 SSLProxyMachineCertificateFile /usr/local/apache2/conf/ssl.crt/proxy.pem
1632 </highlight>
1633 </example>
1634 </usage>
1635 </directivesynopsis>
1636
1637 <directivesynopsis>
1638 <name>SSLProxyMachineCertificateChainFile</name>
1639 <description>File of concatenated PEM-encoded CA certificates to be used by the proxy for choosing a certificate</description>
1640 <syntax>SSLProxyMachineCertificateChainFile <em>filename</em></syntax>
1641 <contextlist><context>server config</context></contextlist>
1642 <override>Not applicable</override>
1643
1644 <usage>
1645 <p>
1646 This directive sets the all-in-one file where you keep the certificate chain
1647 for all of the client certs in use. This directive will be needed if the
1648 remote server presents a list of CA certificates that are not direct signers
1649 of one of the configured client certificates.
1650 </p>
1651 <p>
1652 This referenced file is simply the concatenation of the various PEM-encoded
1653 certificate files. Upon startup, each client certificate configured will
1654 be examined and a chain of trust will be constructed.
1655 </p>
1656 <note type="warning"><title>Security warning</title>
1657 <p>If this directive is enabled, all of the certificates in the file will be
1658 trusted as if they were also in <directive module="mod_ssl">
1659 SSLProxyCACertificateFile</directive>.</p>
1660 </note>
1661 <example><title>Example</title>
1662 <highlight language="config">
1663 SSLProxyMachineCertificateChainFile /usr/local/apache2/conf/ssl.crt/proxyCA.pem
1664 </highlight>
1665 </example>
1666 </usage>
1667 </directivesynopsis>
1668
1669 <directivesynopsis>
1670 <name>SSLProxyVerify</name>
1671 <description>Type of remote server Certificate verification</description>
1672 <syntax>SSLProxyVerify <em>level</em></syntax>
1673 <default>SSLProxyVerify none</default>
1674 <contextlist><context>server config</context>
1675 <context>virtual host</context> </contextlist>
1676
1677 <usage>
1678
1679 <p>When a proxy is configured to forward requests to a remote SSL
1680 server, this directive can be used to configure certificate
1681 verification of the remote server. </p>
1682 <p>
1683 The following levels are available for <em>level</em>:</p>
1684 <ul>
1685 <li><strong>none</strong>:
1686      no remote server Certificate is required at all</li>
1687 <li><strong>optional</strong>:
1688      the remote server <em>may</em> present a valid Certificate</li>
1689 <li><strong>require</strong>:
1690      the remote server <em>has to</em> present a valid Certificate</li>
1691 <li><strong>optional_no_ca</strong>:
1692      the remote server may present a valid Certificate<br />
1693      but it need not to be (successfully) verifiable.</li>
1694 </ul>
1695 <p>In practice only levels <strong>none</strong> and
1696 <strong>require</strong> are really interesting, because level
1697 <strong>optional</strong> doesn't work with all servers and level
1698 <strong>optional_no_ca</strong> is actually against the idea of
1699 authentication (but can be used to establish SSL test pages, etc.)</p>
1700 <example><title>Example</title>
1701 <highlight language="config">
1702 SSLProxyVerify require
1703 </highlight>
1704 </example>
1705 </usage>
1706 </directivesynopsis>
1707
1708 <directivesynopsis>
1709 <name>SSLProxyVerifyDepth</name>
1710 <description>Maximum depth of CA Certificates in Remote Server
1711 Certificate verification</description>
1712 <syntax>SSLProxyVerifyDepth <em>number</em></syntax>
1713 <default>SSLProxyVerifyDepth 1</default>
1714 <contextlist><context>server config</context>
1715 <context>virtual host</context> </contextlist>
1716
1717 <usage>
1718 <p>
1719 This directive sets how deeply mod_ssl should verify before deciding that the
1720 remote server does not have a valid certificate. </p>
1721 <p>
1722 The depth actually is the maximum number of intermediate certificate issuers,
1723 i.e. the number of CA certificates which are max allowed to be followed while
1724 verifying the remote server certificate. A depth of 0 means that self-signed
1725 remote server certificates are accepted only, the default depth of 1 means
1726 the remote server certificate can be self-signed or has to be signed by a CA
1727 which is directly known to the server (i.e. the CA's certificate is under
1728 <directive module="mod_ssl">SSLProxyCACertificatePath</directive>), etc.</p>
1729 <example><title>Example</title>
1730 <highlight language="config">
1731 SSLProxyVerifyDepth 10
1732 </highlight>
1733 </example>
1734 </usage>
1735 </directivesynopsis>
1736
1737 <directivesynopsis>
1738 <name>SSLProxyCheckPeerExpire</name>
1739 <description>Whether to check if remote server certificate is expired
1740 </description>
1741 <syntax>SSLProxyCheckPeerExpire on|off</syntax>
1742 <default>SSLProxyCheckPeerExpire on</default>
1743 <contextlist><context>server config</context>
1744 <context>virtual host</context></contextlist>
1745
1746 <usage>
1747 <p>
1748 This directive sets whether it is checked if the remote server certificate
1749 is expired or not. If the check fails a 502 status code (Bad Gateway) is
1750 sent.
1751 </p>
1752 <example><title>Example</title>
1753 <highlight language="config">
1754 SSLProxyCheckPeerExpire on
1755 </highlight>
1756 </example>
1757 </usage>
1758 </directivesynopsis>
1759
1760 <directivesynopsis>
1761 <name>SSLProxyCheckPeerCN</name>
1762 <description>Whether to check the remote server certificate's CN field
1763 </description>
1764 <syntax>SSLProxyCheckPeerCN on|off</syntax>
1765 <default>SSLProxyCheckPeerCN on</default>
1766 <contextlist><context>server config</context>
1767 <context>virtual host</context></contextlist>
1768
1769 <usage>
1770 <p>
1771 This directive sets whether the remote server certificate's CN field is
1772 compared against the hostname of the request URL. If both are not equal
1773 a 502 status code (Bad Gateway) is sent.
1774 </p>
1775 <p>
1776 SSLProxyCheckPeerCN has been superseded by
1777 <directive module="mod_ssl">SSLProxyCheckPeerName</directive>, and its
1778 setting is only taken into account when
1779 <code>SSLProxyCheckPeerName off</code> is specified at the same time.
1780 </p>
1781 <example><title>Example</title>
1782 <highlight language="config">
1783 SSLProxyCheckPeerCN on
1784 </highlight>
1785 </example>
1786 </usage>
1787 </directivesynopsis>
1788
1789 <directivesynopsis>
1790 <name>SSLProxyCheckPeerName</name>
1791 <description>Configure host name checking for remote server certificates
1792 </description>
1793 <syntax>SSLProxyCheckPeerName on|off</syntax>
1794 <default>SSLProxyCheckPeerName on</default>
1795 <contextlist><context>server config</context>
1796 <context>virtual host</context></contextlist>
1797
1798 <usage>
1799 <p>
1800 This directive configures host name checking for server certificates
1801 when mod_ssl is acting as an SSL client. The check will
1802 succeed if the host name from the request URI is found in
1803 either the subjectAltName extension or (one of) the CN attribute(s)
1804 in the certificate's subject. If the check fails, the SSL request
1805 is aborted and a 502 status code (Bad Gateway) is returned.
1806 The directive supersedes <directive module="mod_ssl">SSLProxyCheckPeerCN</directive>,
1807 which only checks for the expected host name in the first CN attribute.
1808 </p>
1809 <p>
1810 Wildcard matching is supported in one specific flavor: subjectAltName entries
1811 of type dNSName or CN attributes starting with <code>*.</code> will match
1812 for any DNS name with the same number of labels and the same suffix
1813 (i.e., <code>*.example.org</code> matches for <code>foo.example.org</code>,
1814 but not for <code>foo.bar.example.org</code>).
1815 </p>
1816 </usage>
1817 </directivesynopsis>
1818
1819 <directivesynopsis>
1820 <name>SSLProxyEngine</name>
1821 <description>SSL Proxy Engine Operation Switch</description>
1822 <syntax>SSLProxyEngine on|off</syntax>
1823 <default>SSLProxyEngine off</default>
1824 <contextlist><context>server config</context>
1825 <context>virtual host</context></contextlist>
1826
1827 <usage>
1828 <p>
1829 This directive toggles the usage of the SSL/TLS Protocol Engine for proxy. This
1830 is usually used inside a <directive module="core"
1831 type="section">VirtualHost</directive> section to enable SSL/TLS for proxy
1832 usage in a particular virtual host. By default the SSL/TLS Protocol Engine is
1833 disabled for proxy both for the main server and all configured virtual hosts.</p>
1834
1835 <p>Note that the SSLProxyEngine directive should not, in
1836 general, be included in a virtual host that will be acting as a
1837 forward proxy (using &lt;Proxy&gt; or &lt;ProxyRequest&gt; directives.
1838 SSLProxyEngine is not required to enable a forward proxy server to
1839 proxy SSL/TLS requests.</p>
1840
1841 <example><title>Example</title>
1842 <highlight language="config">
1843 &lt;VirtualHost _default_:443&gt;
1844     SSLProxyEngine on
1845     #...
1846 &lt;/VirtualHost&gt;
1847 </highlight>
1848 </example>
1849 </usage>
1850 </directivesynopsis>
1851
1852 <directivesynopsis>
1853 <name>SSLProxyProtocol</name>
1854 <description>Configure usable SSL protocol flavors for proxy usage</description>
1855 <syntax>SSLProxyProtocol [+|-]<em>protocol</em> ...</syntax>
1856 <default>SSLProxyProtocol all</default>
1857 <contextlist><context>server config</context>
1858 <context>virtual host</context></contextlist>
1859 <override>Options</override>
1860
1861 <usage>
1862 <!-- XXX Why does this have an override and not .htaccess context? -->
1863 <p>
1864 This directive can be used to control the SSL protocol flavors mod_ssl should
1865 use when establishing its server environment for proxy . It will only connect
1866 to servers using one of the provided protocols.</p>
1867 <p>Please refer to <directive module="mod_ssl">SSLProtocol</directive>
1868 for additional information.
1869 </p>
1870 </usage>
1871 </directivesynopsis>
1872
1873 <directivesynopsis>
1874 <name>SSLProxyCipherSuite</name>
1875 <description>Cipher Suite available for negotiation in SSL
1876 proxy handshake</description>
1877 <syntax>SSLProxyCipherSuite <em>cipher-spec</em></syntax>
1878 <default>SSLProxyCipherSuite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+EXP</default>
1879 <contextlist><context>server config</context>
1880 <context>virtual host</context>
1881 <context>directory</context>
1882 <context>.htaccess</context></contextlist>
1883 <override>AuthConfig</override>
1884 <usage>
1885 <p>Equivalent to <code>SSLCipherSuite</code>, but for the proxy connection.
1886 Please refer to <directive module="mod_ssl">SSLCipherSuite</directive>
1887 for additional information.</p>
1888 </usage>
1889
1890 </directivesynopsis>
1891 <directivesynopsis>
1892 <name>SSLProxyCACertificatePath</name>
1893 <description>Directory of PEM-encoded CA Certificates for
1894 Remote Server Auth</description>
1895 <syntax>SSLProxyCACertificatePath <em>directory-path</em></syntax>
1896 <contextlist><context>server config</context>
1897 <context>virtual host</context></contextlist>
1898
1899 <usage>
1900 <p>
1901 This directive sets the directory where you keep the Certificates of
1902 Certification Authorities (CAs) whose remote servers you deal with. These are used to
1903 verify the remote server certificate on Remote Server Authentication.</p>
1904 <p>
1905 The files in this directory have to be PEM-encoded and are accessed through
1906 hash filenames. So usually you can't just place the Certificate files
1907 there: you also have to create symbolic links named
1908 <em>hash-value</em><code>.N</code>. And you should always make sure this directory
1909 contains the appropriate symbolic links.</p>
1910 <example><title>Example</title>
1911 <highlight language="config">
1912 SSLProxyCACertificatePath /usr/local/apache2/conf/ssl.crt/
1913 </highlight>
1914 </example>
1915 </usage>
1916 </directivesynopsis>
1917
1918 <directivesynopsis>
1919 <name>SSLProxyCACertificateFile</name>
1920 <description>File of concatenated PEM-encoded CA Certificates
1921 for Remote Server Auth</description>
1922 <syntax>SSLProxyCACertificateFile <em>file-path</em></syntax>
1923 <contextlist><context>server config</context>
1924 <context>virtual host</context></contextlist>
1925
1926 <usage>
1927 <p>
1928 This directive sets the <em>all-in-one</em> file where you can assemble the
1929 Certificates of Certification Authorities (CA) whose <em>remote servers</em> you deal
1930 with. These are used for Remote Server Authentication. Such a file is simply the
1931 concatenation of the various PEM-encoded Certificate files, in order of
1932 preference. This can be used alternatively and/or additionally to
1933 <directive module="mod_ssl">SSLProxyCACertificatePath</directive>.</p>
1934 <example><title>Example</title>
1935 <highlight language="config">
1936 SSLProxyCACertificateFile /usr/local/apache2/conf/ssl.crt/ca-bundle-remote-server.crt
1937 </highlight>
1938 </example>
1939 </usage>
1940 </directivesynopsis>
1941
1942 <directivesynopsis>
1943 <name>SSLProxyCARevocationPath</name>
1944 <description>Directory of PEM-encoded CA CRLs for
1945 Remote Server Auth</description>
1946 <syntax>SSLProxyCARevocationPath <em>directory-path</em></syntax>
1947 <contextlist><context>server config</context>
1948 <context>virtual host</context></contextlist>
1949
1950 <usage>
1951 <p>
1952 This directive sets the directory where you keep the Certificate Revocation
1953 Lists (CRL) of Certification Authorities (CAs) whose remote servers you deal with.
1954 These are used to revoke the remote server certificate on Remote Server Authentication.</p>
1955 <p>
1956 The files in this directory have to be PEM-encoded and are accessed through
1957 hash filenames. So usually you have not only to place the CRL files there.
1958 Additionally you have to create symbolic links named
1959 <em>hash-value</em><code>.rN</code>. And you should always make sure this directory
1960 contains the appropriate symbolic links.</p>
1961 <example><title>Example</title>
1962 <highlight language="config">
1963 SSLProxyCARevocationPath /usr/local/apache2/conf/ssl.crl/
1964 </highlight>
1965 </example>
1966 </usage>
1967 </directivesynopsis>
1968
1969 <directivesynopsis>
1970 <name>SSLProxyCARevocationFile</name>
1971 <description>File of concatenated PEM-encoded CA CRLs for
1972 Remote Server Auth</description>
1973 <syntax>SSLProxyCARevocationFile <em>file-path</em></syntax>
1974 <contextlist><context>server config</context>
1975 <context>virtual host</context></contextlist>
1976
1977 <usage>
1978 <p>
1979 This directive sets the <em>all-in-one</em> file where you can
1980 assemble the Certificate Revocation Lists (CRL) of Certification
1981 Authorities (CA) whose <em>remote servers</em> you deal with. These are used
1982 for Remote Server Authentication.  Such a file is simply the concatenation of
1983 the various PEM-encoded CRL files, in order of preference. This can be
1984 used alternatively and/or additionally to <directive
1985 module="mod_ssl">SSLProxyCARevocationPath</directive>.</p>
1986 <example><title>Example</title>
1987 <highlight language="config">
1988 SSLProxyCARevocationFile /usr/local/apache2/conf/ssl.crl/ca-bundle-remote-server.crl
1989 </highlight>
1990 </example>
1991 </usage>
1992 </directivesynopsis>
1993
1994 <directivesynopsis>
1995 <name>SSLProxyCARevocationCheck</name>
1996 <description>Enable CRL-based revocation checking for Remote Server Auth</description>
1997 <syntax>SSLProxyCARevocationCheck chain|leaf|none</syntax>
1998 <default>SSLProxyCARevocationCheck none</default>
1999 <contextlist><context>server config</context>
2000 <context>virtual host</context></contextlist>
2001
2002 <usage>
2003 <p>
2004 Enables certificate revocation list (CRL) checking for the
2005 <em>remote servers</em> you deal with. At least one of
2006 <directive module="mod_ssl">SSLProxyCARevocationFile</directive>
2007 or <directive module="mod_ssl">SSLProxyCARevocationPath</directive> must be
2008 configured. When set to <code>chain</code> (recommended setting),
2009 CRL checks are applied to all certificates in the chain, while setting it to
2010 <code>leaf</code> limits the checks to the end-entity cert.
2011 </p>
2012 <note>
2013 <title>When set to <code>chain</code> or <code>leaf</code>,
2014 CRLs <em>must</em> be available for successful validation</title>
2015 <p>
2016 Prior to version 2.3.15, CRL checking in mod_ssl also succeeded when
2017 no CRL(s) were found in any of the locations configured with
2018 <directive module="mod_ssl">SSLProxyCARevocationFile</directive>
2019 or <directive module="mod_ssl">SSLProxyCARevocationPath</directive>.
2020 With the introduction of this directive, the behavior has been changed:
2021 when checking is enabled, CRLs <em>must</em> be present for the validation
2022 to succeed - otherwise it will fail with an
2023 <code>"unable to get certificate CRL"</code> error.
2024 </p>
2025 </note>
2026 <example><title>Example</title>
2027 <highlight language="config">
2028 SSLProxyCARevocationCheck chain
2029 </highlight>
2030 </example>
2031 </usage>
2032 </directivesynopsis>
2033
2034 <directivesynopsis>
2035 <name>SSLUserName</name>
2036 <description>Variable name to determine user name</description>
2037 <syntax>SSLUserName <em>varname</em></syntax>
2038 <contextlist><context>server config</context>
2039 <context>directory</context>
2040 <context>.htaccess</context></contextlist>
2041 <override>AuthConfig</override>
2042
2043 <usage>
2044 <p>
2045 This directive sets the "user" field in the Apache request object.
2046 This is used by lower modules to identify the user with a character
2047 string. In particular, this may cause the environment variable
2048 <code>REMOTE_USER</code> to be set.  The <em>varname</em> can be
2049 any of the <a href="#envvars">SSL environment variables</a>.</p>
2050
2051 <p>When the <code>FakeBasicAuth</code> option is enabled, this directive
2052 instead controls the value of the username embedded within the basic
2053 authentication header (see <a href="#ssloptions">SSLOptions</a>).</p>
2054
2055 <example><title>Example</title>
2056 <highlight language="config">
2057 SSLUserName SSL_CLIENT_S_DN_CN
2058 </highlight>
2059 </example>
2060 </usage>
2061 </directivesynopsis>
2062
2063 <directivesynopsis>
2064 <name>SSLHonorCipherOrder</name>
2065 <description>Option to prefer the server's cipher preference order</description>
2066 <syntax>SSLHonorCipherOrder <em>flag</em></syntax>
2067 <contextlist><context>server config</context>
2068 <context>virtual host</context></contextlist>
2069 <compatibility>Available if using OpenSSL 0.9.7 or later</compatibility>
2070
2071 <usage>
2072 <p>When choosing a cipher during an SSLv3 or TLSv1 handshake, normally
2073 the client's preference is used.  If this directive is enabled, the
2074 server's preference will be used instead.</p>
2075 <example><title>Example</title>
2076 <highlight language="config">
2077 SSLHonorCipherOrder on
2078 </highlight>
2079 </example>
2080 </usage>
2081 </directivesynopsis>
2082
2083 <directivesynopsis>
2084 <name>SSLCryptoDevice</name>
2085 <description>Enable use of a cryptographic hardware accelerator</description>
2086 <syntax>SSLCryptoDevice <em>engine</em></syntax>
2087 <default>SSLCryptoDevice builtin</default>
2088 <contextlist><context>server config</context></contextlist>
2089
2090 <usage>
2091 <p>
2092 This directive enables use of a cryptographic hardware accelerator
2093 board to offload some of the SSL processing overhead.  This directive
2094 can only be used if the SSL toolkit is built with "engine" support;
2095 OpenSSL 0.9.7 and later releases have "engine" support by default, the
2096 separate "-engine" releases of OpenSSL 0.9.6 must be used.</p>
2097
2098 <p>To discover which engine names are supported, run the command
2099 &quot;<code>openssl engine</code>&quot;.</p>
2100
2101 <example><title>Example</title>
2102 <highlight language="config">
2103 # For a Broadcom accelerator:
2104 SSLCryptoDevice ubsec
2105 </highlight>
2106 </example>
2107 </usage>
2108 </directivesynopsis>
2109
2110 <directivesynopsis>
2111 <name>SSLOCSPEnable</name>
2112 <description>Enable OCSP validation of the client certificate chain</description>
2113 <syntax>SSLOCSPEnable <em>flag</em></syntax>
2114 <contextlist><context>server config</context>
2115 <context>virtual host</context></contextlist>
2116 <compatibility>Available in httpd 2.3 and later, if using OpenSSL 0.9.7 or later</compatibility>
2117
2118 <usage>
2119 <p>This option enables OCSP validation of the client certificate
2120 chain.  If this option is enabled, certificates in the client's
2121 certificate chain will be validated against an OCSP responder after
2122 normal verification (including CRL checks) have taken place.</p>
2123
2124 <p>The OCSP responder used is either extracted from the certificate
2125 itself, or derived by configuration; see the
2126 <directive module="mod_ssl">SSLOCSPDefaultResponder</directive> and
2127 <directive module="mod_ssl">SSLOCSPOverrideResponder</directive>
2128 directives.</p>
2129
2130 <example><title>Example</title>
2131 <highlight language="config">
2132 SSLVerifyClient on
2133 SSLOCSPEnable on
2134 SSLOCSPDefaultResponder http://responder.example.com:8888/responder
2135 SSLOCSPOverrideResponder on
2136 </highlight>
2137 </example>
2138 </usage>
2139 </directivesynopsis>
2140
2141 <directivesynopsis>
2142 <name>SSLOCSPDefaultResponder</name>
2143 <description>Set the default responder URI for OCSP validation</description>
2144 <syntax>SSLOCSDefaultResponder <em>uri</em></syntax>
2145 <contextlist><context>server config</context>
2146 <context>virtual host</context></contextlist>
2147 <compatibility>Available in httpd 2.3 and later, if using OpenSSL 0.9.7 or later</compatibility>
2148
2149 <usage>
2150 <p>This option sets the default OCSP responder to use.  If <directive
2151 module="mod_ssl">SSLOCSPOverrideResponder</directive> is not enabled,
2152 the URI given will be used only if no responder URI is specified in
2153 the certificate being verified.</p>
2154 </usage>
2155 </directivesynopsis>
2156
2157 <directivesynopsis>
2158 <name>SSLOCSPOverrideResponder</name>
2159 <description>Force use of the default responder URI for OCSP validation</description>
2160 <syntax>SSLOCSPOverrideResponder <em>flag</em></syntax>
2161 <contextlist><context>server config</context>
2162 <context>virtual host</context></contextlist>
2163 <compatibility>Available in httpd 2.3 and later, if using OpenSSL 0.9.7 or later</compatibility>
2164
2165 <usage>
2166 <p>This option forces the configured default OCSP responder to be used
2167 during OCSP certificate validation, regardless of whether the
2168 certificate being validated references an OCSP responder.</p>
2169 </usage>
2170 </directivesynopsis>
2171
2172 <directivesynopsis>
2173 <name>SSLOCSPResponseTimeSkew</name>
2174 <description>Maximum allowable time skew for OCSP response validation</description>
2175 <syntax>SSLOCSPResponseTimeSkew <em>seconds</em></syntax>
2176 <default>SSLOCSPResponseTimeSkew 300</default>
2177 <contextlist><context>server config</context>
2178 <context>virtual host</context></contextlist>
2179 <compatibility>Available in httpd 2.3 and later, if using OpenSSL 0.9.7 or later</compatibility>
2180
2181 <usage>
2182 <p>This option sets the maximum allowable time skew for OCSP responses
2183 (when checking their <code>thisUpdate</code> and <code>nextUpdate</code> fields).</p>
2184 </usage>
2185 </directivesynopsis>
2186
2187 <directivesynopsis>
2188 <name>SSLOCSPResponseMaxAge</name>
2189 <description>Maximum allowable age for OCSP responses</description>
2190 <syntax>SSLOCSPResponseMaxAge <em>seconds</em></syntax>
2191 <default>SSLOCSPResponseMaxAge -1</default>
2192 <contextlist><context>server config</context>
2193 <context>virtual host</context></contextlist>
2194 <compatibility>Available in httpd 2.3 and later, if using OpenSSL 0.9.7 or later</compatibility>
2195
2196 <usage>
2197 <p>This option sets the maximum allowable age ("freshness") for OCSP responses.
2198 The default value (<code>-1</code>) does not enforce a maximum age,
2199 which means that OCSP responses are considered valid as long as their
2200 <code>nextUpdate</code> field is in the future.</p>
2201 </usage>
2202 </directivesynopsis>
2203
2204 <directivesynopsis>
2205 <name>SSLOCSPResponderTimeout</name>
2206 <description>Timeout for OCSP queries</description>
2207 <syntax>SSLOCSPResponderTimeout <em>seconds</em></syntax>
2208 <default>SSLOCSPResponderTimeout 10</default>
2209 <contextlist><context>server config</context>
2210 <context>virtual host</context></contextlist>
2211 <compatibility>Available in httpd 2.3 and later, if using OpenSSL 0.9.7 or later</compatibility>
2212
2213 <usage>
2214 <p>This option sets the timeout for queries to OCSP responders, when
2215 <directive module="mod_ssl">SSLOCSPEnable</directive> is turned on.</p>
2216 </usage>
2217 </directivesynopsis>
2218
2219 <directivesynopsis>
2220 <name>SSLInsecureRenegotiation</name>
2221 <description>Option to enable support for insecure renegotiation</description>
2222 <syntax>SSLInsecureRenegotiation <em>flag</em></syntax>
2223 <default>SSLInsecureRenegotiation off</default>
2224 <contextlist><context>server config</context>
2225 <context>virtual host</context></contextlist>
2226 <compatibility>Available if using OpenSSL 0.9.8m or later</compatibility>
2227
2228 <usage>
2229 <p>As originally specified, all versions of the SSL and TLS protocols
2230 (up to and including TLS/1.2) were vulnerable to a Man-in-the-Middle
2231 attack
2232 (<a href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2009-3555">CVE-2009-3555</a>)
2233 during a renegotiation.  This vulnerability allowed an attacker to
2234 "prefix" a chosen plaintext to the HTTP request as seen by the web
2235 server.  A protocol extension was developed which fixed this
2236 vulnerability if supported by both client and server.</p>
2237
2238 <p>If <module>mod_ssl</module> is linked against OpenSSL version 0.9.8m
2239 or later, by default renegotiation is only supported with
2240 clients supporting the new protocol extension.  If this directive is
2241 enabled, renegotiation will be allowed with old (unpatched) clients,
2242 albeit insecurely.</p>
2243
2244 <note type="warning"><title>Security warning</title>
2245 <p>If this directive is enabled, SSL connections will be vulnerable to
2246 the Man-in-the-Middle prefix attack as described
2247 in <a href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2009-3555">CVE-2009-3555</a>.</p>
2248 </note>
2249
2250 <example><title>Example</title>
2251 <highlight language="config">
2252 SSLInsecureRenegotiation on
2253 </highlight>
2254 </example>
2255
2256 <p>The <code>SSL_SECURE_RENEG</code> environment variable can be used
2257 from an SSI or CGI script to determine whether secure renegotiation is
2258 supported for a given SSL connection.</p>
2259
2260 </usage>
2261 </directivesynopsis>
2262
2263 <directivesynopsis>
2264 <name>SSLUseStapling</name>
2265 <description>Enable stapling of OCSP responses in the TLS handshake</description>
2266 <syntax>SSLUseStapling on|off</syntax>
2267 <default>SSLUseStapling off</default>
2268 <contextlist><context>server config</context>
2269 <context>virtual host</context></contextlist>
2270 <compatibility>Available in httpd 2.3.3 and later, if using OpenSSL 0.9.8h or later</compatibility>
2271
2272 <usage>
2273 <p>This option enables OCSP stapling, as defined by the "Certificate
2274 Status Request" TLS extension specified in RFC 6066. If enabled (and
2275 requested by the client), mod_ssl will include an OCSP response
2276 for its own certificate in the TLS handshake. Configuring an
2277 <directive module="mod_ssl">SSLStaplingCache</directive> is a
2278 prerequisite for enabling OCSP stapling.</p>
2279
2280 <p>OCSP stapling relieves the client of querying the OCSP responder
2281 on its own, but it should be noted that with the RFC 6066 specification,
2282 the server's <code>CertificateStatus</code> reply may only include an
2283 OCSP response for a single cert. For server certificates with intermediate
2284 CA certificates in their chain (the typical case nowadays),
2285 stapling in its current implementation therefore only partially achieves the
2286 stated goal of "saving roundtrips and resources" - see also
2287 <a href="http://www.ietf.org/rfc/rfc6961.txt">RFC 6961</a>
2288 (TLS Multiple Certificate Status Extension).
2289 </p>
2290 </usage>
2291 </directivesynopsis>
2292
2293 <directivesynopsis>
2294 <name>SSLStaplingCache</name>
2295 <description>Configures the OCSP stapling cache</description>
2296 <syntax>SSLStaplingCache <em>type</em></syntax>
2297 <contextlist><context>server config</context></contextlist>
2298 <compatibility>Available in httpd 2.3.3 and later, if using OpenSSL 0.9.8h or later</compatibility>
2299
2300 <usage>
2301 <p>Configures the cache used to store OCSP responses which get included
2302 in the TLS handshake if <directive module="mod_ssl">SSLUseStapling</directive>
2303 is enabled. Configuration of a cache is mandatory for OCSP stapling.
2304 With the exception of <code>none</code> and <code>nonenotnull</code>,
2305 the same storage types are supported as with
2306 <directive module="mod_ssl">SSLSessionCache</directive>.</p>
2307 </usage>
2308 </directivesynopsis>
2309
2310 <directivesynopsis>
2311 <name>SSLStaplingResponseTimeSkew</name>
2312 <description>Maximum allowable time skew for OCSP stapling response validation</description>
2313 <syntax>SSLStaplingResponseTimeSkew <em>seconds</em></syntax>
2314 <default>SSLStaplingResponseTimeSkew 300</default>
2315 <contextlist><context>server config</context>
2316 <context>virtual host</context></contextlist>
2317 <compatibility>Available in httpd 2.3.3 and later, if using OpenSSL 0.9.8h or later</compatibility>
2318
2319 <usage>
2320 <p>This option sets the maximum allowable time skew when mod_ssl checks the
2321 <code>thisUpdate</code> and <code>nextUpdate</code> fields of OCSP responses
2322 which get included in the TLS handshake (OCSP stapling). Only applicable
2323 if <directive module="mod_ssl">SSLUseStapling</directive> is turned on.</p>
2324 </usage>
2325 </directivesynopsis>
2326
2327 <directivesynopsis>
2328 <name>SSLStaplingResponderTimeout</name>
2329 <description>Timeout for OCSP stapling queries</description>
2330 <syntax>SSLStaplingResponderTimeout <em>seconds</em></syntax>
2331 <default>SSLStaplingResponderTimeout 10</default>
2332 <contextlist><context>server config</context>
2333 <context>virtual host</context></contextlist>
2334 <compatibility>Available in httpd 2.3.3 and later, if using OpenSSL 0.9.8h or later</compatibility>
2335
2336 <usage>
2337 <p>This option sets the timeout for queries to OCSP responders when
2338 <directive module="mod_ssl">SSLUseStapling</directive> is enabled
2339 and mod_ssl is querying a responder for OCSP stapling purposes.</p>
2340 </usage>
2341 </directivesynopsis>
2342
2343 <directivesynopsis>
2344 <name>SSLStaplingResponseMaxAge</name>
2345 <description>Maximum allowable age for OCSP stapling responses</description>
2346 <syntax>SSLStaplingResponseMaxAge <em>seconds</em></syntax>
2347 <default>SSLStaplingResponseMaxAge -1</default>
2348 <contextlist><context>server config</context>
2349 <context>virtual host</context></contextlist>
2350 <compatibility>Available in httpd 2.3.3 and later, if using OpenSSL 0.9.8h or later</compatibility>
2351
2352 <usage>
2353 <p>This option sets the maximum allowable age ("freshness") when
2354 considering OCSP responses for stapling purposes, i.e. when
2355 <directive module="mod_ssl">SSLUseStapling</directive> is turned on.
2356 The default value (<code>-1</code>) does not enforce a maximum age,
2357 which means that OCSP responses are considered valid as long as their
2358 <code>nextUpdate</code> field is in the future.</p>
2359 </usage>
2360 </directivesynopsis>
2361
2362 <directivesynopsis>
2363 <name>SSLStaplingStandardCacheTimeout</name>
2364 <description>Number of seconds before expiring responses in the OCSP stapling cache</description>
2365 <syntax>SSLStaplingStandardCacheTimeout <em>seconds</em></syntax>
2366 <default>SSLStaplingStandardCacheTimeout 3600</default>
2367 <contextlist><context>server config</context>
2368 <context>virtual host</context></contextlist>
2369 <compatibility>Available in httpd 2.3.3 and later, if using OpenSSL 0.9.8h or later</compatibility>
2370
2371 <usage>
2372 <p>Sets the timeout in seconds before responses in the OCSP stapling cache
2373 (configured through <directive module="mod_ssl">SSLStaplingCache</directive>)
2374 will expire. This directive applies to <em>valid</em> responses, while
2375 <directive module="mod_ssl">SSLStaplingErrorCacheTimeout</directive> is
2376 used for controlling the timeout for invalid/unavailable responses.
2377 </p>
2378 </usage>
2379 </directivesynopsis>
2380
2381 <directivesynopsis>
2382 <name>SSLStaplingReturnResponderErrors</name>
2383 <description>Pass stapling related OCSP errors on to client</description>
2384 <syntax>SSLStaplingReturnResponderErrors on|off</syntax>
2385 <default>SSLStaplingReturnResponderErrors on</default>
2386 <contextlist><context>server config</context>
2387 <context>virtual host</context></contextlist>
2388 <compatibility>Available in httpd 2.3.3 and later, if using OpenSSL 0.9.8h or later</compatibility>
2389
2390 <usage>
2391 <p>When enabled, mod_ssl will pass responses from unsuccessful
2392 stapling related OCSP queries (such as status errors, expired responses etc.)
2393 on to the client. If set to <code>off</code>, no stapled responses
2394 for failed queries will be included in the TLS handshake.</p>
2395 </usage>
2396 </directivesynopsis>
2397
2398 <directivesynopsis>
2399 <name>SSLStaplingFakeTryLater</name>
2400 <description>Synthesize "tryLater" responses for failed OCSP stapling queries</description>
2401 <syntax>SSLStaplingFakeTryLater on|off</syntax>
2402 <default>SSLStaplingFakeTryLater on</default>
2403 <contextlist><context>server config</context>
2404 <context>virtual host</context></contextlist>
2405 <compatibility>Available in httpd 2.3.3 and later, if using OpenSSL 0.9.8h or later</compatibility>
2406
2407 <usage>
2408 <p>When enabled and a query to an OCSP responder for stapling
2409 purposes fails, mod_ssl will synthesize a "tryLater" response for the
2410 client. Only effective if <directive
2411 module="mod_ssl">SSLStaplingReturnResponderErrors</directive>
2412 is also enabled.</p>
2413 </usage>
2414 </directivesynopsis>
2415
2416 <directivesynopsis>
2417 <name>SSLStaplingErrorCacheTimeout</name>
2418 <description>Number of seconds before expiring invalid responses in the OCSP stapling cache</description>
2419 <syntax>SSLStaplingErrorCacheTimeout <em>seconds</em></syntax>
2420 <default>SSLStaplingErrorCacheTimeout 600</default>
2421 <contextlist><context>server config</context>
2422 <context>virtual host</context></contextlist>
2423 <compatibility>Available in httpd 2.3.3 and later, if using OpenSSL 0.9.8h or later</compatibility>
2424
2425 <usage>
2426 <p>Sets the timeout in seconds before <em>invalid</em> responses
2427 in the OCSP stapling cache (configured through <directive
2428 module="mod_ssl">SSLStaplingCache</directive>) will expire.
2429 To set the cache timeout for valid responses, see
2430 <directive module="mod_ssl">SSLStaplingStandardCacheTimeout</directive>.</p>
2431 </usage>
2432 </directivesynopsis>
2433
2434 <directivesynopsis>
2435 <name>SSLStaplingForceURL</name>
2436 <description>Override the OCSP responder URI specified in the certificate's AIA extension</description>
2437 <syntax>SSLStaplingForceURL <em>uri</em></syntax>
2438 <contextlist><context>server config</context>
2439 <context>virtual host</context></contextlist>
2440 <compatibility>Available in httpd 2.3.3 and later, if using OpenSSL 0.9.8h or later</compatibility>
2441
2442 <usage>
2443 <p>This directive overrides the URI of an OCSP responder as obtained from
2444 the authorityInfoAccess (AIA) extension of the certificate.
2445 Of potential use when going through a proxy for retrieving OCSP queries.</p>
2446 </usage>
2447 </directivesynopsis>
2448
2449 <directivesynopsis>
2450 <name>SSLSessionTicketKeyFile</name>
2451 <description>Persistent encryption/decryption key for TLS session tickets</description>
2452 <syntax>SSLSessionTicketKeyFile <em>file-path</em></syntax>
2453 <contextlist><context>server config</context>
2454 <context>virtual host</context></contextlist>
2455 <compatibility>Available in httpd 2.4.0 and later, if using OpenSSL 0.9.8h or later</compatibility>
2456
2457 <usage>
2458 <p>Optionally configures a secret key for encrypting and decrypting
2459 TLS session tickets, as defined in
2460 <a href="http://www.ietf.org/rfc/rfc5077.txt">RFC 5077</a>.
2461 Primarily suitable for clustered environments where TLS sessions information
2462 should be shared between multiple nodes. For single-instance httpd setups,
2463 it is recommended to <em>not</em> configure a ticket key file, but to
2464 rely on (random) keys generated by mod_ssl at startup, instead.</p>
2465 <p>The ticket key file must contain 48 bytes of random data,
2466 preferrably created from a high-entropy source. On a Unix-based system,
2467 a ticket key file can be created as follows:</p>
2468
2469 <example>
2470 dd if=/dev/random of=/path/to/file.tkey bs=1 count=48
2471 </example>
2472
2473 <p>Ticket keys should be rotated (replaced) on a frequent basis,
2474 as this is the only way to invalidate an existing session ticket -
2475 OpenSSL currently doesn't allow to specify a limit for ticket lifetimes.</p>
2476
2477 <note type="warning">
2478 <p>The ticket key file contains sensitive keying material and should
2479 be protected with file permissions similar to those used for
2480 <directive module="mod_ssl">SSLCertificateKeyFile</directive>.</p>
2481 </note>
2482 </usage>
2483 </directivesynopsis>
2484
2485 <directivesynopsis>
2486 <name>SSLCompression</name>
2487 <description>Enable compression on the SSL level</description>
2488 <syntax>SSLCompression on|off</syntax>
2489 <default>SSLCompression off</default>
2490 <contextlist><context>server config</context>
2491 <context>virtual host</context></contextlist>
2492 <compatibility>Available in httpd 2.4.3 and later, if using OpenSSL 0.9.8 or later;
2493 virtual host scope available if using OpenSSL 1.0.0 or later.
2494 The default used to be <code>on</code> in version 2.4.3.</compatibility>
2495
2496 <usage>
2497 <p>This directive allows to enable compression on the SSL level.</p>
2498 <note type="warning">
2499 <p>Enabling compression causes security issues in most setups (the so called
2500 CRIME attack).</p>
2501 </note>
2502 </usage>
2503 </directivesynopsis>
2504
2505
2506 </modulesynopsis>