switch to a 60 bit hash
[httpd-crcsyncproxy.git] / docs / manual / mod / mod_ssl.html.en
blob7b5f1861a54d405b49cb918fe64788240ca5cf1c
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
4 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
5 This file is generated from xml source: DO NOT EDIT
6 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
7 -->
8 <title>mod_ssl - Apache HTTP Server</title>
9 <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
10 <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
11 <link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
12 <link href="../images/favicon.ico" rel="shortcut icon" /></head>
13 <body>
14 <div id="page-header">
15 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p>
16 <p class="apache">Apache HTTP Server Version 2.3</p>
17 <img alt="" src="../images/feather.gif" /></div>
18 <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
19 <div id="path">
20 <a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.3</a> &gt; <a href="./">Modules</a></div>
21 <div id="page-content">
22 <div id="preamble"><h1>Apache Module mod_ssl</h1>
23 <div class="toplang">
24 <p><span>Available Languages: </span><a href="../en/mod/mod_ssl.html" title="English">&nbsp;en&nbsp;</a></p>
25 </div>
26 <table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Strong cryptography using the Secure Sockets
27 Layer (SSL) and Transport Layer Security (TLS) protocols</td></tr>
28 <tr><th><a href="module-dict.html#Status">Status:</a></th><td>Extension</td></tr>
29 <tr><th><a href="module-dict.html#ModuleIdentifier">Module Identifier:</a></th><td>ssl_module</td></tr>
30 <tr><th><a href="module-dict.html#SourceFile">Source File:</a></th><td>mod_ssl.c</td></tr></table>
31 <h3>Summary</h3>
33 <p>This module provides SSL v2/v3 and TLS v1 support for the Apache
34 HTTP Server. It was contributed by Ralf S. Engeschall based on his
35 mod_ssl project and originally derived from work by Ben Laurie.</p>
37 <p>This module relies on <a href="http://www.openssl.org/">OpenSSL</a>
38 to provide the cryptography engine.</p>
40 <p>Further details, discussion, and examples are provided in the
41 <a href="../ssl/">SSL documentation</a>.</p>
42 </div>
43 <div id="quickview"><h3 class="directives">Directives</h3>
44 <ul id="toc">
45 <li><img alt="" src="../images/down.gif" /> <a href="#sslcacertificatefile">SSLCACertificateFile</a></li>
46 <li><img alt="" src="../images/down.gif" /> <a href="#sslcacertificatepath">SSLCACertificatePath</a></li>
47 <li><img alt="" src="../images/down.gif" /> <a href="#sslcadnrequestfile">SSLCADNRequestFile</a></li>
48 <li><img alt="" src="../images/down.gif" /> <a href="#sslcadnrequestpath">SSLCADNRequestPath</a></li>
49 <li><img alt="" src="../images/down.gif" /> <a href="#sslcarevocationfile">SSLCARevocationFile</a></li>
50 <li><img alt="" src="../images/down.gif" /> <a href="#sslcarevocationpath">SSLCARevocationPath</a></li>
51 <li><img alt="" src="../images/down.gif" /> <a href="#sslcertificatechainfile">SSLCertificateChainFile</a></li>
52 <li><img alt="" src="../images/down.gif" /> <a href="#sslcertificatefile">SSLCertificateFile</a></li>
53 <li><img alt="" src="../images/down.gif" /> <a href="#sslcertificatekeyfile">SSLCertificateKeyFile</a></li>
54 <li><img alt="" src="../images/down.gif" /> <a href="#sslciphersuite">SSLCipherSuite</a></li>
55 <li><img alt="" src="../images/down.gif" /> <a href="#sslcryptodevice">SSLCryptoDevice</a></li>
56 <li><img alt="" src="../images/down.gif" /> <a href="#sslengine">SSLEngine</a></li>
57 <li><img alt="" src="../images/down.gif" /> <a href="#sslhonorcipherorder">SSLHonorCipherOrder</a></li>
58 <li><img alt="" src="../images/down.gif" /> <a href="#sslmutex">SSLMutex</a></li>
59 <li><img alt="" src="../images/down.gif" /> <a href="#sslocspdefaultresponder">SSLOCSPDefaultResponder</a></li>
60 <li><img alt="" src="../images/down.gif" /> <a href="#sslocspenable">SSLOCSPEnable</a></li>
61 <li><img alt="" src="../images/down.gif" /> <a href="#sslocspoverrideresponder">SSLOCSPOverrideResponder</a></li>
62 <li><img alt="" src="../images/down.gif" /> <a href="#ssloptions">SSLOptions</a></li>
63 <li><img alt="" src="../images/down.gif" /> <a href="#sslpassphrasedialog">SSLPassPhraseDialog</a></li>
64 <li><img alt="" src="../images/down.gif" /> <a href="#sslprotocol">SSLProtocol</a></li>
65 <li><img alt="" src="../images/down.gif" /> <a href="#sslproxycacertificatefile">SSLProxyCACertificateFile</a></li>
66 <li><img alt="" src="../images/down.gif" /> <a href="#sslproxycacertificatepath">SSLProxyCACertificatePath</a></li>
67 <li><img alt="" src="../images/down.gif" /> <a href="#sslproxycarevocationfile">SSLProxyCARevocationFile</a></li>
68 <li><img alt="" src="../images/down.gif" /> <a href="#sslproxycarevocationpath">SSLProxyCARevocationPath</a></li>
69 <li><img alt="" src="../images/down.gif" /> <a href="#sslproxyciphersuite">SSLProxyCipherSuite</a></li>
70 <li><img alt="" src="../images/down.gif" /> <a href="#sslproxyengine">SSLProxyEngine</a></li>
71 <li><img alt="" src="../images/down.gif" /> <a href="#sslproxymachinecertificatefile">SSLProxyMachineCertificateFile</a></li>
72 <li><img alt="" src="../images/down.gif" /> <a href="#sslproxymachinecertificatepath">SSLProxyMachineCertificatePath</a></li>
73 <li><img alt="" src="../images/down.gif" /> <a href="#sslproxyprotocol">SSLProxyProtocol</a></li>
74 <li><img alt="" src="../images/down.gif" /> <a href="#sslproxyverify">SSLProxyVerify</a></li>
75 <li><img alt="" src="../images/down.gif" /> <a href="#sslproxyverifydepth">SSLProxyVerifyDepth</a></li>
76 <li><img alt="" src="../images/down.gif" /> <a href="#sslrandomseed">SSLRandomSeed</a></li>
77 <li><img alt="" src="../images/down.gif" /> <a href="#sslrenegbuffersize">SSLRenegBufferSize</a></li>
78 <li><img alt="" src="../images/down.gif" /> <a href="#sslrequire">SSLRequire</a></li>
79 <li><img alt="" src="../images/down.gif" /> <a href="#sslrequiressl">SSLRequireSSL</a></li>
80 <li><img alt="" src="../images/down.gif" /> <a href="#sslsessioncache">SSLSessionCache</a></li>
81 <li><img alt="" src="../images/down.gif" /> <a href="#sslsessioncachetimeout">SSLSessionCacheTimeout</a></li>
82 <li><img alt="" src="../images/down.gif" /> <a href="#sslusername">SSLUserName</a></li>
83 <li><img alt="" src="../images/down.gif" /> <a href="#sslverifyclient">SSLVerifyClient</a></li>
84 <li><img alt="" src="../images/down.gif" /> <a href="#sslverifydepth">SSLVerifyDepth</a></li>
85 </ul>
86 <h3>Topics</h3>
87 <ul id="topics">
88 <li><img alt="" src="../images/down.gif" /> <a href="#envvars">Environment Variables</a></li>
89 <li><img alt="" src="../images/down.gif" /> <a href="#logformats">Custom Log Formats</a></li>
90 </ul></div>
91 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
92 <div class="section">
93 <h2><a name="envvars" id="envvars">Environment Variables</a></h2>
95 <p>This module provides a lot of SSL information as additional environment
96 variables to the SSI and CGI namespace. The generated variables are listed in
97 the table below. For backward compatibility the information can
98 be made available under different names, too. Look in the <a href="../ssl/ssl_compat.html">Compatibility</a> chapter for details on the
99 compatibility variables.</p>
101 <table class="bordered">
103 <tr>
104 <th><a name="table3">Variable Name:</a></th>
105 <th>Value Type:</th>
106 <th>Description:</th>
107 </tr>
108 <tr><td><code>HTTPS</code></td> <td>flag</td> <td>HTTPS is being used.</td></tr>
109 <tr><td><code>SSL_PROTOCOL</code></td> <td>string</td> <td>The SSL protocol version (SSLv2, SSLv3, TLSv1)</td></tr>
110 <tr><td><code>SSL_SESSION_ID</code></td> <td>string</td> <td>The hex-encoded SSL session id</td></tr>
111 <tr><td><code>SSL_CIPHER</code></td> <td>string</td> <td>The cipher specification name</td></tr>
112 <tr><td><code>SSL_CIPHER_EXPORT</code></td> <td>string</td> <td><code>true</code> if cipher is an export cipher</td></tr>
113 <tr><td><code>SSL_CIPHER_USEKEYSIZE</code></td> <td>number</td> <td>Number of cipher bits (actually used)</td></tr>
114 <tr><td><code>SSL_CIPHER_ALGKEYSIZE</code></td> <td>number</td> <td>Number of cipher bits (possible)</td></tr>
115 <tr><td><code>SSL_COMPRESS_METHOD</code></td> <td>string</td> <td>SSL compression method negotiated</td></tr>
116 <tr><td><code>SSL_VERSION_INTERFACE</code></td> <td>string</td> <td>The mod_ssl program version</td></tr>
117 <tr><td><code>SSL_VERSION_LIBRARY</code></td> <td>string</td> <td>The OpenSSL program version</td></tr>
118 <tr><td><code>SSL_CLIENT_M_VERSION</code></td> <td>string</td> <td>The version of the client certificate</td></tr>
119 <tr><td><code>SSL_CLIENT_M_SERIAL</code></td> <td>string</td> <td>The serial of the client certificate</td></tr>
120 <tr><td><code>SSL_CLIENT_S_DN</code></td> <td>string</td> <td>Subject DN in client's certificate</td></tr>
121 <tr><td><code>SSL_CLIENT_S_DN_</code><em>x509</em></td> <td>string</td> <td>Component of client's Subject DN</td></tr>
122 <tr><td><code>SSL_CLIENT_I_DN</code></td> <td>string</td> <td>Issuer DN of client's certificate</td></tr>
123 <tr><td><code>SSL_CLIENT_I_DN_</code><em>x509</em></td> <td>string</td> <td>Component of client's Issuer DN</td></tr>
124 <tr><td><code>SSL_CLIENT_V_START</code></td> <td>string</td> <td>Validity of client's certificate (start time)</td></tr>
125 <tr><td><code>SSL_CLIENT_V_END</code></td> <td>string</td> <td>Validity of client's certificate (end time)</td></tr>
126 <tr><td><code>SSL_CLIENT_V_REMAIN</code></td> <td>string</td> <td>Number of days until client's certificate expires</td></tr>
127 <tr><td><code>SSL_CLIENT_A_SIG</code></td> <td>string</td> <td>Algorithm used for the signature of client's certificate</td></tr>
128 <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>
129 <tr><td><code>SSL_CLIENT_CERT</code></td> <td>string</td> <td>PEM-encoded client certificate</td></tr>
130 <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>
131 <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>
132 <tr><td><code>SSL_SERVER_M_VERSION</code></td> <td>string</td> <td>The version of the server certificate</td></tr>
133 <tr><td><code>SSL_SERVER_M_SERIAL</code></td> <td>string</td> <td>The serial of the server certificate</td></tr>
134 <tr><td><code>SSL_SERVER_S_DN</code></td> <td>string</td> <td>Subject DN in server's certificate</td></tr>
135 <tr><td><code>SSL_SERVER_S_DN_</code><em>x509</em></td> <td>string</td> <td>Component of server's Subject DN</td></tr>
136 <tr><td><code>SSL_SERVER_I_DN</code></td> <td>string</td> <td>Issuer DN of server's certificate</td></tr>
137 <tr><td><code>SSL_SERVER_I_DN_</code><em>x509</em></td> <td>string</td> <td>Component of server's Issuer DN</td></tr>
138 <tr><td><code>SSL_SERVER_V_START</code></td> <td>string</td> <td>Validity of server's certificate (start time)</td></tr>
139 <tr><td><code>SSL_SERVER_V_END</code></td> <td>string</td> <td>Validity of server's certificate (end time)</td></tr>
140 <tr><td><code>SSL_SERVER_A_SIG</code></td> <td>string</td> <td>Algorithm used for the signature of server's certificate</td></tr>
141 <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>
142 <tr><td><code>SSL_SERVER_CERT</code></td> <td>string</td> <td>PEM-encoded server certificate</td></tr>
143 </table>
145 <p><em>x509</em> specifies a component of an X.509 DN; one of
146 <code>C,ST,L,O,OU,CN,T,I,G,S,D,UID,Email</code>. In Apache 2.1 and
147 later, <em>x509</em> may also include a numeric <code>_n</code>
148 suffix. If the DN in question contains multiple attributes of the
149 same name, this suffix is used as an index to select a particular
150 attribute. For example, where the server certificate subject DN
151 included two OU fields, <code>SSL_SERVER_S_DN_OU_0</code> and
152 <code>SSL_SERVER_S_DN_OU_1</code> could be used to reference each.</p>
154 <p><code>SSL_CLIENT_V_REMAIN</code> is only available in version 2.1
155 and later.</p>
157 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
158 <div class="section">
159 <h2><a name="logformats" id="logformats">Custom Log Formats</a></h2>
161 <p>When <code class="module"><a href="../mod/mod_ssl.html">mod_ssl</a></code> is built into Apache or at least
162 loaded (under DSO situation) additional functions exist for the <a href="mod_log_config.html#formats">Custom Log Format</a> of
163 <code class="module"><a href="../mod/mod_log_config.html">mod_log_config</a></code>. First there is an
164 additional ``<code>%{</code><em>varname</em><code>}x</code>''
165 eXtension format function which can be used to expand any variables
166 provided by any module, especially those provided by mod_ssl which can
167 you find in the above table.</p>
169 For backward compatibility there is additionally a special
170 ``<code>%{</code><em>name</em><code>}c</code>'' cryptography format function
171 provided. Information about this function is provided in the <a href="../ssl/ssl_compat.html">Compatibility</a> chapter.</p>
172 <div class="example"><h3>Example</h3><p><code>
173 CustomLog logs/ssl_request_log \
174 "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
175 </code></p></div>
176 </div>
177 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
178 <div class="directive-section"><h2><a name="SSLCACertificateFile" id="SSLCACertificateFile">SSLCACertificateFile</a> <a name="sslcacertificatefile" id="sslcacertificatefile">Directive</a></h2>
179 <table class="directive">
180 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>File of concatenated PEM-encoded CA Certificates
181 for Client Auth</td></tr>
182 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLCACertificateFile <em>file-path</em></code></td></tr>
183 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
184 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
185 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
186 </table>
188 This directive sets the <em>all-in-one</em> file where you can assemble the
189 Certificates of Certification Authorities (CA) whose <em>clients</em> you deal
190 with. These are used for Client Authentication. Such a file is simply the
191 concatenation of the various PEM-encoded Certificate files, in order of
192 preference. This can be used alternatively and/or additionally to
193 <code class="directive"><a href="#sslcacertificatepath">SSLCACertificatePath</a></code>.</p>
194 <div class="example"><h3>Example</h3><p><code>
195 SSLCACertificateFile /usr/local/apache2/conf/ssl.crt/ca-bundle-client.crt
196 </code></p></div>
198 </div>
199 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
200 <div class="directive-section"><h2><a name="SSLCACertificatePath" id="SSLCACertificatePath">SSLCACertificatePath</a> <a name="sslcacertificatepath" id="sslcacertificatepath">Directive</a></h2>
201 <table class="directive">
202 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Directory of PEM-encoded CA Certificates for
203 Client Auth</td></tr>
204 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLCACertificatePath <em>directory-path</em></code></td></tr>
205 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
206 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
207 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
208 </table>
210 This directive sets the directory where you keep the Certificates of
211 Certification Authorities (CAs) whose clients you deal with. These are used to
212 verify the client certificate on Client Authentication.</p>
214 The files in this directory have to be PEM-encoded and are accessed through
215 hash filenames. So usually you can't just place the Certificate files
216 there: you also have to create symbolic links named
217 <em>hash-value</em><code>.N</code>. And you should always make sure this directory
218 contains the appropriate symbolic links. Use the <code>Makefile</code> which
219 comes with mod_ssl to accomplish this task.</p>
220 <div class="example"><h3>Example</h3><p><code>
221 SSLCACertificatePath /usr/local/apache2/conf/ssl.crt/
222 </code></p></div>
224 </div>
225 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
226 <div class="directive-section"><h2><a name="SSLCADNRequestFile" id="SSLCADNRequestFile">SSLCADNRequestFile</a> <a name="sslcadnrequestfile" id="sslcadnrequestfile">Directive</a></h2>
227 <table class="directive">
228 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>File of concatenated PEM-encoded CA Certificates
229 for defining acceptable CA names</td></tr>
230 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLCADNRequestFile <em>file-path</em></code></td></tr>
231 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
232 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
233 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
234 </table>
235 <p>When a client certificate is requested by mod_ssl, a list of
236 <em>acceptable Certificate Authority names</em> is sent to the client
237 in the SSL handshake. These CA names can be used by the client to
238 select an appropriate client certificate out of those it has
239 available.</p>
241 <p>If neither of the directives <code class="directive"><a href="#sslcadnrequestpath">SSLCADNRequestPath</a></code> or <code class="directive"><a href="#sslcadnrequestfile">SSLCADNRequestFile</a></code> are given, then the
242 set of acceptable CA names sent to the client is the names of all the
243 CA certificates given by the <code class="directive"><a href="#sslcacertificatefile">SSLCACertificateFile</a></code> and <code class="directive"><a href="#sslcacertificatepath">SSLCACertificatePath</a></code> directives; in other
244 words, the names of the CAs which will actually be used to verify the
245 client certificate.</p>
247 <p>In some circumstances, it is useful to be able to send a set of
248 acceptable CA names which differs from the actual CAs used to verify
249 the client certificate - for example, if the client certificates are
250 signed by intermediate CAs. In such cases, <code class="directive"><a href="#sslcadnrequestpath">SSLCADNRequestPath</a></code> and/or <code class="directive"><a href="#sslcadnrequestfile">SSLCADNRequestFile</a></code> can be used; the
251 acceptable CA names are then taken from the complete set of
252 certificates in the directory and/or file specified by this pair of
253 directives.</p>
255 <p><code class="directive"><a href="#sslcadnrequestfile">SSLCADNRequestFile</a></code> must
256 specify an <em>all-in-one</em> file containing a concatenation of
257 PEM-encoded CA certificates.</p>
259 <div class="example"><h3>Example</h3><p><code>
260 SSLCADNRequestFile /usr/local/apache2/conf/ca-names.crt
261 </code></p></div>
263 </div>
264 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
265 <div class="directive-section"><h2><a name="SSLCADNRequestPath" id="SSLCADNRequestPath">SSLCADNRequestPath</a> <a name="sslcadnrequestpath" id="sslcadnrequestpath">Directive</a></h2>
266 <table class="directive">
267 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Directory of PEM-encoded CA Certificates for
268 defining acceptable CA names</td></tr>
269 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLCADNRequestPath <em>directory-path</em></code></td></tr>
270 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
271 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
272 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
273 </table>
275 <p>This optional directive can be used to specify the set of
276 <em>acceptable CA names</em> which will be sent to the client when a
277 client certificate is requested. See the <code class="directive"><a href="#sslcadnrequestfile">SSLCADNRequestFile</a></code> directive for more
278 details.</p>
280 <p>The files in this directory have to be PEM-encoded and are accessed
281 through hash filenames. So usually you can't just place the
282 Certificate files there: you also have to create symbolic links named
283 <em>hash-value</em><code>.N</code>. And you should always make sure
284 this directory contains the appropriate symbolic links. Use the
285 <code>Makefile</code> which comes with mod_ssl to accomplish this
286 task.</p>
287 <div class="example"><h3>Example</h3><p><code>
288 SSLCADNRequestPath /usr/local/apache2/conf/ca-names.crt/
289 </code></p></div>
291 </div>
292 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
293 <div class="directive-section"><h2><a name="SSLCARevocationFile" id="SSLCARevocationFile">SSLCARevocationFile</a> <a name="sslcarevocationfile" id="sslcarevocationfile">Directive</a></h2>
294 <table class="directive">
295 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>File of concatenated PEM-encoded CA CRLs for
296 Client Auth</td></tr>
297 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLCARevocationFile <em>file-path</em></code></td></tr>
298 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
299 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
300 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
301 </table>
303 This directive sets the <em>all-in-one</em> file where you can
304 assemble the Certificate Revocation Lists (CRL) of Certification
305 Authorities (CA) whose <em>clients</em> you deal with. These are used
306 for Client Authentication. Such a file is simply the concatenation of
307 the various PEM-encoded CRL files, in order of preference. This can be
308 used alternatively and/or additionally to <code class="directive"><a href="#sslcarevocationpath">SSLCARevocationPath</a></code>.</p>
309 <div class="example"><h3>Example</h3><p><code>
310 SSLCARevocationFile /usr/local/apache2/conf/ssl.crl/ca-bundle-client.crl
311 </code></p></div>
313 </div>
314 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
315 <div class="directive-section"><h2><a name="SSLCARevocationPath" id="SSLCARevocationPath">SSLCARevocationPath</a> <a name="sslcarevocationpath" id="sslcarevocationpath">Directive</a></h2>
316 <table class="directive">
317 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Directory of PEM-encoded CA CRLs for
318 Client Auth</td></tr>
319 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLCARevocationPath <em>directory-path</em></code></td></tr>
320 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
321 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
322 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
323 </table>
325 This directive sets the directory where you keep the Certificate Revocation
326 Lists (CRL) of Certification Authorities (CAs) whose clients you deal with.
327 These are used to revoke the client certificate on Client Authentication.</p>
329 The files in this directory have to be PEM-encoded and are accessed through
330 hash filenames. So usually you have not only to place the CRL files there.
331 Additionally you have to create symbolic links named
332 <em>hash-value</em><code>.rN</code>. And you should always make sure this directory
333 contains the appropriate symbolic links. Use the <code>Makefile</code> which
334 comes with <code class="module"><a href="../mod/mod_ssl.html">mod_ssl</a></code> to accomplish this task.</p>
335 <div class="example"><h3>Example</h3><p><code>
336 SSLCARevocationPath /usr/local/apache2/conf/ssl.crl/
337 </code></p></div>
339 </div>
340 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
341 <div class="directive-section"><h2><a name="SSLCertificateChainFile" id="SSLCertificateChainFile">SSLCertificateChainFile</a> <a name="sslcertificatechainfile" id="sslcertificatechainfile">Directive</a></h2>
342 <table class="directive">
343 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>File of PEM-encoded Server CA Certificates</td></tr>
344 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLCertificateChainFile <em>file-path</em></code></td></tr>
345 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
346 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
347 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
348 </table>
350 This directive sets the optional <em>all-in-one</em> file where you can
351 assemble the certificates of Certification Authorities (CA) which form the
352 certificate chain of the server certificate. This starts with the issuing CA
353 certificate of of the server certificate and can range up to the root CA
354 certificate. Such a file is simply the concatenation of the various
355 PEM-encoded CA Certificate files, usually in certificate chain order.</p>
357 This should be used alternatively and/or additionally to <code class="directive"><a href="#sslcacertificatepath">SSLCACertificatePath</a></code> for explicitly
358 constructing the server certificate chain which is sent to the browser
359 in addition to the server certificate. It is especially useful to
360 avoid conflicts with CA certificates when using client
361 authentication. Because although placing a CA certificate of the
362 server certificate chain into <code class="directive"><a href="#sslcacertificatepath">SSLCACertificatePath</a></code> has the same effect
363 for the certificate chain construction, it has the side-effect that
364 client certificates issued by this same CA certificate are also
365 accepted on client authentication.</p>
367 But be careful: Providing the certificate chain works only if you are using a
368 <em>single</em> RSA <em>or</em> DSA based server certificate. If you are
369 using a coupled RSA+DSA certificate pair, this will work only if actually both
370 certificates use the <em>same</em> certificate chain. Else the browsers will be
371 confused in this situation.</p>
372 <div class="example"><h3>Example</h3><p><code>
373 SSLCertificateChainFile /usr/local/apache2/conf/ssl.crt/ca.crt
374 </code></p></div>
376 </div>
377 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
378 <div class="directive-section"><h2><a name="SSLCertificateFile" id="SSLCertificateFile">SSLCertificateFile</a> <a name="sslcertificatefile" id="sslcertificatefile">Directive</a></h2>
379 <table class="directive">
380 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Server PEM-encoded X.509 Certificate file</td></tr>
381 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLCertificateFile <em>file-path</em></code></td></tr>
382 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
383 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
384 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
385 </table>
387 This directive points to the PEM-encoded Certificate file for the server and
388 optionally also to the corresponding RSA or DSA Private Key file for it
389 (contained in the same file). If the contained Private Key is encrypted the
390 Pass Phrase dialog is forced at startup time. This directive can be used up to
391 two times (referencing different filenames) when both a RSA and a DSA based
392 server certificate is used in parallel.</p>
393 <div class="example"><h3>Example</h3><p><code>
394 SSLCertificateFile /usr/local/apache2/conf/ssl.crt/server.crt
395 </code></p></div>
397 </div>
398 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
399 <div class="directive-section"><h2><a name="SSLCertificateKeyFile" id="SSLCertificateKeyFile">SSLCertificateKeyFile</a> <a name="sslcertificatekeyfile" id="sslcertificatekeyfile">Directive</a></h2>
400 <table class="directive">
401 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Server PEM-encoded Private Key file</td></tr>
402 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLCertificateKeyFile <em>file-path</em></code></td></tr>
403 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
404 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
405 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
406 </table>
408 This directive points to the PEM-encoded Private Key file for the
409 server. If the Private Key is not combined with the Certificate in the
410 <code class="directive">SSLCertificateFile</code>, use this additional directive to
411 point to the file with the stand-alone Private Key. When
412 <code class="directive">SSLCertificateFile</code> is used and the file
413 contains both the Certificate and the Private Key this directive need
414 not be used. But we strongly discourage this practice. Instead we
415 recommend you to separate the Certificate and the Private Key. If the
416 contained Private Key is encrypted, the Pass Phrase dialog is forced
417 at startup time. This directive can be used up to two times
418 (referencing different filenames) when both a RSA and a DSA based
419 private key is used in parallel.</p>
420 <div class="example"><h3>Example</h3><p><code>
421 SSLCertificateKeyFile /usr/local/apache2/conf/ssl.key/server.key
422 </code></p></div>
424 </div>
425 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
426 <div class="directive-section"><h2><a name="SSLCipherSuite" id="SSLCipherSuite">SSLCipherSuite</a> <a name="sslciphersuite" id="sslciphersuite">Directive</a></h2>
427 <table class="directive">
428 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Cipher Suite available for negotiation in SSL
429 handshake</td></tr>
430 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLCipherSuite <em>cipher-spec</em></code></td></tr>
431 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSLCipherSuite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP</code></td></tr>
432 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
433 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>AuthConfig</td></tr>
434 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
435 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
436 </table>
438 This complex directive uses a colon-separated <em>cipher-spec</em> string
439 consisting of OpenSSL cipher specifications to configure the Cipher Suite the
440 client is permitted to negotiate in the SSL handshake phase. Notice that this
441 directive can be used both in per-server and per-directory context. In
442 per-server context it applies to the standard SSL handshake when a connection
443 is established. In per-directory context it forces a SSL renegotation with the
444 reconfigured Cipher Suite after the HTTP request was read but before the HTTP
445 response is sent.</p>
447 An SSL cipher specification in <em>cipher-spec</em> is composed of 4 major
448 attributes plus a few extra minor ones:</p>
449 <ul>
450 <li><em>Key Exchange Algorithm</em>:<br />
451 RSA or Diffie-Hellman variants.
452 </li>
453 <li><em>Authentication Algorithm</em>:<br />
454 RSA, Diffie-Hellman, DSS or none.
455 </li>
456 <li><em>Cipher/Encryption Algorithm</em>:<br />
457 DES, Triple-DES, RC4, RC2, IDEA or none.
458 </li>
459 <li><em>MAC Digest Algorithm</em>:<br />
460 MD5, SHA or SHA1.
461 </li>
462 </ul>
463 <p>An SSL cipher can also be an export cipher and is either a SSLv2 or SSLv3/TLSv1
464 cipher (here TLSv1 is equivalent to SSLv3). To specify which ciphers to use,
465 one can either specify all the Ciphers, one at a time, or use aliases to
466 specify the preference and order for the ciphers (see <a href="#table1">Table
467 1</a>).</p>
469 <table class="bordered">
471 <tr><th><a name="table1">Tag</a></th> <th>Description</th></tr>
472 <tr><td colspan="2"><em>Key Exchange Algorithm:</em></td></tr>
473 <tr><td><code>kRSA</code></td> <td>RSA key exchange</td></tr>
474 <tr><td><code>kDHr</code></td> <td>Diffie-Hellman key exchange with RSA key</td></tr>
475 <tr><td><code>kDHd</code></td> <td>Diffie-Hellman key exchange with DSA key</td></tr>
476 <tr><td><code>kEDH</code></td> <td>Ephemeral (temp.key) Diffie-Hellman key exchange (no cert)</td> </tr>
477 <tr><td colspan="2"><em>Authentication Algorithm:</em></td></tr>
478 <tr><td><code>aNULL</code></td> <td>No authentication</td></tr>
479 <tr><td><code>aRSA</code></td> <td>RSA authentication</td></tr>
480 <tr><td><code>aDSS</code></td> <td>DSS authentication</td> </tr>
481 <tr><td><code>aDH</code></td> <td>Diffie-Hellman authentication</td></tr>
482 <tr><td colspan="2"><em>Cipher Encoding Algorithm:</em></td></tr>
483 <tr><td><code>eNULL</code></td> <td>No encoding</td> </tr>
484 <tr><td><code>DES</code></td> <td>DES encoding</td> </tr>
485 <tr><td><code>3DES</code></td> <td>Triple-DES encoding</td> </tr>
486 <tr><td><code>RC4</code></td> <td>RC4 encoding</td> </tr>
487 <tr><td><code>RC2</code></td> <td>RC2 encoding</td> </tr>
488 <tr><td><code>IDEA</code></td> <td>IDEA encoding</td> </tr>
489 <tr><td colspan="2"><em>MAC Digest Algorithm</em>:</td></tr>
490 <tr><td><code>MD5</code></td> <td>MD5 hash function</td></tr>
491 <tr><td><code>SHA1</code></td> <td>SHA1 hash function</td></tr>
492 <tr><td><code>SHA</code></td> <td>SHA hash function</td> </tr>
493 <tr><td colspan="2"><em>Aliases:</em></td></tr>
494 <tr><td><code>SSLv2</code></td> <td>all SSL version 2.0 ciphers</td></tr>
495 <tr><td><code>SSLv3</code></td> <td>all SSL version 3.0 ciphers</td> </tr>
496 <tr><td><code>TLSv1</code></td> <td>all TLS version 1.0 ciphers</td> </tr>
497 <tr><td><code>EXP</code></td> <td>all export ciphers</td> </tr>
498 <tr><td><code>EXPORT40</code></td> <td>all 40-bit export ciphers only</td> </tr>
499 <tr><td><code>EXPORT56</code></td> <td>all 56-bit export ciphers only</td> </tr>
500 <tr><td><code>LOW</code></td> <td>all low strength ciphers (no export, single DES)</td></tr>
501 <tr><td><code>MEDIUM</code></td> <td>all ciphers with 128 bit encryption</td> </tr>
502 <tr><td><code>HIGH</code></td> <td>all ciphers using Triple-DES</td> </tr>
503 <tr><td><code>RSA</code></td> <td>all ciphers using RSA key exchange</td> </tr>
504 <tr><td><code>DH</code></td> <td>all ciphers using Diffie-Hellman key exchange</td> </tr>
505 <tr><td><code>EDH</code></td> <td>all ciphers using Ephemeral Diffie-Hellman key exchange</td> </tr>
506 <tr><td><code>ADH</code></td> <td>all ciphers using Anonymous Diffie-Hellman key exchange</td> </tr>
507 <tr><td><code>DSS</code></td> <td>all ciphers using DSS authentication</td> </tr>
508 <tr><td><code>NULL</code></td> <td>all ciphers using no encryption</td> </tr>
509 </table>
511 Now where this becomes interesting is that these can be put together
512 to specify the order and ciphers you wish to use. To speed this up
513 there are also aliases (<code>SSLv2, SSLv3, TLSv1, EXP, LOW, MEDIUM,
514 HIGH</code>) for certain groups of ciphers. These tags can be joined
515 together with prefixes to form the <em>cipher-spec</em>. Available
516 prefixes are:</p>
517 <ul>
518 <li>none: add cipher to list</li>
519 <li><code>+</code>: add ciphers to list and pull them to current location in list</li>
520 <li><code>-</code>: remove cipher from list (can be added later again)</li>
521 <li><code>!</code>: kill cipher from list completely (can <strong>not</strong> be added later again)</li>
522 </ul>
523 <p>A simpler way to look at all of this is to use the ``<code>openssl ciphers
524 -v</code>'' command which provides a nice way to successively create the
525 correct <em>cipher-spec</em> string. The default <em>cipher-spec</em> string
526 is ``<code>ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP</code>'' which
527 means the following: first, remove from consideration any ciphers that do not
528 authenticate, i.e. for SSL only the Anonymous Diffie-Hellman ciphers. Next,
529 use ciphers using RC4 and RSA. Next include the high, medium and then the low
530 security ciphers. Finally <em>pull</em> all SSLv2 and export ciphers to the
531 end of the list.</p>
532 <div class="example"><pre>
533 $ openssl ciphers -v 'ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP'
534 NULL-SHA SSLv3 Kx=RSA Au=RSA Enc=None Mac=SHA1
535 NULL-MD5 SSLv3 Kx=RSA Au=RSA Enc=None Mac=MD5
536 EDH-RSA-DES-CBC3-SHA SSLv3 Kx=DH Au=RSA Enc=3DES(168) Mac=SHA1
537 ... ... ... ... ...
538 EXP-RC4-MD5 SSLv3 Kx=RSA(512) Au=RSA Enc=RC4(40) Mac=MD5 export
539 EXP-RC2-CBC-MD5 SSLv2 Kx=RSA(512) Au=RSA Enc=RC2(40) Mac=MD5 export
540 EXP-RC4-MD5 SSLv2 Kx=RSA(512) Au=RSA Enc=RC4(40) Mac=MD5 export
541 </pre></div>
542 <p>The complete list of particular RSA &amp; DH ciphers for SSL is given in <a href="#table2">Table 2</a>.</p>
543 <div class="example"><h3>Example</h3><p><code>
544 SSLCipherSuite RSA:!EXP:!NULL:+HIGH:+MEDIUM:-LOW
545 </code></p></div>
546 <table class="bordered">
548 <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>
549 <tr><td colspan="7"><em>RSA Ciphers:</em></td></tr>
550 <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 /> </tr>
551 <tr><td><code>DES-CBC3-MD5</code></td> <td>SSLv2</td> <td>RSA</td> <td>RSA</td> <td>3DES(168)</td> <td>MD5</td> <td /> </tr>
552 <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 /> </tr>
553 <tr><td><code>RC4-SHA</code></td> <td>SSLv3</td> <td>RSA</td> <td>RSA</td> <td>RC4(128)</td> <td>SHA1</td> <td /> </tr>
554 <tr><td><code>RC4-MD5</code></td> <td>SSLv3</td> <td>RSA</td> <td>RSA</td> <td>RC4(128)</td> <td>MD5</td> <td /> </tr>
555 <tr><td><code>IDEA-CBC-MD5</code></td> <td>SSLv2</td> <td>RSA</td> <td>RSA</td> <td>IDEA(128)</td> <td>MD5</td> <td /> </tr>
556 <tr><td><code>RC2-CBC-MD5</code></td> <td>SSLv2</td> <td>RSA</td> <td>RSA</td> <td>RC2(128)</td> <td>MD5</td> <td /> </tr>
557 <tr><td><code>RC4-MD5</code></td> <td>SSLv2</td> <td>RSA</td> <td>RSA</td> <td>RC4(128)</td> <td>MD5</td> <td /> </tr>
558 <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 /> </tr>
559 <tr><td><code>RC4-64-MD5</code></td> <td>SSLv2</td> <td>RSA</td> <td>RSA</td> <td>RC4(64)</td> <td>MD5</td> <td /> </tr>
560 <tr><td><code>DES-CBC-MD5</code></td> <td>SSLv2</td> <td>RSA</td> <td>RSA</td> <td>DES(56)</td> <td>MD5</td> <td /> </tr>
561 <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>
562 <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>
563 <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>
564 <tr><td><code>EXP-RC2-CBC-MD5</code></td> <td>SSLv2</td> <td>RSA(512)</td> <td>RSA</td> <td>RC2(40)</td> <td>MD5</td> <td> export</td> </tr>
565 <tr><td><code>EXP-RC4-MD5</code></td> <td>SSLv2</td> <td>RSA(512)</td> <td>RSA</td> <td>RC4(40)</td> <td>MD5</td> <td> export</td> </tr>
566 <tr><td><code>NULL-SHA</code></td> <td>SSLv3</td> <td>RSA</td> <td>RSA</td> <td>None</td> <td>SHA1</td> <td /> </tr>
567 <tr><td><code>NULL-MD5</code></td> <td>SSLv3</td> <td>RSA</td> <td>RSA</td> <td>None</td> <td>MD5</td> <td /> </tr>
568 <tr><td colspan="7"><em>Diffie-Hellman Ciphers:</em></td></tr>
569 <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 /> </tr>
570 <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 /> </tr>
571 <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 /> </tr>
572 <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 /> </tr>
573 <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 /> </tr>
574 <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 /> </tr>
575 <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 /> </tr>
576 <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>
577 <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>
578 <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>
579 <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>
580 </table>
582 </div>
583 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
584 <div class="directive-section"><h2><a name="SSLCryptoDevice" id="SSLCryptoDevice">SSLCryptoDevice</a> <a name="sslcryptodevice" id="sslcryptodevice">Directive</a></h2>
585 <table class="directive">
586 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enable use of a cryptographic hardware accelerator</td></tr>
587 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLCryptoDevice <em>engine</em></code></td></tr>
588 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSLCryptoDevice builtin</code></td></tr>
589 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
590 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
591 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
592 </table>
594 This directive enables use of a cryptographic hardware accelerator
595 board to offload some of the SSL processing overhead. This directive
596 can only be used if the SSL toolkit is built with "engine" support;
597 OpenSSL 0.9.7 and later releases have "engine" support by default, the
598 separate "-engine" releases of OpenSSL 0.9.6 must be used.</p>
600 <p>To discover which engine names are supported, run the command
601 "<code>openssl engine</code>".</p>
603 <div class="example"><h3>Example</h3><p><code>
604 # For a Broadcom accelerator:<br />
605 SSLCryptoDevice ubsec
606 </code></p></div>
608 </div>
609 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
610 <div class="directive-section"><h2><a name="SSLEngine" id="SSLEngine">SSLEngine</a> <a name="sslengine" id="sslengine">Directive</a></h2>
611 <table class="directive">
612 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>SSL Engine Operation Switch</td></tr>
613 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLEngine on|off|optional</code></td></tr>
614 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSLEngine off</code></td></tr>
615 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
616 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
617 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
618 </table>
620 This directive toggles the usage of the SSL/TLS Protocol Engine. This
621 is usually used inside a <code class="directive"><a href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code> section to enable SSL/TLS for a
622 particular virtual host. By default the SSL/TLS Protocol Engine is
623 disabled for both the main server and all configured virtual hosts.</p>
624 <div class="example"><h3>Example</h3><p><code>
625 &lt;VirtualHost _default_:443&gt;<br />
626 SSLEngine on<br />
627 ...<br />
628 &lt;/VirtualHost&gt;
629 </code></p></div>
630 <p>In Apache 2.1 and later, <code class="directive">SSLEngine</code> can be set to
631 <code>optional</code>. This enables support for
632 <a href="http://www.ietf.org/rfc/rfc2817.txt">RFC 2817</a>, Upgrading to TLS
633 Within HTTP/1.1. At this time no web browsers support RFC 2817.</p>
635 </div>
636 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
637 <div class="directive-section"><h2><a name="SSLHonorCipherOrder" id="SSLHonorCipherOrder">SSLHonorCipherOrder</a> <a name="sslhonorcipherorder" id="sslhonorcipherorder">Directive</a></h2>
638 <table class="directive">
639 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Option to prefer the server's cipher preference order</td></tr>
640 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLHonorCiperOrder <em>flag</em></code></td></tr>
641 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
642 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
643 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
644 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.1 and later, if using OpenSSL 0.9.7 or later</td></tr>
645 </table>
646 <p>When choosing a cipher during an SSLv3 or TLSv1 handshake, normally
647 the client's preference is used. If this directive is enabled, the
648 server's preference will be used instead.</p>
649 <div class="example"><h3>Example</h3><p><code>
650 SSLHonorCipherOrder on
651 </code></p></div>
653 </div>
654 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
655 <div class="directive-section"><h2><a name="SSLMutex" id="SSLMutex">SSLMutex</a> <a name="sslmutex" id="sslmutex">Directive</a></h2>
656 <table class="directive">
657 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Semaphore for internal mutual exclusion of
658 operations</td></tr>
659 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLMutex <em>type</em></code></td></tr>
660 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSLMutex none</code></td></tr>
661 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
662 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
663 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
664 </table>
666 This configures the SSL engine's semaphore (aka. lock) which is used for mutual
667 exclusion of operations which have to be done in a synchronized way between the
668 pre-forked Apache server processes. This directive can only be used in the
669 global server context because it's only useful to have one global mutex.
670 This directive is designed to closely match the
671 <code class="directive"><a href="../mod/mpm_common.html#acceptmutex">AcceptMutex</a></code> directive.</p>
673 The following Mutex <em>types</em> are available:</p>
674 <ul>
675 <li><code>none | no</code>
677 This is the default where no Mutex is used at all. Use it at your own
678 risk. But because currently the Mutex is mainly used for synchronizing
679 write access to the SSL Session Cache you can live without it as long
680 as you accept a sometimes garbled Session Cache. So it's not recommended
681 to leave this the default. Instead configure a real Mutex.</p></li>
682 <li><code>posixsem</code>
684 This is an elegant Mutex variant where a Posix Semaphore is used when possible.
685 It is only available when the underlying platform
686 and <a class="glossarylink" href="../glossary.html#apr" title="see glossary">APR</a> supports it.</p></li>
687 <li><code>sysvsem</code>
689 This is a somewhat elegant Mutex variant where a SystemV IPC Semaphore is used when
690 possible. It is possible to "leak" SysV semaphores if processes crash before
691 the semaphore is removed. It is only available when the underlying platform
692 and <a class="glossarylink" href="../glossary.html#apr" title="see glossary">APR</a> supports it.</p></li>
693 <li><code>sem</code>
695 This directive tells the SSL Module to pick the "best" semaphore implementation
696 available to it, choosing between Posix and SystemV IPC, in that order. It is only
697 available when the underlying platform and <a class="glossarylink" href="../glossary.html#apr" title="see glossary">APR</a> supports at least one of the 2.</p></li>
698 <li><code>pthread</code>
700 This directive tells the SSL Module to use Posix thread mutexes. It is only available
701 if the underlying platform and <a class="glossarylink" href="../glossary.html#apr" title="see glossary">APR</a> supports it.</p></li>
702 <li><code>fcntl:/path/to/mutex</code>
704 This is a portable Mutex variant where a physical (lock-)file and the <code>fcntl()</code>
705 fucntion are used as the Mutex.
706 Always use a local disk filesystem for <code>/path/to/mutex</code> and never a file
707 residing on a NFS- or AFS-filesystem. It is only available when the underlying platform
708 and <a class="glossarylink" href="../glossary.html#apr" title="see glossary">APR</a> supports it. Note: Internally, the Process ID (PID) of the
709 Apache parent process is automatically appended to
710 <code>/path/to/mutex</code> to make it unique, so you don't have to worry
711 about conflicts yourself. Notice that this type of mutex is not available
712 under the Win32 environment. There you <em>have</em> to use the semaphore
713 mutex.</p></li>
714 <li><code>flock:/path/to/mutex</code>
716 This is similar to the <code>fcntl:/path/to/mutex</code> method with the
717 exception that the <code>flock()</code> function is used to provide file
718 locking. It is only available when the underlying platform
719 and <a class="glossarylink" href="../glossary.html#apr" title="see glossary">APR</a> supports it.</p></li>
720 <li><code>file:/path/to/mutex</code>
722 This directive tells the SSL Module to pick the "best" file locking implementation
723 available to it, choosing between <code>fcntl</code> and <code>flock</code>,
724 in that order. It is only available when the underlying platform and <a class="glossarylink" href="../glossary.html#apr" title="see glossary">APR</a> supports
725 at least one of the 2.</p></li>
726 <li><code>default | yes</code>
728 This directive tells the SSL Module to pick the default locking implementation
729 as determined by the platform and <a class="glossarylink" href="../glossary.html#apr" title="see glossary">APR</a>.</p></li>
730 </ul>
731 <div class="example"><h3>Example</h3><p><code>
732 SSLMutex file:/usr/local/apache/logs/ssl_mutex
733 </code></p></div>
735 </div>
736 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
737 <div class="directive-section"><h2><a name="SSLOCSPDefaultResponder" id="SSLOCSPDefaultResponder">SSLOCSPDefaultResponder</a> <a name="sslocspdefaultresponder" id="sslocspdefaultresponder">Directive</a></h2>
738 <table class="directive">
739 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Set the default responder URI for OCSP validation</td></tr>
740 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLOCSDefaultResponder <em>uri</em></code></td></tr>
741 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
742 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
743 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
744 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in httpd 2.3 and later, if using OpenSSL 0.9.7 or later</td></tr>
745 </table>
746 <p>This option sets the default OCSP responder to use. If <code class="directive"><a href="#sslocspoverrideresponder">SSLOCSPOverrideResponder</a></code> is not enabled,
747 the URI given will be used only if no responder URI is specified in
748 the certificate being verified.</p>
750 </div>
751 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
752 <div class="directive-section"><h2><a name="SSLOCSPEnable" id="SSLOCSPEnable">SSLOCSPEnable</a> <a name="sslocspenable" id="sslocspenable">Directive</a></h2>
753 <table class="directive">
754 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enable OCSP validation of the client certificate chain</td></tr>
755 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLOCSPEnable <em>flag</em></code></td></tr>
756 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
757 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
758 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
759 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in httpd 2.3 and later, if using OpenSSL 0.9.7 or later</td></tr>
760 </table>
761 <p>This option enables OCSP validation of the client certificate
762 chain. If this option is enabled, certificates in the client's
763 certificate chain will be validated against an OCSP responder after
764 normal verification (including CRL checks) have taken place.</p>
766 <p>The OCSP responder used is either extracted from the certificate
767 itself, or derived by configuration; see the
768 <code class="directive"><a href="#sslocspdefaultresponder">SSLOCSPDefaultResponder</a></code> and
769 <code class="directive"><a href="#sslocspoverrideresponder">SSLOCSPOverrideResponder</a></code>
770 directives.</p>
772 <div class="example"><h3>Example</h3><p><code>
773 SSLVerifyClient on<br />
774 SSLOCSPEnable on<br />
775 SSLOCSPDefaultResponder http://responder.example.com:8888/responder<br />
776 SSLOCSPOverrideResponder on
777 </code></p></div>
779 </div>
780 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
781 <div class="directive-section"><h2><a name="SSLOCSPOverrideResponder" id="SSLOCSPOverrideResponder">SSLOCSPOverrideResponder</a> <a name="sslocspoverrideresponder" id="sslocspoverrideresponder">Directive</a></h2>
782 <table class="directive">
783 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Force use of the default responder URI for OCSP validation</td></tr>
784 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLOCSPOverrideResponder <em>flag</em></code></td></tr>
785 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
786 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
787 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
788 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in httpd 2.3 and later, if using OpenSSL 0.9.7 or later</td></tr>
789 </table>
790 <p>This option forces the configured default OCSP responder to be used
791 during OCSP certificate validation, regardless of whether the
792 certificate being validated references an OCSP responder.</p>
794 </div>
795 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
796 <div class="directive-section"><h2><a name="SSLOptions" id="SSLOptions">SSLOptions</a> <a name="ssloptions" id="ssloptions">Directive</a></h2>
797 <table class="directive">
798 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configure various SSL engine run-time options</td></tr>
799 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLOptions [+|-]<em>option</em> ...</code></td></tr>
800 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
801 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Options</td></tr>
802 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
803 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
804 </table>
806 This directive can be used to control various run-time options on a
807 per-directory basis. Normally, if multiple <code>SSLOptions</code>
808 could apply to a directory, then the most specific one is taken
809 completely; the options are not merged. However if <em>all</em> the
810 options on the <code>SSLOptions</code> directive are preceded by a
811 plus (<code>+</code>) or minus (<code>-</code>) symbol, the options
812 are merged. Any options preceded by a <code>+</code> are added to the
813 options currently in force, and any options preceded by a
814 <code>-</code> are removed from the options currently in force.</p>
816 The available <em>option</em>s are:</p>
817 <ul>
818 <li><code>StdEnvVars</code>
820 When this option is enabled, the standard set of SSL related CGI/SSI
821 environment variables are created. This per default is disabled for
822 performance reasons, because the information extraction step is a
823 rather expensive operation. So one usually enables this option for
824 CGI and SSI requests only.</p>
825 </li>
826 <li><code>CompatEnvVars</code>
828 When this option is enabled, additional CGI/SSI environment variables are
829 created for backward compatibility to other Apache SSL solutions. Look in
830 the <a href="../ssl/ssl_compat.html">Compatibility</a> chapter for details
831 on the particular variables generated.</p>
832 </li>
833 <li><code>ExportCertData</code>
835 When this option is enabled, additional CGI/SSI environment variables are
836 created: <code>SSL_SERVER_CERT</code>, <code>SSL_CLIENT_CERT</code> and
837 <code>SSL_CLIENT_CERT_CHAIN_</code><em>n</em> (with <em>n</em> = 0,1,2,..).
838 These contain the PEM-encoded X.509 Certificates of server and client for
839 the current HTTPS connection and can be used by CGI scripts for deeper
840 Certificate checking. Additionally all other certificates of the client
841 certificate chain are provided, too. This bloats up the environment a
842 little bit which is why you have to use this option to enable it on
843 demand.</p>
844 </li>
845 <li><code>FakeBasicAuth</code>
847 When this option is enabled, the Subject Distinguished Name (DN) of the
848 Client X509 Certificate is translated into a HTTP Basic Authorization
849 username. This means that the standard Apache authentication methods can
850 be used for access control. The user name is just the Subject of the
851 Client's X509 Certificate (can be determined by running OpenSSL's
852 <code>openssl x509</code> command: <code>openssl x509 -noout -subject -in
853 </code><em>certificate</em><code>.crt</code>). Note that no password is
854 obtained from the user. Every entry in the user file needs this password:
855 ``<code>xxj31ZMTZzkVA</code>'', which is the DES-encrypted version of the
856 word `<code>password</code>''. Those who live under MD5-based encryption
857 (for instance under FreeBSD or BSD/OS, etc.) should use the following MD5
858 hash of the same word: ``<code>$1$OXLyS...$Owx8s2/m9/gfkcRVXzgoE/</code>''.</p>
859 </li>
860 <li><code>StrictRequire</code>
862 This <em>forces</em> forbidden access when <code>SSLRequireSSL</code> or
863 <code>SSLRequire</code> successfully decided that access should be
864 forbidden. Usually the default is that in the case where a ``<code>Satisfy
865 any</code>'' directive is used, and other access restrictions are passed,
866 denial of access due to <code>SSLRequireSSL</code> or
867 <code>SSLRequire</code> is overridden (because that's how the Apache
868 <code>Satisfy</code> mechanism should work.) But for strict access restriction
869 you can use <code>SSLRequireSSL</code> and/or <code>SSLRequire</code> in
870 combination with an ``<code>SSLOptions +StrictRequire</code>''. Then an
871 additional ``<code>Satisfy Any</code>'' has no chance once mod_ssl has
872 decided to deny access.</p>
873 </li>
874 <li><code>OptRenegotiate</code>
876 This enables optimized SSL connection renegotiation handling when SSL
877 directives are used in per-directory context. By default a strict
878 scheme is enabled where <em>every</em> per-directory reconfiguration of
879 SSL parameters causes a <em>full</em> SSL renegotiation handshake. When this
880 option is used mod_ssl tries to avoid unnecessary handshakes by doing more
881 granular (but still safe) parameter checks. Nevertheless these granular
882 checks sometimes maybe not what the user expects, so enable this on a
883 per-directory basis only, please.</p>
884 </li>
885 </ul>
886 <div class="example"><h3>Example</h3><p><code>
887 SSLOptions +FakeBasicAuth -StrictRequire<br />
888 &lt;Files ~ "\.(cgi|shtml)$"&gt;<br />
889 SSLOptions +StdEnvVars +CompatEnvVars -ExportCertData<br />
890 &lt;Files&gt;
891 </code></p></div>
893 </div>
894 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
895 <div class="directive-section"><h2><a name="SSLPassPhraseDialog" id="SSLPassPhraseDialog">SSLPassPhraseDialog</a> <a name="sslpassphrasedialog" id="sslpassphrasedialog">Directive</a></h2>
896 <table class="directive">
897 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Type of pass phrase dialog for encrypted private
898 keys</td></tr>
899 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLPassPhraseDialog <em>type</em></code></td></tr>
900 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSLPassPhraseDialog builtin</code></td></tr>
901 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
902 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
903 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
904 </table>
906 When Apache starts up it has to read the various Certificate (see
907 <code class="directive"><a href="#sslcertificatefile">SSLCertificateFile</a></code>) and
908 Private Key (see <code class="directive"><a href="#sslcertificatekeyfile">SSLCertificateKeyFile</a></code>) files of the
909 SSL-enabled virtual servers. Because for security reasons the Private
910 Key files are usually encrypted, mod_ssl needs to query the
911 administrator for a Pass Phrase in order to decrypt those files. This
912 query can be done in two ways which can be configured by
913 <em>type</em>:</p>
914 <ul>
915 <li><code>builtin</code>
917 This is the default where an interactive terminal dialog occurs at startup
918 time just before Apache detaches from the terminal. Here the administrator
919 has to manually enter the Pass Phrase for each encrypted Private Key file.
920 Because a lot of SSL-enabled virtual hosts can be configured, the
921 following reuse-scheme is used to minimize the dialog: When a Private Key
922 file is encrypted, all known Pass Phrases (at the beginning there are
923 none, of course) are tried. If one of those known Pass Phrases succeeds no
924 dialog pops up for this particular Private Key file. If none succeeded,
925 another Pass Phrase is queried on the terminal and remembered for the next
926 round (where it perhaps can be reused).</p>
928 This scheme allows mod_ssl to be maximally flexible (because for N encrypted
929 Private Key files you <em>can</em> use N different Pass Phrases - but then
930 you have to enter all of them, of course) while minimizing the terminal
931 dialog (i.e. when you use a single Pass Phrase for all N Private Key files
932 this Pass Phrase is queried only once).</p></li>
934 <li><code>|/path/to/program [args...]</code>
936 <p>This mode allows an external program to be used which acts as a
937 pipe to a particular input device; the program is sent the standard
938 prompt text used for the <code>builtin</code> mode on
939 <code>stdin</code>, and is expected to write password strings on
940 <code>stdout</code>. If several passwords are needed (or an
941 incorrect password is entered), additional prompt text will be
942 written subsequent to the first password being returned, and more
943 passwords must then be written back.</p></li>
945 <li><code>exec:/path/to/program</code>
947 Here an external program is configured which is called at startup for each
948 encrypted Private Key file. It is called with two arguments (the first is
949 of the form ``<code>servername:portnumber</code>'', the second is either
950 ``<code>RSA</code>'' or ``<code>DSA</code>''), which indicate for which
951 server and algorithm it has to print the corresponding Pass Phrase to
952 <code>stdout</code>. The intent is that this external program first runs
953 security checks to make sure that the system is not compromised by an
954 attacker, and only when these checks were passed successfully it provides
955 the Pass Phrase.</p>
957 Both these security checks, and the way the Pass Phrase is determined, can
958 be as complex as you like. Mod_ssl just defines the interface: an
959 executable program which provides the Pass Phrase on <code>stdout</code>.
960 Nothing more or less! So, if you're really paranoid about security, here
961 is your interface. Anything else has to be left as an exercise to the
962 administrator, because local security requirements are so different.</p>
964 The reuse-algorithm above is used here, too. In other words: The external
965 program is called only once per unique Pass Phrase.</p></li>
966 </ul>
967 <div class="example"><h3>Example</h3><p><code>
968 SSLPassPhraseDialog exec:/usr/local/apache/sbin/pp-filter
969 </code></p></div>
971 </div>
972 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
973 <div class="directive-section"><h2><a name="SSLProtocol" id="SSLProtocol">SSLProtocol</a> <a name="sslprotocol" id="sslprotocol">Directive</a></h2>
974 <table class="directive">
975 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configure usable SSL protocol versions</td></tr>
976 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLProtocol [+|-]<em>protocol</em> ...</code></td></tr>
977 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSLProtocol all</code></td></tr>
978 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
979 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
980 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
981 </table>
983 This directive can be used to control which versions of the SSL protocol
984 will be accepted in new connections.</p>
986 The available (case-insensitive) <em>protocol</em>s are:</p>
987 <ul>
988 <li><code>SSLv2</code>
990 This is the Secure Sockets Layer (SSL) protocol, version 2.0. It is the
991 original SSL protocol as designed by Netscape Corporation. Though it's
992 use has been deprecated, because of weaknesses in the security of the protocol.</p></li>
994 <li><code>SSLv3</code>
996 This is the Secure Sockets Layer (SSL) protocol, version 3.0, from the Netscape Corportaion.
997 It is the successor to SSLv2 and the predecessor to TLSv1. It's supported by
998 almost all popular browsers.</p></li>
1000 <li><code>TLSv1</code>
1002 This is the Transport Layer Security (TLS) protocol, version 1.0. It is the
1003 successor to SSLv3 and is defined in <a href="http://www.ietf.org/rfc/rfc2246.txt">RFC2246</a>.
1004 Which has been obsoleted by <a href="http://www.ietf.org/rfc/rfc4346.txt">RFC4346</a>.</p></li>
1006 <li><code>All</code>
1008 This is a shortcut for ``<code>+SSLv2 +SSLv3 +TLSv1</code>'' and a
1009 convenient way for enabling all protocols except one when used in
1010 combination with the minus sign on a protocol as the example above
1011 shows.</p></li>
1012 </ul>
1013 <div class="example"><h3>Example</h3><p><code>
1014 # enable SSLv3 and TLSv1, but not SSLv2<br />
1015 SSLProtocol all -SSLv2
1016 </code></p></div>
1018 </div>
1019 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1020 <div class="directive-section"><h2><a name="SSLProxyCACertificateFile" id="SSLProxyCACertificateFile">SSLProxyCACertificateFile</a> <a name="sslproxycacertificatefile" id="sslproxycacertificatefile">Directive</a></h2>
1021 <table class="directive">
1022 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>File of concatenated PEM-encoded CA Certificates
1023 for Remote Server Auth</td></tr>
1024 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLProxyCACertificateFile <em>file-path</em></code></td></tr>
1025 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
1026 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
1027 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
1028 </table>
1030 This directive sets the <em>all-in-one</em> file where you can assemble the
1031 Certificates of Certification Authorities (CA) whose <em>remote servers</em> you deal
1032 with. These are used for Remote Server Authentication. Such a file is simply the
1033 concatenation of the various PEM-encoded Certificate files, in order of
1034 preference. This can be used alternatively and/or additionally to
1035 <code class="directive"><a href="#sslproxycacertificatepath">SSLProxyCACertificatePath</a></code>.</p>
1036 <div class="example"><h3>Example</h3><p><code>
1037 SSLProxyCACertificateFile /usr/local/apache2/conf/ssl.crt/ca-bundle-remote-server.crt
1038 </code></p></div>
1040 </div>
1041 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1042 <div class="directive-section"><h2><a name="SSLProxyCACertificatePath" id="SSLProxyCACertificatePath">SSLProxyCACertificatePath</a> <a name="sslproxycacertificatepath" id="sslproxycacertificatepath">Directive</a></h2>
1043 <table class="directive">
1044 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Directory of PEM-encoded CA Certificates for
1045 Remote Server Auth</td></tr>
1046 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLProxyCACertificatePath <em>directory-path</em></code></td></tr>
1047 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
1048 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
1049 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
1050 </table>
1052 This directive sets the directory where you keep the Certificates of
1053 Certification Authorities (CAs) whose remote servers you deal with. These are used to
1054 verify the remote server certificate on Remote Server Authentication.</p>
1056 The files in this directory have to be PEM-encoded and are accessed through
1057 hash filenames. So usually you can't just place the Certificate files
1058 there: you also have to create symbolic links named
1059 <em>hash-value</em><code>.N</code>. And you should always make sure this directory
1060 contains the appropriate symbolic links. Use the <code>Makefile</code> which
1061 comes with mod_ssl to accomplish this task.</p>
1062 <div class="example"><h3>Example</h3><p><code>
1063 SSLProxyCACertificatePath /usr/local/apache2/conf/ssl.crt/
1064 </code></p></div>
1066 </div>
1067 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1068 <div class="directive-section"><h2><a name="SSLProxyCARevocationFile" id="SSLProxyCARevocationFile">SSLProxyCARevocationFile</a> <a name="sslproxycarevocationfile" id="sslproxycarevocationfile">Directive</a></h2>
1069 <table class="directive">
1070 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>File of concatenated PEM-encoded CA CRLs for
1071 Remote Server Auth</td></tr>
1072 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLProxyCARevocationFile <em>file-path</em></code></td></tr>
1073 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
1074 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
1075 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
1076 </table>
1078 This directive sets the <em>all-in-one</em> file where you can
1079 assemble the Certificate Revocation Lists (CRL) of Certification
1080 Authorities (CA) whose <em>remote servers</em> you deal with. These are used
1081 for Remote Server Authentication. Such a file is simply the concatenation of
1082 the various PEM-encoded CRL files, in order of preference. This can be
1083 used alternatively and/or additionally to <code class="directive"><a href="#sslproxycarevocationpath">SSLProxyCARevocationPath</a></code>.</p>
1084 <div class="example"><h3>Example</h3><p><code>
1085 SSLProxyCARevocationFile /usr/local/apache2/conf/ssl.crl/ca-bundle-remote-server.crl
1086 </code></p></div>
1088 </div>
1089 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1090 <div class="directive-section"><h2><a name="SSLProxyCARevocationPath" id="SSLProxyCARevocationPath">SSLProxyCARevocationPath</a> <a name="sslproxycarevocationpath" id="sslproxycarevocationpath">Directive</a></h2>
1091 <table class="directive">
1092 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Directory of PEM-encoded CA CRLs for
1093 Remote Server Auth</td></tr>
1094 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLProxyCARevocationPath <em>directory-path</em></code></td></tr>
1095 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
1096 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
1097 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
1098 </table>
1100 This directive sets the directory where you keep the Certificate Revocation
1101 Lists (CRL) of Certification Authorities (CAs) whose remote servers you deal with.
1102 These are used to revoke the remote server certificate on Remote Server Authentication.</p>
1104 The files in this directory have to be PEM-encoded and are accessed through
1105 hash filenames. So usually you have not only to place the CRL files there.
1106 Additionally you have to create symbolic links named
1107 <em>hash-value</em><code>.rN</code>. And you should always make sure this directory
1108 contains the appropriate symbolic links. Use the <code>Makefile</code> which
1109 comes with <code class="module"><a href="../mod/mod_ssl.html">mod_ssl</a></code> to accomplish this task.</p>
1110 <div class="example"><h3>Example</h3><p><code>
1111 SSLProxyCARevocationPath /usr/local/apache2/conf/ssl.crl/
1112 </code></p></div>
1114 </div>
1115 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1116 <div class="directive-section"><h2><a name="SSLProxyCipherSuite" id="SSLProxyCipherSuite">SSLProxyCipherSuite</a> <a name="sslproxyciphersuite" id="sslproxyciphersuite">Directive</a></h2>
1117 <table class="directive">
1118 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Cipher Suite available for negotiation in SSL
1119 proxy handshake</td></tr>
1120 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLProxyCipherSuite <em>cipher-spec</em></code></td></tr>
1121 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSLProxyCipherSuite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP</code></td></tr>
1122 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
1123 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>AuthConfig</td></tr>
1124 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
1125 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
1126 </table>
1127 <p>Equivalent to <code>SSLCipherSuite</code>, but for the proxy connection.
1128 Please refer to <code class="directive"><a href="#sslciphersuite">SSLCipherSuite</a></code>
1129 for additional information.</p>
1131 </div>
1132 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1133 <div class="directive-section"><h2><a name="SSLProxyEngine" id="SSLProxyEngine">SSLProxyEngine</a> <a name="sslproxyengine" id="sslproxyengine">Directive</a></h2>
1134 <table class="directive">
1135 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>SSL Proxy Engine Operation Switch</td></tr>
1136 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLProxyEngine on|off</code></td></tr>
1137 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSLProxyEngine off</code></td></tr>
1138 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
1139 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
1140 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
1141 </table>
1143 This directive toggles the usage of the SSL/TLS Protocol Engine for proxy. This
1144 is usually used inside a <code class="directive"><a href="../mod/core.html#virtualhost">&lt;VirtualHost&gt;</a></code> section to enable SSL/TLS for proxy
1145 usage in a particular virtual host. By default the SSL/TLS Protocol Engine is
1146 disabled for proxy image both for the main server and all configured virtual hosts.</p>
1147 <div class="example"><h3>Example</h3><p><code>
1148 &lt;VirtualHost _default_:443&gt;<br />
1149 SSLProxyEngine on<br />
1150 ...<br />
1151 &lt;/VirtualHost&gt;
1152 </code></p></div>
1154 </div>
1155 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1156 <div class="directive-section"><h2><a name="SSLProxyMachineCertificateFile" id="SSLProxyMachineCertificateFile">SSLProxyMachineCertificateFile</a> <a name="sslproxymachinecertificatefile" id="sslproxymachinecertificatefile">Directive</a></h2>
1157 <table class="directive">
1158 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>File of concatenated PEM-encoded client certificates and keys to be used by the proxy</td></tr>
1159 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLProxyMachineCertificateFile <em>filename</em></code></td></tr>
1160 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
1161 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Not applicable</td></tr>
1162 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
1163 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
1164 </table>
1166 This directive sets the all-in-one file where you keep the certificates and
1167 keys used for authentication of the proxy server to remote servers.
1168 </p>
1170 This referenced file is simply the concatenation of the various PEM-encoded
1171 certificate files, in order of preference. Use this directive alternatively
1172 or additionally to <code>SSLProxyMachineCertificatePath</code>.
1173 </p>
1174 <div class="warning">
1175 <p>Currently there is no support for encrypted private keys</p>
1176 </div>
1177 <div class="example"><h3>Example</h3><p><code>
1178 SSLProxyMachineCertificateFile /usr/local/apache2/conf/ssl.crt/proxy.pem
1179 </code></p></div>
1181 </div>
1182 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1183 <div class="directive-section"><h2><a name="SSLProxyMachineCertificatePath" id="SSLProxyMachineCertificatePath">SSLProxyMachineCertificatePath</a> <a name="sslproxymachinecertificatepath" id="sslproxymachinecertificatepath">Directive</a></h2>
1184 <table class="directive">
1185 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Directory of PEM-encoded client certificates and keys to be used by the proxy</td></tr>
1186 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLProxyMachineCertificatePath <em>directory</em></code></td></tr>
1187 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
1188 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Not applicable</td></tr>
1189 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
1190 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
1191 </table>
1193 This directive sets the directory where you keep the certificates and
1194 keys used for authentication of the proxy server to remote servers.
1195 </p>
1196 <p>The files in this directory must be PEM-encoded and are accessed through
1197 hash filenames. Additionally, you must create symbolic links named
1198 <code><em>hash-value</em>.N</code>. And you should always make sure this
1199 directory contains the appropriate symbolic links. Use the Makefile which
1200 comes with mod_ssl to accomplish this task.
1201 </p>
1202 <div class="warning">
1203 <p>Currently there is no support for encrypted private keys</p>
1204 </div>
1205 <div class="example"><h3>Example</h3><p><code>
1206 SSLProxyMachineCertificatePath /usr/local/apache2/conf/proxy.crt/
1207 </code></p></div>
1209 </div>
1210 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1211 <div class="directive-section"><h2><a name="SSLProxyProtocol" id="SSLProxyProtocol">SSLProxyProtocol</a> <a name="sslproxyprotocol" id="sslproxyprotocol">Directive</a></h2>
1212 <table class="directive">
1213 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configure usable SSL protocol flavors for proxy usage</td></tr>
1214 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLProxyProtocol [+|-]<em>protocol</em> ...</code></td></tr>
1215 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSLProxyProtocol all</code></td></tr>
1216 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
1217 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Options</td></tr>
1218 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
1219 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
1220 </table>
1223 This directive can be used to control the SSL protocol flavors mod_ssl should
1224 use when establishing its server environment for proxy . It will only connect
1225 to servers using one of the provided protocols.</p>
1226 <p>Please refer to <code class="directive"><a href="#sslprotocol">SSLProtocol</a></code>
1227 for additional information.
1228 </p>
1230 </div>
1231 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1232 <div class="directive-section"><h2><a name="SSLProxyVerify" id="SSLProxyVerify">SSLProxyVerify</a> <a name="sslproxyverify" id="sslproxyverify">Directive</a></h2>
1233 <table class="directive">
1234 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Type of remote server Certificate verification</td></tr>
1235 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLProxyVerify <em>level</em></code></td></tr>
1236 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSLProxyVerify none</code></td></tr>
1237 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
1238 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>AuthConfig</td></tr>
1239 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
1240 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
1241 </table>
1243 <p>When a proxy is configured to forward requests to a remote SSL
1244 server, this directive can be used to configure certificate
1245 verification of the remote server. Notice that this directive can be
1246 used both in per-server and per-directory context. In per-server
1247 context it applies to the remote server authentication process used in
1248 the standard SSL handshake when a connection is established by the
1249 proxy. In per-directory context it forces a SSL renegotation with the
1250 reconfigured remote server verification level after the HTTP request
1251 was read but before the HTTP response is sent.</p>
1253 <div class="warning">
1254 <p>Note that even when certificate verification is enabled,
1255 <code class="module"><a href="../mod/mod_ssl.html">mod_ssl</a></code> does <strong>not</strong> check whether the
1256 <code>commonName</code> (hostname) attribute of the server certificate
1257 matches the hostname used to connect to the server. In other words,
1258 the proxy does not guarantee that the SSL connection to the backend
1259 server is "secure" beyond the fact that the certificate is signed by
1260 one of the CAs configured using the
1261 <code class="directive">SSLProxyCACertificatePath</code> and/or
1262 <code class="directive">SSLProxyCACertificateFile</code> directives.</p>
1263 </div>
1266 The following levels are available for <em>level</em>:</p>
1267 <ul>
1268 <li><strong>none</strong>:
1269 no remote server Certificate is required at all</li>
1270 <li><strong>optional</strong>:
1271 the remote server <em>may</em> present a valid Certificate</li>
1272 <li><strong>require</strong>:
1273 the remote server <em>has to</em> present a valid Certificate</li>
1274 <li><strong>optional_no_ca</strong>:
1275 the remote server may present a valid Certificate<br />
1276 but it need not to be (successfully) verifiable.</li>
1277 </ul>
1278 <p>In practice only levels <strong>none</strong> and
1279 <strong>require</strong> are really interesting, because level
1280 <strong>optional</strong> doesn't work with all servers and level
1281 <strong>optional_no_ca</strong> is actually against the idea of
1282 authentication (but can be used to establish SSL test pages, etc.)</p>
1283 <div class="example"><h3>Example</h3><p><code>
1284 SSLProxyVerify require
1285 </code></p></div>
1287 </div>
1288 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1289 <div class="directive-section"><h2><a name="SSLProxyVerifyDepth" id="SSLProxyVerifyDepth">SSLProxyVerifyDepth</a> <a name="sslproxyverifydepth" id="sslproxyverifydepth">Directive</a></h2>
1290 <table class="directive">
1291 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Maximum depth of CA Certificates in Remote Server
1292 Certificate verification</td></tr>
1293 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLProxyVerifyDepth <em>number</em></code></td></tr>
1294 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSLProxyVerifyDepth 1</code></td></tr>
1295 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
1296 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>AuthConfig</td></tr>
1297 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
1298 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
1299 </table>
1301 This directive sets how deeply mod_ssl should verify before deciding that the
1302 remote server does not have a valid certificate. Notice that this directive can be
1303 used both in per-server and per-directory context. In per-server context it
1304 applies to the client authentication process used in the standard SSL
1305 handshake when a connection is established. In per-directory context it forces
1306 a SSL renegotation with the reconfigured remote server verification depth after the
1307 HTTP request was read but before the HTTP response is sent.</p>
1309 The depth actually is the maximum number of intermediate certificate issuers,
1310 i.e. the number of CA certificates which are max allowed to be followed while
1311 verifying the remote server certificate. A depth of 0 means that self-signed
1312 remote server certificates are accepted only, the default depth of 1 means
1313 the remote server certificate can be self-signed or has to be signed by a CA
1314 which is directly known to the server (i.e. the CA's certificate is under
1315 <code class="directive"><a href="#sslproxycacertificatepath">SSLProxyCACertificatePath</a></code>), etc.</p>
1316 <div class="example"><h3>Example</h3><p><code>
1317 SSLProxyVerifyDepth 10
1318 </code></p></div>
1320 </div>
1321 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1322 <div class="directive-section"><h2><a name="SSLRandomSeed" id="SSLRandomSeed">SSLRandomSeed</a> <a name="sslrandomseed" id="sslrandomseed">Directive</a></h2>
1323 <table class="directive">
1324 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Pseudo Random Number Generator (PRNG) seeding
1325 source</td></tr>
1326 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLRandomSeed <em>context</em> <em>source</em>
1327 [<em>bytes</em>]</code></td></tr>
1328 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
1329 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
1330 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
1331 </table>
1333 This configures one or more sources for seeding the Pseudo Random Number
1334 Generator (PRNG) in OpenSSL at startup time (<em>context</em> is
1335 <code>startup</code>) and/or just before a new SSL connection is established
1336 (<em>context</em> is <code>connect</code>). This directive can only be used
1337 in the global server context because the PRNG is a global facility.</p>
1339 The following <em>source</em> variants are available:</p>
1340 <ul>
1341 <li><code>builtin</code>
1342 <p> This is the always available builtin seeding source. It's usage
1343 consumes minimum CPU cycles under runtime and hence can be always used
1344 without drawbacks. The source used for seeding the PRNG contains of the
1345 current time, the current process id and (when applicable) a randomly
1346 choosen 1KB extract of the inter-process scoreboard structure of Apache.
1347 The drawback is that this is not really a strong source and at startup
1348 time (where the scoreboard is still not available) this source just
1349 produces a few bytes of entropy. So you should always, at least for the
1350 startup, use an additional seeding source.</p></li>
1351 <li><code>file:/path/to/source</code>
1353 This variant uses an external file <code>/path/to/source</code> as the
1354 source for seeding the PRNG. When <em>bytes</em> is specified, only the
1355 first <em>bytes</em> number of bytes of the file form the entropy (and
1356 <em>bytes</em> is given to <code>/path/to/source</code> as the first
1357 argument). When <em>bytes</em> is not specified the whole file forms the
1358 entropy (and <code>0</code> is given to <code>/path/to/source</code> as
1359 the first argument). Use this especially at startup time, for instance
1360 with an available <code>/dev/random</code> and/or
1361 <code>/dev/urandom</code> devices (which usually exist on modern Unix
1362 derivates like FreeBSD and Linux).</p>
1364 <em>But be careful</em>: Usually <code>/dev/random</code> provides only as
1365 much entropy data as it actually has, i.e. when you request 512 bytes of
1366 entropy, but the device currently has only 100 bytes available two things
1367 can happen: On some platforms you receive only the 100 bytes while on
1368 other platforms the read blocks until enough bytes are available (which
1369 can take a long time). Here using an existing <code>/dev/urandom</code> is
1370 better, because it never blocks and actually gives the amount of requested
1371 data. The drawback is just that the quality of the received data may not
1372 be the best.</p>
1374 On some platforms like FreeBSD one can even control how the entropy is
1375 actually generated, i.e. by which system interrupts. More details one can
1376 find under <em>rndcontrol(8)</em> on those platforms. Alternatively, when
1377 your system lacks such a random device, you can use tool
1378 like <a href="http://www.lothar.com/tech/crypto/">EGD</a>
1379 (Entropy Gathering Daemon) and run it's client program with the
1380 <code>exec:/path/to/program/</code> variant (see below) or use
1381 <code>egd:/path/to/egd-socket</code> (see below).</p></li>
1383 <li><code>exec:/path/to/program</code>
1385 This variant uses an external executable
1386 <code>/path/to/program</code> as the source for seeding the
1387 PRNG. When <em>bytes</em> is specified, only the first
1388 <em>bytes</em> number of bytes of its <code>stdout</code> contents
1389 form the entropy. When <em>bytes</em> is not specified, the
1390 entirety of the data produced on <code>stdout</code> form the
1391 entropy. Use this only at startup time when you need a very strong
1392 seeding with the help of an external program (for instance as in
1393 the example above with the <code>truerand</code> utility you can
1394 find in the mod_ssl distribution which is based on the AT&amp;T
1395 <em>truerand</em> library). Using this in the connection context
1396 slows down the server too dramatically, of course. So usually you
1397 should avoid using external programs in that context.</p></li>
1398 <li><code>egd:/path/to/egd-socket</code> (Unix only)
1400 This variant uses the Unix domain socket of the
1401 external Entropy Gathering Daemon (EGD) (see <a href="http://www.lothar.com/tech/crypto/">http://www.lothar.com/tech
1402 /crypto/</a>) to seed the PRNG. Use this if no random device exists
1403 on your platform.</p></li>
1404 </ul>
1405 <div class="example"><h3>Example</h3><p><code>
1406 SSLRandomSeed startup builtin<br />
1407 SSLRandomSeed startup file:/dev/random<br />
1408 SSLRandomSeed startup file:/dev/urandom 1024<br />
1409 SSLRandomSeed startup exec:/usr/local/bin/truerand 16<br />
1410 SSLRandomSeed connect builtin<br />
1411 SSLRandomSeed connect file:/dev/random<br />
1412 SSLRandomSeed connect file:/dev/urandom 1024<br />
1413 </code></p></div>
1415 </div>
1416 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1417 <div class="directive-section"><h2><a name="SSLRenegBufferSize" id="SSLRenegBufferSize">SSLRenegBufferSize</a> <a name="sslrenegbuffersize" id="sslrenegbuffersize">Directive</a></h2>
1418 <table class="directive">
1419 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Set the size for the SSL renegotiation buffer</td></tr>
1420 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLRenegBufferSize <var>bytes</var></code></td></tr>
1421 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSLRenegBufferSize 131072</code></td></tr>
1422 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
1423 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>AuthConfig</td></tr>
1424 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
1425 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
1426 </table>
1428 <p>If an SSL renegotiation is required in per-location context, for
1429 example, any use of <code class="directive"><a href="#sslverifyclient">SSLVerifyClient</a></code> in a Directory or
1430 Location block, then <code class="module"><a href="../mod/mod_ssl.html">mod_ssl</a></code> must buffer any HTTP
1431 request body into memory until the new SSL handshake can be performed.
1432 This directive can be used to set the amount of memory that will be
1433 used for this buffer. </p>
1435 <div class="warning"><p>
1436 Note that in many configurations, the client sending the request body
1437 will be untrusted so a denial of service attack by consumption of
1438 memory must be considered when changing this configuration setting.
1439 </p></div>
1441 <div class="example"><h3>Example</h3><p><code>
1442 SSLRenegBufferSize 262144
1443 </code></p></div>
1445 </div>
1446 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1447 <div class="directive-section"><h2><a name="SSLRequire" id="SSLRequire">SSLRequire</a> <a name="sslrequire" id="sslrequire">Directive</a></h2>
1448 <table class="directive">
1449 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Allow access only when an arbitrarily complex
1450 boolean expression is true</td></tr>
1451 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLRequire <em>expression</em></code></td></tr>
1452 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
1453 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>AuthConfig</td></tr>
1454 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
1455 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
1456 </table>
1458 This directive specifies a general access requirement which has to be
1459 fulfilled in order to allow access. It is a very powerful directive because the
1460 requirement specification is an arbitrarily complex boolean expression
1461 containing any number of access checks.</p>
1462 <div class="warning">
1463 <p>The implementation of <code>SSLRequire</code> is not thread safe.
1464 Using <code>SSLRequire</code> inside <code>.htaccess</code> files
1465 on a threaded <a href="../mpm.html">MPM</a> may cause random crashes.
1466 </p>
1467 </div>
1469 The <em>expression</em> must match the following syntax (given as a BNF
1470 grammar notation):</p>
1471 <blockquote>
1472 <pre>
1473 expr ::= "<strong>true</strong>" | "<strong>false</strong>"
1474 | "<strong>!</strong>" expr
1475 | expr "<strong>&amp;&amp;</strong>" expr
1476 | expr "<strong>||</strong>" expr
1477 | "<strong>(</strong>" expr "<strong>)</strong>"
1478 | comp
1480 comp ::= word "<strong>==</strong>" word | word "<strong>eq</strong>" word
1481 | word "<strong>!=</strong>" word | word "<strong>ne</strong>" word
1482 | word "<strong>&lt;</strong>" word | word "<strong>lt</strong>" word
1483 | word "<strong>&lt;=</strong>" word | word "<strong>le</strong>" word
1484 | word "<strong>&gt;</strong>" word | word "<strong>gt</strong>" word
1485 | word "<strong>&gt;=</strong>" word | word "<strong>ge</strong>" word
1486 | word "<strong>in</strong>" "<strong>{</strong>" wordlist "<strong>}</strong>"
1487 | word "<strong>in</strong>" "<strong>PeerExtList(</strong>" word "<strong>)</strong>"
1488 | word "<strong>=~</strong>" regex
1489 | word "<strong>!~</strong>" regex
1491 wordlist ::= word
1492 | wordlist "<strong>,</strong>" word
1494 word ::= digit
1495 | cstring
1496 | variable
1497 | function
1499 digit ::= [0-9]+
1500 cstring ::= "..."
1501 variable ::= "<strong>%{</strong>" varname "<strong>}</strong>"
1502 function ::= funcname "<strong>(</strong>" funcargs "<strong>)</strong>"
1503 </pre>
1504 </blockquote>
1505 <p>while for <code>varname</code> any variable from <a href="#table3">Table 3</a> can be used. Finally for
1506 <code>funcname</code> the following functions are available:</p>
1507 <ul>
1508 <li><code>file(</code><em>filename</em><code>)</code>
1510 This function takes one string argument and expands to the contents of the
1511 file. This is especially useful for matching this contents against a
1512 regular expression, etc.</p>
1513 </li>
1514 </ul>
1515 <p>Notice that <em>expression</em> is first parsed into an internal machine
1516 representation and then evaluated in a second step. Actually, in Global and
1517 Per-Server Class context <em>expression</em> is parsed at startup time and
1518 at runtime only the machine representation is executed. For Per-Directory
1519 context this is different: here <em>expression</em> has to be parsed and
1520 immediately executed for every request.</p>
1521 <div class="example"><h3>Example</h3><p><code>
1522 SSLRequire ( %{SSL_CIPHER} !~ m/^(EXP|NULL)-/ \<br />
1523 and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \<br />
1524 and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} \<br />
1525 and %{TIME_WDAY} &gt;= 1 and %{TIME_WDAY} &lt;= 5 \<br />
1526 and %{TIME_HOUR} &gt;= 8 and %{TIME_HOUR} &lt;= 20 ) \<br />
1527 or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/
1528 </code></p></div>
1529 <p>The <code>PeerExtList(<em>object id</em>)</code> function expects to find
1530 zero or more instances of the X.509 Certificate Extension (as identified by
1531 the given <em>object id</em>) in the client certificate, and compares the
1532 left-hand side string against the value of any matching attribute value. Every
1533 extension with the specified object id is checked, until a match is found.
1534 </p>
1536 <p><em>Standard CGI/1.0 and Apache variables:</em></p>
1537 <pre>
1538 HTTP_USER_AGENT PATH_INFO AUTH_TYPE
1539 HTTP_REFERER QUERY_STRING SERVER_SOFTWARE
1540 HTTP_COOKIE REMOTE_HOST API_VERSION
1541 HTTP_FORWARDED REMOTE_IDENT TIME_YEAR
1542 HTTP_HOST IS_SUBREQ TIME_MON
1543 HTTP_PROXY_CONNECTION DOCUMENT_ROOT TIME_DAY
1544 HTTP_ACCEPT SERVER_ADMIN TIME_HOUR
1545 HTTP:headername SERVER_NAME TIME_MIN
1546 THE_REQUEST SERVER_PORT TIME_SEC
1547 REQUEST_METHOD SERVER_PROTOCOL TIME_WDAY
1548 REQUEST_SCHEME REMOTE_ADDR TIME
1549 REQUEST_URI REMOTE_USER ENV:<strong>variablename</strong>
1550 REQUEST_FILENAME
1551 </pre>
1552 <p><em>SSL-related variables:</em></p>
1553 <pre>
1554 HTTPS SSL_CLIENT_M_VERSION SSL_SERVER_M_VERSION
1555 SSL_CLIENT_M_SERIAL SSL_SERVER_M_SERIAL
1556 SSL_PROTOCOL SSL_CLIENT_V_START SSL_SERVER_V_START
1557 SSL_SESSION_ID SSL_CLIENT_V_END SSL_SERVER_V_END
1558 SSL_CIPHER SSL_CLIENT_S_DN SSL_SERVER_S_DN
1559 SSL_CIPHER_EXPORT SSL_CLIENT_S_DN_C SSL_SERVER_S_DN_C
1560 SSL_CIPHER_ALGKEYSIZE SSL_CLIENT_S_DN_ST SSL_SERVER_S_DN_ST
1561 SSL_CIPHER_USEKEYSIZE SSL_CLIENT_S_DN_L SSL_SERVER_S_DN_L
1562 SSL_VERSION_LIBRARY SSL_CLIENT_S_DN_O SSL_SERVER_S_DN_O
1563 SSL_VERSION_INTERFACE SSL_CLIENT_S_DN_OU SSL_SERVER_S_DN_OU
1564 SSL_CLIENT_S_DN_CN SSL_SERVER_S_DN_CN
1565 SSL_CLIENT_S_DN_T SSL_SERVER_S_DN_T
1566 SSL_CLIENT_S_DN_I SSL_SERVER_S_DN_I
1567 SSL_CLIENT_S_DN_G SSL_SERVER_S_DN_G
1568 SSL_CLIENT_S_DN_S SSL_SERVER_S_DN_S
1569 SSL_CLIENT_S_DN_D SSL_SERVER_S_DN_D
1570 SSL_CLIENT_S_DN_UID SSL_SERVER_S_DN_UID
1571 SSL_CLIENT_S_DN_Email SSL_SERVER_S_DN_Email
1572 SSL_CLIENT_I_DN SSL_SERVER_I_DN
1573 SSL_CLIENT_I_DN_C SSL_SERVER_I_DN_C
1574 SSL_CLIENT_I_DN_ST SSL_SERVER_I_DN_ST
1575 SSL_CLIENT_I_DN_L SSL_SERVER_I_DN_L
1576 SSL_CLIENT_I_DN_O SSL_SERVER_I_DN_O
1577 SSL_CLIENT_I_DN_OU SSL_SERVER_I_DN_OU
1578 SSL_CLIENT_I_DN_CN SSL_SERVER_I_DN_CN
1579 SSL_CLIENT_I_DN_T SSL_SERVER_I_DN_T
1580 SSL_CLIENT_I_DN_I SSL_SERVER_I_DN_I
1581 SSL_CLIENT_I_DN_G SSL_SERVER_I_DN_G
1582 SSL_CLIENT_I_DN_S SSL_SERVER_I_DN_S
1583 SSL_CLIENT_I_DN_D SSL_SERVER_I_DN_D
1584 SSL_CLIENT_I_DN_UID SSL_SERVER_I_DN_UID
1585 SSL_CLIENT_I_DN_Email SSL_SERVER_I_DN_Email
1586 SSL_CLIENT_A_SIG SSL_SERVER_A_SIG
1587 SSL_CLIENT_A_KEY SSL_SERVER_A_KEY
1588 SSL_CLIENT_CERT SSL_SERVER_CERT
1589 SSL_CLIENT_CERT_CHAIN_<strong>n</strong>
1590 SSL_CLIENT_VERIFY
1591 </pre>
1593 </div>
1594 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1595 <div class="directive-section"><h2><a name="SSLRequireSSL" id="SSLRequireSSL">SSLRequireSSL</a> <a name="sslrequiressl" id="sslrequiressl">Directive</a></h2>
1596 <table class="directive">
1597 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Deny access when SSL is not used for the
1598 HTTP request</td></tr>
1599 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLRequireSSL</code></td></tr>
1600 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
1601 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>AuthConfig</td></tr>
1602 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
1603 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
1604 </table>
1606 This directive forbids access unless HTTP over SSL (i.e. HTTPS) is enabled for
1607 the current connection. This is very handy inside the SSL-enabled virtual
1608 host or directories for defending against configuration errors that expose
1609 stuff that should be protected. When this directive is present all requests
1610 are denied which are not using SSL.</p>
1611 <div class="example"><h3>Example</h3><p><code>
1612 SSLRequireSSL
1613 </code></p></div>
1615 </div>
1616 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1617 <div class="directive-section"><h2><a name="SSLSessionCache" id="SSLSessionCache">SSLSessionCache</a> <a name="sslsessioncache" id="sslsessioncache">Directive</a></h2>
1618 <table class="directive">
1619 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Type of the global/inter-process SSL Session
1620 Cache</td></tr>
1621 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLSessionCache <em>type</em></code></td></tr>
1622 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSLSessionCache none</code></td></tr>
1623 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
1624 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
1625 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
1626 </table>
1628 This configures the storage type of the global/inter-process SSL Session
1629 Cache. This cache is an optional facility which speeds up parallel request
1630 processing. For requests to the same server process (via HTTP keep-alive),
1631 OpenSSL already caches the SSL session information locally. But because modern
1632 clients request inlined images and other data via parallel requests (usually
1633 up to four parallel requests are common) those requests are served by
1634 <em>different</em> pre-forked server processes. Here an inter-process cache
1635 helps to avoid unneccessary session handshakes.</p>
1637 The following four storage <em>type</em>s are currently supported:</p>
1638 <ul>
1639 <li><code>none</code>
1641 <p>This disables the global/inter-process Session Cache. This
1642 will incur a noticeable speed penalty and may cause problems if
1643 using certain browsers, particularly if client certificates are
1644 enabled. This setting is not recommended.</p></li>
1646 <li><code>nonenotnull</code>
1648 <p>This disables any global/inter-process Session Cache. However
1649 it does force OpenSSL to send a non-null session ID to
1650 accommodate buggy clients that require one.</p></li>
1652 <li><code>dbm:/path/to/datafile</code>
1654 <p>This makes use of a DBM hashfile on the local disk to
1655 synchronize the local OpenSSL memory caches of the server
1656 processes. This session cache may suffer reliability issues under
1657 high load.</p></li>
1659 <li><code>shm:/path/to/datafile</code>[<code>(</code><em>size</em><code>)</code>]
1661 <p>This makes use of a high-performance cyclic buffer
1662 (approx. <em>size</em> bytes in size) inside a shared memory
1663 segment in RAM (established via <code>/path/to/datafile</code>) to
1664 synchronize the local OpenSSL memory caches of the server
1665 processes. This is the recommended session cache.</p></li>
1667 <li><code>dc:UNIX:/path/to/socket</code>
1669 <p>This makes use of the <a href="http://www.distcache.org/">distcache</a> distributed session
1670 caching libraries. The argument should specify the location of
1671 the server or proxy to be used using the distcache address syntax;
1672 for example, <code>UNIX:/path/to/socket</code> specifies a UNIX
1673 domain socket (typically a local dc_client proxy);
1674 <code>IP:server.example.com:9001</code> specifies an IP
1675 address.</p></li>
1677 </ul>
1678 <div class="example"><h3>Examples</h3><p><code>
1679 SSLSessionCache dbm:/usr/local/apache/logs/ssl_gcache_data<br />
1680 SSLSessionCache shm:/usr/local/apache/logs/ssl_gcache_data(512000)
1681 </code></p></div>
1683 </div>
1684 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1685 <div class="directive-section"><h2><a name="SSLSessionCacheTimeout" id="SSLSessionCacheTimeout">SSLSessionCacheTimeout</a> <a name="sslsessioncachetimeout" id="sslsessioncachetimeout">Directive</a></h2>
1686 <table class="directive">
1687 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Number of seconds before an SSL session expires
1688 in the Session Cache</td></tr>
1689 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLSessionCacheTimeout <em>seconds</em></code></td></tr>
1690 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSLSessionCacheTimeout 300</code></td></tr>
1691 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
1692 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
1693 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
1694 </table>
1696 This directive sets the timeout in seconds for the information stored in the
1697 global/inter-process SSL Session Cache and the OpenSSL internal memory cache.
1698 It can be set as low as 15 for testing, but should be set to higher
1699 values like 300 in real life.</p>
1700 <div class="example"><h3>Example</h3><p><code>
1701 SSLSessionCacheTimeout 600
1702 </code></p></div>
1704 </div>
1705 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1706 <div class="directive-section"><h2><a name="SSLUserName" id="SSLUserName">SSLUserName</a> <a name="sslusername" id="sslusername">Directive</a></h2>
1707 <table class="directive">
1708 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Variable name to determine user name</td></tr>
1709 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLUserName <em>varname</em></code></td></tr>
1710 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, directory, .htaccess</td></tr>
1711 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>AuthConfig</td></tr>
1712 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
1713 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
1714 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.0.51 and later</td></tr>
1715 </table>
1717 This directive sets the "user" field in the Apache request object.
1718 This is used by lower modules to identify the user with a character
1719 string. In particular, this may cause the environment variable
1720 <code>REMOTE_USER</code> to be set. The <em>varname</em> can be
1721 any of the <a href="#envvars">SSL environment variables</a>.</p>
1723 <p>Note that this directive has no effect if the
1724 <code>FakeBasic</code> option is used (see <a href="#ssloptions">SSLOptions</a>).</p>
1726 <div class="example"><h3>Example</h3><p><code>
1727 SSLUserName SSL_CLIENT_S_DN_CN
1728 </code></p></div>
1730 </div>
1731 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1732 <div class="directive-section"><h2><a name="SSLVerifyClient" id="SSLVerifyClient">SSLVerifyClient</a> <a name="sslverifyclient" id="sslverifyclient">Directive</a></h2>
1733 <table class="directive">
1734 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Type of Client Certificate verification</td></tr>
1735 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLVerifyClient <em>level</em></code></td></tr>
1736 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSLVerifyClient none</code></td></tr>
1737 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
1738 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>AuthConfig</td></tr>
1739 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
1740 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
1741 </table>
1743 This directive sets the Certificate verification level for the Client
1744 Authentication. Notice that this directive can be used both in per-server and
1745 per-directory context. In per-server context it applies to the client
1746 authentication process used in the standard SSL handshake when a connection is
1747 established. In per-directory context it forces a SSL renegotation with the
1748 reconfigured client verification level after the HTTP request was read but
1749 before the HTTP response is sent.</p>
1751 The following levels are available for <em>level</em>:</p>
1752 <ul>
1753 <li><strong>none</strong>:
1754 no client Certificate is required at all</li>
1755 <li><strong>optional</strong>:
1756 the client <em>may</em> present a valid Certificate</li>
1757 <li><strong>require</strong>:
1758 the client <em>has to</em> present a valid Certificate</li>
1759 <li><strong>optional_no_ca</strong>:
1760 the client may present a valid Certificate<br />
1761 but it need not to be (successfully) verifiable.</li>
1762 </ul>
1763 <p>In practice only levels <strong>none</strong> and
1764 <strong>require</strong> are really interesting, because level
1765 <strong>optional</strong> doesn't work with all browsers and level
1766 <strong>optional_no_ca</strong> is actually against the idea of
1767 authentication (but can be used to establish SSL test pages, etc.)</p>
1768 <div class="example"><h3>Example</h3><p><code>
1769 SSLVerifyClient require
1770 </code></p></div>
1772 </div>
1773 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1774 <div class="directive-section"><h2><a name="SSLVerifyDepth" id="SSLVerifyDepth">SSLVerifyDepth</a> <a name="sslverifydepth" id="sslverifydepth">Directive</a></h2>
1775 <table class="directive">
1776 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Maximum depth of CA Certificates in Client
1777 Certificate verification</td></tr>
1778 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLVerifyDepth <em>number</em></code></td></tr>
1779 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSLVerifyDepth 1</code></td></tr>
1780 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
1781 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>AuthConfig</td></tr>
1782 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
1783 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
1784 </table>
1786 This directive sets how deeply mod_ssl should verify before deciding that the
1787 clients don't have a valid certificate. Notice that this directive can be
1788 used both in per-server and per-directory context. In per-server context it
1789 applies to the client authentication process used in the standard SSL
1790 handshake when a connection is established. In per-directory context it forces
1791 a SSL renegotation with the reconfigured client verification depth after the
1792 HTTP request was read but before the HTTP response is sent.</p>
1794 The depth actually is the maximum number of intermediate certificate issuers,
1795 i.e. the number of CA certificates which are max allowed to be followed while
1796 verifying the client certificate. A depth of 0 means that self-signed client
1797 certificates are accepted only, the default depth of 1 means the client
1798 certificate can be self-signed or has to be signed by a CA which is directly
1799 known to the server (i.e. the CA's certificate is under
1800 <code class="directive"><a href="#sslcacertificatepath">SSLCACertificatePath</a></code>), etc.</p>
1801 <div class="example"><h3>Example</h3><p><code>
1802 SSLVerifyDepth 10
1803 </code></p></div>
1805 </div>
1806 </div>
1807 <div class="bottomlang">
1808 <p><span>Available Languages: </span><a href="../en/mod/mod_ssl.html" title="English">&nbsp;en&nbsp;</a></p>
1809 </div><div id="footer">
1810 <p class="apache">Copyright 2009 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
1811 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div>
1812 </body></html>