bottleneck testcase based on rubbos
[bottlenecks.git] / rubbos / app / httpd-2.0.64 / docs / manual / mod / mod_ssl.html.en
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.0</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.0</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>
32
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>
36
37 <p>This module relies on <a href="http://www.openssl.org/">OpenSSL</a>
38 to provide the cryptography engine.</p>
39
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="#sslcarevocationfile">SSLCARevocationFile</a></li>
48 <li><img alt="" src="../images/down.gif" /> <a href="#sslcarevocationpath">SSLCARevocationPath</a></li>
49 <li><img alt="" src="../images/down.gif" /> <a href="#sslcertificatechainfile">SSLCertificateChainFile</a></li>
50 <li><img alt="" src="../images/down.gif" /> <a href="#sslcertificatefile">SSLCertificateFile</a></li>
51 <li><img alt="" src="../images/down.gif" /> <a href="#sslcertificatekeyfile">SSLCertificateKeyFile</a></li>
52 <li><img alt="" src="../images/down.gif" /> <a href="#sslciphersuite">SSLCipherSuite</a></li>
53 <li><img alt="" src="../images/down.gif" /> <a href="#sslengine">SSLEngine</a></li>
54 <li><img alt="" src="../images/down.gif" /> <a href="#sslinsecurerenegotiation">SSLInsecureRenegotiation</a></li>
55 <li><img alt="" src="../images/down.gif" /> <a href="#sslmutex">SSLMutex</a></li>
56 <li><img alt="" src="../images/down.gif" /> <a href="#ssloptions">SSLOptions</a></li>
57 <li><img alt="" src="../images/down.gif" /> <a href="#sslpassphrasedialog">SSLPassPhraseDialog</a></li>
58 <li><img alt="" src="../images/down.gif" /> <a href="#sslprotocol">SSLProtocol</a></li>
59 <li><img alt="" src="../images/down.gif" /> <a href="#sslproxycacertificatefile">SSLProxyCACertificateFile</a></li>
60 <li><img alt="" src="../images/down.gif" /> <a href="#sslproxycacertificatepath">SSLProxyCACertificatePath</a></li>
61 <li><img alt="" src="../images/down.gif" /> <a href="#sslproxycarevocationfile">SSLProxyCARevocationFile</a></li>
62 <li><img alt="" src="../images/down.gif" /> <a href="#sslproxycarevocationpath">SSLProxyCARevocationPath</a></li>
63 <li><img alt="" src="../images/down.gif" /> <a href="#sslproxyciphersuite">SSLProxyCipherSuite</a></li>
64 <li><img alt="" src="../images/down.gif" /> <a href="#sslproxyengine">SSLProxyEngine</a></li>
65 <li><img alt="" src="../images/down.gif" /> <a href="#sslproxymachinecertificatefile">SSLProxyMachineCertificateFile</a></li>
66 <li><img alt="" src="../images/down.gif" /> <a href="#sslproxymachinecertificatepath">SSLProxyMachineCertificatePath</a></li>
67 <li><img alt="" src="../images/down.gif" /> <a href="#sslproxyprotocol">SSLProxyProtocol</a></li>
68 <li><img alt="" src="../images/down.gif" /> <a href="#sslproxyverify">SSLProxyVerify</a></li>
69 <li><img alt="" src="../images/down.gif" /> <a href="#sslproxyverifydepth">SSLProxyVerifyDepth</a></li>
70 <li><img alt="" src="../images/down.gif" /> <a href="#sslrandomseed">SSLRandomSeed</a></li>
71 <li><img alt="" src="../images/down.gif" /> <a href="#sslrequire">SSLRequire</a></li>
72 <li><img alt="" src="../images/down.gif" /> <a href="#sslrequiressl">SSLRequireSSL</a></li>
73 <li><img alt="" src="../images/down.gif" /> <a href="#sslsessioncache">SSLSessionCache</a></li>
74 <li><img alt="" src="../images/down.gif" /> <a href="#sslsessioncachetimeout">SSLSessionCacheTimeout</a></li>
75 <li><img alt="" src="../images/down.gif" /> <a href="#sslusername">SSLUserName</a></li>
76 <li><img alt="" src="../images/down.gif" /> <a href="#sslverifyclient">SSLVerifyClient</a></li>
77 <li><img alt="" src="../images/down.gif" /> <a href="#sslverifydepth">SSLVerifyDepth</a></li>
78 </ul>
79 <h3>Topics</h3>
80 <ul id="topics">
81 <li><img alt="" src="../images/down.gif" /> <a href="#envvars">Environment Variables</a></li>
82 <li><img alt="" src="../images/down.gif" /> <a href="#logformats">Custom Log Formats</a></li>
83 </ul></div>
84 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
85 <div class="section">
86 <h2><a name="envvars" id="envvars">Environment Variables</a></h2>
87
88 <p>This module provides a lot of SSL information as additional environment
89 variables to the SSI and CGI namespace. The generated variables are listed in
90 the table below. For backward compatibility the information can
91 be made available under different names, too. Look in the <a href="../ssl/ssl_compat.html">Compatibility</a> chapter for details on the
92 compatibility variables.</p>
93
94 <table class="bordered">
95
96 <tr>
97  <th><a name="table3">Variable Name:</a></th>
98  <th>Value Type:</th>
99  <th>Description:</th>
100 </tr>
101 <tr><td><code>HTTPS</code></td>                         <td>flag</td>      <td>HTTPS is being used.</td></tr>
102 <tr><td><code>SSL_PROTOCOL</code></td>                  <td>string</td>    <td>The SSL protocol version (SSLv2, SSLv3, TLSv1)</td></tr>
103 <tr><td><code>SSL_SESSION_ID</code></td>                <td>string</td>    <td>The hex-encoded SSL session id</td></tr>
104 <tr><td><code>SSL_CIPHER</code></td>                    <td>string</td>    <td>The cipher specification name</td></tr>
105 <tr><td><code>SSL_CIPHER_EXPORT</code></td>             <td>string</td>    <td><code>true</code> if cipher is an export cipher</td></tr>
106 <tr><td><code>SSL_CIPHER_USEKEYSIZE</code></td>         <td>number</td>    <td>Number of cipher bits (actually used)</td></tr>
107 <tr><td><code>SSL_CIPHER_ALGKEYSIZE</code></td>         <td>number</td>    <td>Number of cipher bits (possible)</td></tr>
108 <tr><td><code>SSL_VERSION_INTERFACE</code></td>         <td>string</td>    <td>The mod_ssl program version</td></tr>
109 <tr><td><code>SSL_VERSION_LIBRARY</code></td>           <td>string</td>    <td>The OpenSSL program version</td></tr>
110 <tr><td><code>SSL_CLIENT_M_VERSION</code></td>          <td>string</td>    <td>The version of the client certificate</td></tr>
111 <tr><td><code>SSL_CLIENT_M_SERIAL</code></td>           <td>string</td>    <td>The serial of the client certificate</td></tr>
112 <tr><td><code>SSL_CLIENT_S_DN</code></td>               <td>string</td>    <td>Subject DN in client's certificate</td></tr>
113 <tr><td><code>SSL_CLIENT_S_DN_</code><em>x509</em></td> <td>string</td>    <td>Component of client's Subject DN</td></tr>
114 <tr><td><code>SSL_CLIENT_I_DN</code></td>               <td>string</td>    <td>Issuer DN of client's certificate</td></tr>
115 <tr><td><code>SSL_CLIENT_I_DN_</code><em>x509</em></td> <td>string</td>    <td>Component of client's Issuer DN</td></tr>
116 <tr><td><code>SSL_CLIENT_V_START</code></td>            <td>string</td>    <td>Validity of client's certificate (start time)</td></tr>
117 <tr><td><code>SSL_CLIENT_V_END</code></td>              <td>string</td>    <td>Validity of client's certificate (end time)</td></tr>
118 <tr><td><code>SSL_CLIENT_A_SIG</code></td>              <td>string</td>    <td>Algorithm used for the signature of client's certificate</td></tr>
119 <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>
120 <tr><td><code>SSL_CLIENT_CERT</code></td>               <td>string</td>    <td>PEM-encoded client certificate</td></tr>
121 <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>
122 <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>
123 <tr><td><code>SSL_SERVER_M_VERSION</code></td>          <td>string</td>    <td>The version of the server certificate</td></tr>
124 <tr><td><code>SSL_SERVER_M_SERIAL</code></td>           <td>string</td>    <td>The serial of the server certificate</td></tr>
125 <tr><td><code>SSL_SERVER_S_DN</code></td>               <td>string</td>    <td>Subject DN in server's certificate</td></tr>
126 <tr><td><code>SSL_SERVER_S_DN_</code><em>x509</em></td> <td>string</td>    <td>Component of server's Subject DN</td></tr>
127 <tr><td><code>SSL_SERVER_I_DN</code></td>               <td>string</td>    <td>Issuer DN of server's certificate</td></tr>
128 <tr><td><code>SSL_SERVER_I_DN_</code><em>x509</em></td> <td>string</td>    <td>Component of server's Issuer DN</td></tr>
129 <tr><td><code>SSL_SERVER_V_START</code></td>            <td>string</td>    <td>Validity of server's certificate (start time)</td></tr>
130 <tr><td><code>SSL_SERVER_V_END</code></td>              <td>string</td>    <td>Validity of server's certificate (end time)</td></tr>
131 <tr><td><code>SSL_SERVER_A_SIG</code></td>              <td>string</td>    <td>Algorithm used for the signature of server's certificate</td></tr>
132 <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>
133 <tr><td><code>SSL_SERVER_CERT</code></td>               <td>string</td>    <td>PEM-encoded server certificate</td></tr>
134 </table>
135 <p>[ where <em>x509</em> is a component of a X.509 DN:
136   <code>C,ST,L,O,OU,CN,T,I,G,S,D,UID,Email</code> ]</p>
137 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
138 <div class="section">
139 <h2><a name="logformats" id="logformats">Custom Log Formats</a></h2>
140
141 <p>When <code class="module"><a href="../mod/mod_ssl.html">mod_ssl</a></code> is built into Apache or at least
142 loaded (under DSO situation) additional functions exist for the <a href="mod_log_config.html#formats">Custom Log Format</a> of 
143 <code class="module"><a href="../mod/mod_log_config.html">mod_log_config</a></code>. First there is an
144 additional ``<code>%{</code><em>varname</em><code>}x</code>''
145 eXtension format function which can be used to expand any variables
146 provided by any module, especially those provided by mod_ssl which can
147 you find in the above table.</p>
148 <p>
149 For backward compatibility there is additionally a special
150 ``<code>%{</code><em>name</em><code>}c</code>'' cryptography format function
151 provided. Information about this function is provided in the <a href="../ssl/ssl_compat.html">Compatibility</a> chapter.</p>
152 <p>
153 Example:</p>
154 <div class="example"><p><code>
155 CustomLog logs/ssl_request_log \
156           "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
157 </code></p></div>
158 </div>
159 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
160 <div class="directive-section"><h2><a name="SSLCACertificateFile" id="SSLCACertificateFile">SSLCACertificateFile</a> <a name="sslcacertificatefile" id="sslcacertificatefile">Directive</a></h2>
161 <table class="directive">
162 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>File of concatenated PEM-encoded CA Certificates 
163 for Client Auth</td></tr>
164 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLCACertificateFile <em>file-path</em></code></td></tr>
165 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
166 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
167 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
168 </table>
169 <p>
170 This directive sets the <em>all-in-one</em> file where you can assemble the
171 Certificates of Certification Authorities (CA) whose <em>clients</em> you deal
172 with. These are used for Client Authentication. Such a file is simply the
173 concatenation of the various PEM-encoded Certificate files, in order of
174 preference. This can be used alternatively and/or additionally to 
175 <code class="directive"><a href="#sslcacertificatepath">SSLCACertificatePath</a></code>.</p>
176 <div class="example"><h3>Example</h3><p><code>
177 SSLCACertificateFile /usr/local/apache2/conf/ssl.crt/ca-bundle-client.crt
178 </code></p></div>
179
180 </div>
181 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
182 <div class="directive-section"><h2><a name="SSLCACertificatePath" id="SSLCACertificatePath">SSLCACertificatePath</a> <a name="sslcacertificatepath" id="sslcacertificatepath">Directive</a></h2>
183 <table class="directive">
184 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Directory of PEM-encoded CA Certificates for 
185 Client Auth</td></tr>
186 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLCACertificatePath <em>directory-path</em></code></td></tr>
187 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
188 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
189 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
190 </table>
191 <p>
192 This directive sets the directory where you keep the Certificates of
193 Certification Authorities (CAs) whose clients you deal with. These are used to
194 verify the client certificate on Client Authentication.</p>
195 <p>
196 The files in this directory have to be PEM-encoded and are accessed through
197 hash filenames. So usually you can't just place the Certificate files
198 there: you also have to create symbolic links named
199 <em>hash-value</em><code>.N</code>. And you should always make sure this directory
200 contains the appropriate symbolic links. </p>
201 <div class="example"><h3>Example</h3><p><code>
202 SSLCACertificatePath /usr/local/apache2/conf/ssl.crt/
203 </code></p></div>
204
205 </div>
206 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
207 <div class="directive-section"><h2><a name="SSLCARevocationFile" id="SSLCARevocationFile">SSLCARevocationFile</a> <a name="sslcarevocationfile" id="sslcarevocationfile">Directive</a></h2>
208 <table class="directive">
209 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>File of concatenated PEM-encoded CA CRLs for 
210 Client Auth</td></tr>
211 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLCARevocationFile <em>file-path</em></code></td></tr>
212 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
213 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
214 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
215 </table>
216 <p>
217 This directive sets the <em>all-in-one</em> file where you can
218 assemble the Certificate Revocation Lists (CRL) of Certification
219 Authorities (CA) whose <em>clients</em> you deal with. These are used
220 for Client Authentication.  Such a file is simply the concatenation of
221 the various PEM-encoded CRL files, in order of preference. This can be
222 used alternatively and/or additionally to <code class="directive"><a href="#sslcarevocationpath">SSLCARevocationPath</a></code>.</p>
223 <div class="example"><h3>Example</h3><p><code>
224 SSLCARevocationFile /usr/local/apache2/conf/ssl.crl/ca-bundle-client.crl
225 </code></p></div>
226
227 </div>
228 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
229 <div class="directive-section"><h2><a name="SSLCARevocationPath" id="SSLCARevocationPath">SSLCARevocationPath</a> <a name="sslcarevocationpath" id="sslcarevocationpath">Directive</a></h2>
230 <table class="directive">
231 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Directory of PEM-encoded CA CRLs for 
232 Client Auth</td></tr>
233 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLCARevocationPath <em>directory-path</em></code></td></tr>
234 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
235 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
236 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
237 </table>
238 <p>
239 This directive sets the directory where you keep the Certificate Revocation
240 Lists (CRL) of Certification Authorities (CAs) whose clients you deal with.
241 These are used to revoke the client certificate on Client Authentication.</p>
242 <p>
243 The files in this directory have to be PEM-encoded and are accessed through
244 hash filenames. So usually you have not only to place the CRL files there.
245 Additionally you have to create symbolic links named
246 <em>hash-value</em><code>.rN</code>. And you should always make sure this directory
247 contains the appropriate symbolic links. </p>
248 <div class="example"><h3>Example</h3><p><code>
249 SSLCARevocationPath /usr/local/apache2/conf/ssl.crl/
250 </code></p></div>
251
252 </div>
253 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
254 <div class="directive-section"><h2><a name="SSLCertificateChainFile" id="SSLCertificateChainFile">SSLCertificateChainFile</a> <a name="sslcertificatechainfile" id="sslcertificatechainfile">Directive</a></h2>
255 <table class="directive">
256 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>File of PEM-encoded Server CA Certificates</td></tr>
257 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLCertificateChainFile <em>file-path</em></code></td></tr>
258 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
259 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
260 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
261 </table>
262 <p>
263 This directive sets the optional <em>all-in-one</em> file where you can
264 assemble the certificates of Certification Authorities (CA) which form the
265 certificate chain of the server certificate. This starts with the issuing CA
266 certificate of of the server certificate and can range up to the root CA
267 certificate. Such a file is simply the concatenation of the various
268 PEM-encoded CA Certificate files, usually in certificate chain order.</p>
269 <p>
270 This should be used alternatively and/or additionally to <code class="directive"><a href="#sslcacertificatepath">SSLCACertificatePath</a></code> for explicitly
271 constructing the server certificate chain which is sent to the browser
272 in addition to the server certificate. It is especially useful to
273 avoid conflicts with CA certificates when using client
274 authentication. Because although placing a CA certificate of the
275 server certificate chain into <code class="directive"><a href="#sslcacertificatepath">SSLCACertificatePath</a></code> has the same effect
276 for the certificate chain construction, it has the side-effect that
277 client certificates issued by this same CA certificate are also
278 accepted on client authentication. That's usually not one expect.</p>
279 <p>
280 But be careful: Providing the certificate chain works only if you are using a
281 <em>single</em> (either RSA <em>or</em> DSA) based server certificate. If you are
282 using a coupled RSA+DSA certificate pair, this will work only if actually both
283 certificates use the <em>same</em> certificate chain. Else the browsers will be
284 confused in this situation.</p>
285 <div class="example"><h3>Example</h3><p><code>
286 SSLCertificateChainFile /usr/local/apache2/conf/ssl.crt/ca.crt
287 </code></p></div>
288
289 </div>
290 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
291 <div class="directive-section"><h2><a name="SSLCertificateFile" id="SSLCertificateFile">SSLCertificateFile</a> <a name="sslcertificatefile" id="sslcertificatefile">Directive</a></h2>
292 <table class="directive">
293 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Server PEM-encoded X.509 Certificate file</td></tr>
294 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLCertificateFile <em>file-path</em></code></td></tr>
295 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
296 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
297 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
298 </table>
299 <p>
300 This directive points to the PEM-encoded Certificate file for the server and
301 optionally also to the corresponding RSA or DSA Private Key file for it
302 (contained in the same file). If the contained Private Key is encrypted the
303 Pass Phrase dialog is forced at startup time. This directive can be used up to
304 two times (referencing different filenames) when both a RSA and a DSA based
305 server certificate is used in parallel.</p>
306 <div class="example"><h3>Example</h3><p><code>
307 SSLCertificateFile /usr/local/apache2/conf/ssl.crt/server.crt
308 </code></p></div>
309
310 </div>
311 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
312 <div class="directive-section"><h2><a name="SSLCertificateKeyFile" id="SSLCertificateKeyFile">SSLCertificateKeyFile</a> <a name="sslcertificatekeyfile" id="sslcertificatekeyfile">Directive</a></h2>
313 <table class="directive">
314 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Server PEM-encoded Private Key file</td></tr>
315 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLCertificateKeyFile <em>file-path</em></code></td></tr>
316 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
317 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
318 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
319 </table>
320 <p>
321 This directive points to the PEM-encoded Private Key file for the
322 server. If the Private Key is not combined with the Certificate in the
323 <code class="directive">SSLCertificateFile</code>, use this additional directive to
324 point to the file with the stand-alone Private Key. When
325 <code class="directive">SSLCertificateFile</code> is used and the file
326 contains both the Certificate and the Private Key this directive need
327 not be used. But we strongly discourage this practice.  Instead we
328 recommend you to separate the Certificate and the Private Key. If the
329 contained Private Key is encrypted, the Pass Phrase dialog is forced
330 at startup time. This directive can be used up to two times
331 (referencing different filenames) when both a RSA and a DSA based
332 private key is used in parallel.</p>
333 <div class="example"><h3>Example</h3><p><code>
334 SSLCertificateKeyFile /usr/local/apache2/conf/ssl.key/server.key
335 </code></p></div>
336
337 </div>
338 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
339 <div class="directive-section"><h2><a name="SSLCipherSuite" id="SSLCipherSuite">SSLCipherSuite</a> <a name="sslciphersuite" id="sslciphersuite">Directive</a></h2>
340 <table class="directive">
341 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Cipher Suite available for negotiation in SSL 
342 handshake</td></tr>
343 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLCipherSuite <em>cipher-spec</em></code></td></tr>
344 <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>
345 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
346 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>AuthConfig</td></tr>
347 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
348 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
349 </table>
350 <p>
351 This complex directive uses a colon-separated <em>cipher-spec</em> string
352 consisting of OpenSSL cipher specifications to configure the Cipher Suite the
353 client is permitted to negotiate in the SSL handshake phase. Notice that this
354 directive can be used both in per-server and per-directory context. In
355 per-server context it applies to the standard SSL handshake when a connection
356 is established. In per-directory context it forces a SSL renegotation with the
357 reconfigured Cipher Suite after the HTTP request was read but before the HTTP
358 response is sent.</p>
359 <p>
360 An SSL cipher specification in <em>cipher-spec</em> is composed of 4 major
361 attributes plus a few extra minor ones:</p>
362 <ul>
363 <li><em>Key Exchange Algorithm</em>:<br />
364     RSA or Diffie-Hellman variants.
365 </li>
366 <li><em>Authentication Algorithm</em>:<br />
367     RSA, Diffie-Hellman, DSS or none.
368 </li>
369 <li><em>Cipher/Encryption Algorithm</em>:<br />
370     DES, Triple-DES, RC4, RC2, IDEA or none.
371 </li>
372 <li><em>MAC Digest Algorithm</em>:<br />
373     MD5, SHA or SHA1.
374 </li>
375 </ul>
376 <p>An SSL cipher can also be an export cipher and is either a SSLv2 or SSLv3/TLSv1
377 cipher (here TLSv1 is equivalent to SSLv3). To specify which ciphers to use,
378 one can either specify all the Ciphers, one at a time, or use aliases to
379 specify the preference and order for the ciphers (see <a href="#table1">Table
380 1</a>).</p>
381
382 <table class="bordered">
383
384 <tr><th><a name="table1">Tag</a></th> <th>Description</th></tr>
385 <tr><td colspan="2"><em>Key Exchange Algorithm:</em></td></tr>
386 <tr><td><code>kRSA</code></td>   <td>RSA key exchange</td></tr>
387 <tr><td><code>kDHr</code></td>   <td>Diffie-Hellman key exchange with RSA key</td></tr>
388 <tr><td><code>kDHd</code></td>   <td>Diffie-Hellman key exchange with DSA key</td></tr>
389 <tr><td><code>kEDH</code></td>   <td>Ephemeral (temp.key) Diffie-Hellman key exchange (no cert)</td>   </tr>
390 <tr><td colspan="2"><em>Authentication Algorithm:</em></td></tr>
391 <tr><td><code>aNULL</code></td>  <td>No authentication</td></tr>
392 <tr><td><code>aRSA</code></td>   <td>RSA authentication</td></tr>
393 <tr><td><code>aDSS</code></td>   <td>DSS authentication</td> </tr>
394 <tr><td><code>aDH</code></td>    <td>Diffie-Hellman authentication</td></tr>
395 <tr><td colspan="2"><em>Cipher Encoding Algorithm:</em></td></tr>
396 <tr><td><code>eNULL</code></td>  <td>No encoding</td>         </tr>
397 <tr><td><code>DES</code></td>    <td>DES encoding</td>        </tr>
398 <tr><td><code>3DES</code></td>   <td>Triple-DES encoding</td> </tr>
399 <tr><td><code>RC4</code></td>    <td>RC4 encoding</td>       </tr>
400 <tr><td><code>RC2</code></td>    <td>RC2 encoding</td>       </tr>
401 <tr><td><code>IDEA</code></td>   <td>IDEA encoding</td>       </tr>
402 <tr><td colspan="2"><em>MAC Digest Algorithm</em>:</td></tr>
403 <tr><td><code>MD5</code></td>    <td>MD5 hash function</td></tr>
404 <tr><td><code>SHA1</code></td>   <td>SHA1 hash function</td></tr>
405 <tr><td><code>SHA</code></td>    <td>SHA hash function</td> </tr>
406 <tr><td colspan="2"><em>Aliases:</em></td></tr>
407 <tr><td><code>SSLv2</code></td>  <td>all SSL version 2.0 ciphers</td></tr>
408 <tr><td><code>SSLv3</code></td>  <td>all SSL version 3.0 ciphers</td> </tr>
409 <tr><td><code>TLSv1</code></td>  <td>all TLS version 1.0 ciphers</td> </tr>
410 <tr><td><code>EXP</code></td>    <td>all export ciphers</td>  </tr>
411 <tr><td><code>EXPORT40</code></td> <td>all 40-bit export ciphers only</td>  </tr>
412 <tr><td><code>EXPORT56</code></td> <td>all 56-bit export ciphers only</td>  </tr>
413 <tr><td><code>LOW</code></td>    <td>all low strength ciphers (no export, single DES)</td></tr>
414 <tr><td><code>MEDIUM</code></td> <td>all ciphers with 128 bit encryption</td> </tr>
415 <tr><td><code>HIGH</code></td>   <td>all ciphers using Triple-DES</td>     </tr>
416 <tr><td><code>RSA</code></td>    <td>all ciphers using RSA key exchange</td> </tr>
417 <tr><td><code>DH</code></td>     <td>all ciphers using Diffie-Hellman key exchange</td> </tr>
418 <tr><td><code>EDH</code></td>    <td>all ciphers using Ephemeral Diffie-Hellman key exchange</td> </tr>
419 <tr><td><code>ADH</code></td>    <td>all ciphers using Anonymous Diffie-Hellman key exchange</td> </tr>
420 <tr><td><code>DSS</code></td>    <td>all ciphers using DSS authentication</td> </tr>
421 <tr><td><code>NULL</code></td>   <td>all ciphers using no encryption</td> </tr>
422 </table>
423 <p>
424 Now where this becomes interesting is that these can be put together
425 to specify the order and ciphers you wish to use. To speed this up
426 there are also aliases (<code>SSLv2, SSLv3, TLSv1, EXP, LOW, MEDIUM,
427 HIGH</code>) for certain groups of ciphers. These tags can be joined
428 together with prefixes to form the <em>cipher-spec</em>. Available
429 prefixes are:</p>
430 <ul>
431 <li>none: add cipher to list</li>
432 <li><code>+</code>: add ciphers to list and pull them to current location in list</li>
433 <li><code>-</code>: remove cipher from list (can be added later again)</li>
434 <li><code>!</code>: kill cipher from list completely (can <strong>not</strong> be added later again)</li>
435 </ul>
436 <p>A simpler way to look at all of this is to use the ``<code>openssl ciphers
437 -v</code>'' command which provides a nice way to successively create the
438 correct <em>cipher-spec</em> string. The default <em>cipher-spec</em> string
439 is ``<code>ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP</code>'' which
440 means the following: first, remove from consideration any ciphers that do not
441 authenticate, i.e. for SSL only the Anonymous Diffie-Hellman ciphers. Next,
442 use ciphers using RC4 and RSA. Next include the high, medium and then the low
443 security ciphers. Finally <em>pull</em> all SSLv2 and export ciphers to the
444 end of the list.</p>
445 <div class="example"><pre>
446 $ openssl ciphers -v 'ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP'
447 NULL-SHA                SSLv3 Kx=RSA      Au=RSA  Enc=None      Mac=SHA1
448 NULL-MD5                SSLv3 Kx=RSA      Au=RSA  Enc=None      Mac=MD5
449 EDH-RSA-DES-CBC3-SHA    SSLv3 Kx=DH       Au=RSA  Enc=3DES(168) Mac=SHA1
450 ...                     ...               ...     ...           ...
451 EXP-RC4-MD5             SSLv3 Kx=RSA(512) Au=RSA  Enc=RC4(40)   Mac=MD5  export
452 EXP-RC2-CBC-MD5         SSLv2 Kx=RSA(512) Au=RSA  Enc=RC2(40)   Mac=MD5  export
453 EXP-RC4-MD5             SSLv2 Kx=RSA(512) Au=RSA  Enc=RC4(40)   Mac=MD5  export
454 </pre></div>
455 <p>The complete list of particular RSA &amp; DH ciphers for SSL is given in <a href="#table2">Table 2</a>.</p>
456 <div class="example"><h3>Example</h3><p><code>
457 SSLCipherSuite RSA:!EXP:!NULL:+HIGH:+MEDIUM:-LOW
458 </code></p></div>
459 <table class="bordered">
460
461 <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>
462 <tr><td colspan="7"><em>RSA Ciphers:</em></td></tr>
463 <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>
464 <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>
465 <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>
466 <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>
467 <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>
468 <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>
469 <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>
470 <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>
471 <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>
472 <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>
473 <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>
474 <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>
475 <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>
476 <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>
477 <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>
478 <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>
479 <tr><td><code>NULL-SHA</code></td> <td>SSLv3</td> <td>RSA</td> <td>RSA</td> <td>None</td> <td>SHA1</td> <td /> </tr>
480 <tr><td><code>NULL-MD5</code></td> <td>SSLv3</td> <td>RSA</td> <td>RSA</td> <td>None</td> <td>MD5</td> <td /> </tr>
481 <tr><td colspan="7"><em>Diffie-Hellman Ciphers:</em></td></tr>
482 <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>
483 <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>
484 <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>
485 <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>
486 <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>
487 <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>
488 <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>
489 <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>
490 <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>
491 <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>
492 <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>
493 </table>
494
495 </div>
496 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
497 <div class="directive-section"><h2><a name="SSLEngine" id="SSLEngine">SSLEngine</a> <a name="sslengine" id="sslengine">Directive</a></h2>
498 <table class="directive">
499 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>SSL Engine Operation Switch</td></tr>
500 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLEngine on|off</code></td></tr>
501 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSLEngine off</code></td></tr>
502 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
503 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
504 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
505 </table>
506 <p>
507 This directive toggles the usage of the SSL/TLS Protocol Engine. This
508 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
509 particular virtual host. By default the SSL/TLS Protocol Engine is
510 disabled for both the main server and all configured virtual hosts.</p>
511 <div class="example"><h3>Example</h3><p><code>
512 &lt;VirtualHost _default_:443&gt;<br />
513 SSLEngine on<br />
514 ...<br />
515 &lt;/VirtualHost&gt;
516 </code></p></div>
517
518 </div>
519 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
520 <div class="directive-section"><h2><a name="SSLInsecureRenegotiation" id="SSLInsecureRenegotiation">SSLInsecureRenegotiation</a> <a name="sslinsecurerenegotiation" id="sslinsecurerenegotiation">Directive</a></h2>
521 <table class="directive">
522 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Option to enable support for insecure renegotiation</td></tr>
523 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLInsecureRenegotiation <em>flag</em></code></td></tr>
524 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSLInsecureRenegotiation off</code></td></tr>
525 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
526 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
527 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
528 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in httpd 2.0.64 and later, if using OpenSSL 0.9.8m or later</td></tr>
529 </table>
530 <p>As originally specified, all versions of the SSL and TLS protocols
531 (up to and including TLS/1.2) were vulnerable to a Man-in-the-Middle
532 attack
533 (<a href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2009-3555">CVE-2009-3555</a>)
534 during a renegotiation.  This vulnerability allowed an attacker to
535 "prefix" a chosen plaintext to the HTTP request as seen by the web
536 server.  A protocol extension was developed which fixed this
537 vulnerability if supported by both client and server.</p>
538
539 <p>If <code class="module"><a href="../mod/mod_ssl.html">mod_ssl</a></code> is linked against OpenSSL version 0.9.8m
540 or later, by default renegotiation is only supported with
541 clients supporting the new protocol extension.  If this directive is
542 enabled, renegotiation will be allowed with old (unpatched) clients,
543 albeit insecurely.</p>
544
545 <div class="warning"><h3>Security warning</h3>
546 <p>If this directive is enabled, SSL connections will be vulnerable to
547 the Man-in-the-Middle prefix attack as described
548 in <a href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2009-3555">CVE-2009-3555</a>.</p>
549 </div>
550
551 <div class="example"><h3>Example</h3><p><code>
552 SSLInsecureRenegotiation on
553 </code></p></div>
554
555 <p>The <code>SSL_SECURE_RENEG</code> environment variable can be used
556 from an SSI or CGI script to determine whether secure renegotiation is
557 supported for a given SSL connection.</p>
558
559
560 </div>
561 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
562 <div class="directive-section"><h2><a name="SSLMutex" id="SSLMutex">SSLMutex</a> <a name="sslmutex" id="sslmutex">Directive</a></h2>
563 <table class="directive">
564 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Semaphore for internal mutual exclusion of 
565 operations</td></tr>
566 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLMutex <em>type</em></code></td></tr>
567 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSLMutex none</code></td></tr>
568 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
569 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
570 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
571 </table>
572 <p>
573 This configures the SSL engine's semaphore (aka. lock) which is used for mutual
574 exclusion of operations which have to be done in a synchronized way between the
575 pre-forked Apache server processes. This directive can only be used in the
576 global server context because it's only useful to have one global mutex.
577 This directive is designed to closely match the
578 <a href="http://httpd.apache.org/docs/2.0/mod/mpm_common.html#acceptmutex">AcceptMutex</a> directive</p>
579 <p>
580 The following Mutex <em>types</em> are available:</p>
581 <ul>
582 <li><code>none | no</code>
583     <p>
584     This is the default where no Mutex is used at all. Use it at your own
585     risk. But because currently the Mutex is mainly used for synchronizing
586     write access to the SSL Session Cache you can live without it as long
587     as you accept a sometimes garbled Session Cache. So it's not recommended
588     to leave this the default. Instead configure a real Mutex.</p></li>
589 <li><code>posixsem</code>
590     <p>
591     This is an elegant Mutex variant where a Posix Semaphore is used when possible.
592     It is only available when the underlying platform
593     and APR supports it.</p></li>
594 <li><code>sysvsem</code>
595     <p>
596     This is a somewhat elegant Mutex variant where a SystemV IPC Semaphore is used when
597     possible. It is possible to "leak" SysV semaphores if processes crash before
598     the semaphore is removed. It is only available when the underlying platform
599     and APR supports it.</p></li>
600 <li><code>sem</code>
601     <p>
602     This directive tells the SSL Module to pick the "best" semaphore implementation
603     available to it, choosing between Posix and SystemV IPC, in that order. It is only
604     available when the underlying platform and APR supports at least one of the 2.</p></li>
605 <li><code>pthread</code>
606     <p>
607     This directive tells the SSL Module to use Posix thread mutexes. It is only available
608     if the underlying platform and APR supports it.</p></li>
609 <li><code>fcntl:/path/to/mutex</code>
610     <p>
611     This is a portable Mutex variant where a physical (lock-)file and the <code>fcntl()</code>
612     fucntion are used as the Mutex.
613     Always use a local disk filesystem for <code>/path/to/mutex</code> and never a file
614     residing on a NFS- or AFS-filesystem. It is only available when the underlying platform
615     and APR supports it. Note: Internally, the Process ID (PID) of the
616     Apache parent process is automatically appended to
617     <code>/path/to/mutex</code> to make it unique, so you don't have to worry
618     about conflicts yourself. Notice that this type of mutex is not available
619     under the Win32 environment. There you <em>have</em> to use the semaphore
620     mutex.</p></li>
621 <li><code>flock:/path/to/mutex</code>
622     <p>
623     This is similar to the <code>fcntl:/path/to/mutex</code> method with the
624     exception that the <code>flock()</code> function is used to provide file
625     locking. It is only available when the underlying platform
626     and APR supports it.</p></li>
627 <li><code>file:/path/to/mutex</code>
628     <p>
629     This directive tells the SSL Module to pick the "best" file locking implementation
630     available to it, choosing between <code>fcntl</code> and <code>flock</code>,
631     in that order. It is only available when the underlying platform and APR supports
632     at least one of the 2.</p></li>
633 <li><code>default | yes</code>
634     <p>
635     This directive tells the SSL Module to pick the default locking implementation
636     as determined by the platform and APR.</p></li>
637 </ul>
638 <div class="example"><h3>Example</h3><p><code>
639 SSLMutex file:/usr/local/apache/logs/ssl_mutex
640 </code></p></div>
641
642 </div>
643 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
644 <div class="directive-section"><h2><a name="SSLOptions" id="SSLOptions">SSLOptions</a> <a name="ssloptions" id="ssloptions">Directive</a></h2>
645 <table class="directive">
646 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configure various SSL engine run-time options</td></tr>
647 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLOptions [+|-]<em>option</em> ...</code></td></tr>
648 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
649 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Options</td></tr>
650 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
651 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
652 </table>
653 <p>
654 This directive can be used to control various run-time options on a
655 per-directory basis. Normally, if multiple <code>SSLOptions</code>
656 could apply to a directory, then the most specific one is taken
657 completely; the options are not merged. However if <em>all</em> the
658 options on the <code>SSLOptions</code> directive are preceded by a
659 plus (<code>+</code>) or minus (<code>-</code>) symbol, the options
660 are merged. Any options preceded by a <code>+</code> are added to the
661 options currently in force, and any options preceded by a
662 <code>-</code> are removed from the options currently in force.</p>
663 <p>
664 The available <em>option</em>s are:</p>
665 <ul>
666 <li><code>StdEnvVars</code>
667     <p>
668     When this option is enabled, the standard set of SSL related CGI/SSI
669     environment variables are created. This per default is disabled for
670     performance reasons, because the information extraction step is a
671     rather expensive operation. So one usually enables this option for
672     CGI and SSI requests only.</p>
673 </li>
674 <li><code>CompatEnvVars</code>
675     <p>
676     When this option is enabled, additional CGI/SSI environment variables are
677     created for backward compatibility to other Apache SSL solutions. Look in
678     the <a href="../ssl/ssl_compat.html">Compatibility</a> chapter for details
679     on the particular variables generated.</p>
680 </li>
681 <li><code>ExportCertData</code>
682     <p>
683     When this option is enabled, additional CGI/SSI environment variables are
684     created: <code>SSL_SERVER_CERT</code>, <code>SSL_CLIENT_CERT</code> and
685     <code>SSL_CLIENT_CERT_CHAIN</code><em>n</em> (with <em>n</em> = 0,1,2,..).
686     These contain the PEM-encoded X.509 Certificates of server and client for
687     the current HTTPS connection and can be used by CGI scripts for deeper
688     Certificate checking. Additionally all other certificates of the client
689     certificate chain are provided, too. This bloats up the environment a
690     little bit which is why you have to use this option to enable it on
691     demand.</p>
692 </li>
693 <li><code>FakeBasicAuth</code>
694     <p>
695     When this option is enabled, the Subject Distinguished Name (DN) of the
696     Client X509 Certificate is translated into a HTTP Basic Authorization
697     username. This means that the standard Apache authentication methods can
698     be used for access control. The user name is just the Subject of the
699     Client's X509 Certificate (can be determined by running OpenSSL's
700     <code>openssl x509</code> command: <code>openssl x509 -noout -subject -in
701     </code><em>certificate</em><code>.crt</code>). Note that no password is
702     obtained from the user. Every entry in the user file needs this password:
703     ``<code>xxj31ZMTZzkVA</code>'', which is the DES-encrypted version of the
704     word `<code>password</code>''. Those who live under MD5-based encryption
705     (for instance under FreeBSD or BSD/OS, etc.) should use the following MD5
706     hash of the same word: ``<code>$1$OXLyS...$Owx8s2/m9/gfkcRVXzgoE/</code>''.</p>
707 </li>
708 <li><code>StrictRequire</code>
709     <p>
710     This <em>forces</em> forbidden access when <code>SSLRequireSSL</code> or
711     <code>SSLRequire</code> successfully decided that access should be
712     forbidden. Usually the default is that in the case where a ``<code>Satisfy
713     any</code>'' directive is used, and other access restrictions are passed,
714     denial of access due to <code>SSLRequireSSL</code> or
715     <code>SSLRequire</code> is overridden (because that's how the Apache
716     <code>Satisfy</code> mechanism should work.) But for strict access restriction
717     you can use <code>SSLRequireSSL</code> and/or <code>SSLRequire</code> in
718     combination with an ``<code>SSLOptions +StrictRequire</code>''. Then an
719     additional ``<code>Satisfy Any</code>'' has no chance once mod_ssl has
720     decided to deny access.</p>
721 </li>
722 <li><code>OptRenegotiate</code>
723     <p>
724     This enables optimized SSL connection renegotiation handling when SSL
725     directives are used in per-directory context. By default a strict
726     scheme is enabled where <em>every</em> per-directory reconfiguration of
727     SSL parameters causes a <em>full</em> SSL renegotiation handshake. When this
728     option is used mod_ssl tries to avoid unnecessary handshakes by doing more
729     granular (but still safe) parameter checks. Nevertheless these granular
730     checks sometimes maybe not what the user expects, so enable this on a
731     per-directory basis only, please.</p>
732 </li>
733 </ul>
734 <div class="example"><h3>Example</h3><p><code>
735 SSLOptions +FakeBasicAuth -StrictRequire<br />
736 &lt;Files ~ "\.(cgi|shtml)$"&gt;<br />
737     SSLOptions +StdEnvVars +CompatEnvVars -ExportCertData<br />
738 &lt;Files&gt;
739 </code></p></div>
740
741 </div>
742 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
743 <div class="directive-section"><h2><a name="SSLPassPhraseDialog" id="SSLPassPhraseDialog">SSLPassPhraseDialog</a> <a name="sslpassphrasedialog" id="sslpassphrasedialog">Directive</a></h2>
744 <table class="directive">
745 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Type of pass phrase dialog for encrypted private 
746 keys</td></tr>
747 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLPassPhraseDialog <em>type</em></code></td></tr>
748 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSLPassPhraseDialog builtin</code></td></tr>
749 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
750 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
751 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
752 </table>
753 <p>
754 When Apache starts up it has to read the various Certificate (see
755 <code class="directive"><a href="#sslcertificatefile">SSLCertificateFile</a></code>) and
756 Private Key (see <code class="directive"><a href="#sslcertificatekeyfile">SSLCertificateKeyFile</a></code>) files of the
757 SSL-enabled virtual servers. Because for security reasons the Private
758 Key files are usually encrypted, mod_ssl needs to query the
759 administrator for a Pass Phrase in order to decrypt those files. This
760 query can be done in two ways which can be configured by
761 <em>type</em>:</p>
762 <ul>
763 <li><code>builtin</code>
764     <p>
765     This is the default where an interactive terminal dialog occurs at startup
766     time just before Apache detaches from the terminal. Here the administrator
767     has to manually enter the Pass Phrase for each encrypted Private Key file.
768     Because a lot of SSL-enabled virtual hosts can be configured, the
769     following reuse-scheme is used to minimize the dialog: When a Private Key
770     file is encrypted, all known Pass Phrases (at the beginning there are
771     none, of course) are tried. If one of those known Pass Phrases succeeds no
772     dialog pops up for this particular Private Key file. If none succeeded,
773     another Pass Phrase is queried on the terminal and remembered for the next
774     round (where it perhaps can be reused).</p>
775     <p>
776     This scheme allows mod_ssl to be maximally flexible (because for N encrypted
777     Private Key files you <em>can</em> use N different Pass Phrases - but then
778     you have to enter all of them, of course) while minimizing the terminal
779     dialog (i.e. when you use a single Pass Phrase for all N Private Key files
780     this Pass Phrase is queried only once).</p></li>
781
782 <li><code>exec:/path/to/program</code>
783     <p>
784     Here an external program is configured which is called at startup for each
785     encrypted Private Key file. It is called with two arguments (the first is
786     of the form ``<code>servername:portnumber</code>'', the second is either
787     ``<code>RSA</code>'' or ``<code>DSA</code>''), which indicate for which
788     server and algorithm it has to print the corresponding Pass Phrase to
789     <code>stdout</code>. The intent is that this external program first runs
790     security checks to make sure that the system is not compromised by an
791     attacker, and only when these checks were passed successfully it provides
792     the Pass Phrase.</p>
793     <p>
794     Both these security checks, and the way the Pass Phrase is determined, can
795     be as complex as you like. Mod_ssl just defines the interface: an
796     executable program which provides the Pass Phrase on <code>stdout</code>.
797     Nothing more or less! So, if you're really paranoid about security, here
798     is your interface. Anything else has to be left as an exercise to the
799     administrator, because local security requirements are so different.</p>
800     <p>
801     The reuse-algorithm above is used here, too. In other words: The external
802     program is called only once per unique Pass Phrase.</p></li>
803 </ul>
804 <p>
805 Example:</p>
806 <div class="example"><p><code>
807 SSLPassPhraseDialog exec:/usr/local/apache/sbin/pp-filter
808 </code></p></div>
809
810 </div>
811 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
812 <div class="directive-section"><h2><a name="SSLProtocol" id="SSLProtocol">SSLProtocol</a> <a name="sslprotocol" id="sslprotocol">Directive</a></h2>
813 <table class="directive">
814 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configure usable SSL protocol flavors</td></tr>
815 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLProtocol [+|-]<em>protocol</em> ...</code></td></tr>
816 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSLProtocol all</code></td></tr>
817 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
818 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Options</td></tr>
819 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
820 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
821 </table>
822 <p>
823 This directive can be used to control the SSL protocol flavors mod_ssl should
824 use when establishing its server environment. Clients then can only connect
825 with one of the provided protocols.</p>
826 <p>
827 The available (case-insensitive) <em>protocol</em>s are:</p>
828 <ul>
829 <li><code>SSLv2</code>
830     <p>
831     This is the Secure Sockets Layer (SSL) protocol, version 2.0. It is the
832     original SSL protocol as designed by Netscape Corporation.</p></li>
833
834 <li><code>SSLv3</code>
835     <p>
836     This is the Secure Sockets Layer (SSL) protocol, version 3.0. It is the
837     successor to SSLv2 and the currently (as of February 1999) de-facto
838     standardized SSL protocol from Netscape Corporation. It's supported by
839     almost all popular browsers.</p></li>
840
841 <li><code>TLSv1</code>
842     <p>
843     This is the Transport Layer Security (TLS) protocol, version 1.0. It is the
844     successor to SSLv3 and currently (as of February 1999) still under
845     construction by the Internet Engineering Task Force (IETF). It's still
846     not supported by any popular browsers.</p></li>
847
848 <li><code>All</code>
849     <p>
850     This is a shortcut for ``<code>+SSLv2 +SSLv3 +TLSv1</code>'' and a
851     convinient way for enabling all protocols except one when used in
852     combination with the minus sign on a protocol as the example above 
853     shows.</p></li>
854 </ul>
855 <div class="example"><h3>Example</h3><p><code>
856 #   enable SSLv3 and TLSv1, but not SSLv2<br />
857 SSLProtocol all -SSLv2
858 </code></p></div>
859
860 </div>
861 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
862 <div class="directive-section"><h2><a name="SSLProxyCACertificateFile" id="SSLProxyCACertificateFile">SSLProxyCACertificateFile</a> <a name="sslproxycacertificatefile" id="sslproxycacertificatefile">Directive</a></h2>
863 <table class="directive">
864 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>File of concatenated PEM-encoded CA Certificates 
865 for Remote Server Auth</td></tr>
866 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLProxyCACertificateFile <em>file-path</em></code></td></tr>
867 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
868 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
869 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
870 </table>
871 <p>
872 This directive sets the <em>all-in-one</em> file where you can assemble the
873 Certificates of Certification Authorities (CA) whose <em>remote servers</em> you deal
874 with. These are used for Remote Server Authentication. Such a file is simply the
875 concatenation of the various PEM-encoded Certificate files, in order of
876 preference. This can be used alternatively and/or additionally to 
877 <code class="directive"><a href="#sslproxycacertificatepath">SSLProxyCACertificatePath</a></code>.</p>
878 <div class="example"><h3>Example</h3><p><code>
879 SSLProxyCACertificateFile /usr/local/apache2/conf/ssl.crt/ca-bundle-remote-server.crt
880 </code></p></div>
881
882 </div>
883 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
884 <div class="directive-section"><h2><a name="SSLProxyCACertificatePath" id="SSLProxyCACertificatePath">SSLProxyCACertificatePath</a> <a name="sslproxycacertificatepath" id="sslproxycacertificatepath">Directive</a></h2>
885 <table class="directive">
886 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Directory of PEM-encoded CA Certificates for 
887 Remote Server Auth</td></tr>
888 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLProxyCACertificatePath <em>directory-path</em></code></td></tr>
889 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
890 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
891 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
892 </table>
893 <p>
894 This directive sets the directory where you keep the Certificates of
895 Certification Authorities (CAs) whose remote servers you deal with. These are used to
896 verify the remote server certificate on Remote Server Authentication.</p>
897 <p>
898 The files in this directory have to be PEM-encoded and are accessed through
899 hash filenames. So usually you can't just place the Certificate files
900 there: you also have to create symbolic links named
901 <em>hash-value</em><code>.N</code>. And you should always make sure this directory
902 contains the appropriate symbolic links. Use the <code>Makefile</code> which
903 comes with mod_ssl to accomplish this task.</p>
904 <div class="example"><h3>Example</h3><p><code>
905 SSLProxyCACertificatePath /usr/local/apache2/conf/ssl.crt/
906 </code></p></div>
907
908 </div>
909 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
910 <div class="directive-section"><h2><a name="SSLProxyCARevocationFile" id="SSLProxyCARevocationFile">SSLProxyCARevocationFile</a> <a name="sslproxycarevocationfile" id="sslproxycarevocationfile">Directive</a></h2>
911 <table class="directive">
912 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>File of concatenated PEM-encoded CA CRLs for 
913 Remote Server Auth</td></tr>
914 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLProxyCARevocationFile <em>file-path</em></code></td></tr>
915 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
916 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
917 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
918 </table>
919 <p>
920 This directive sets the <em>all-in-one</em> file where you can
921 assemble the Certificate Revocation Lists (CRL) of Certification
922 Authorities (CA) whose <em>remote servers</em> you deal with. These are used
923 for Remote Server Authentication.  Such a file is simply the concatenation of
924 the various PEM-encoded CRL files, in order of preference. This can be
925 used alternatively and/or additionally to <code class="directive"><a href="#sslproxycarevocationpath">SSLProxyCARevocationPath</a></code>.</p>
926 <div class="example"><h3>Example</h3><p><code>
927 SSLProxyCARevocationFile /usr/local/apache2/conf/ssl.crl/ca-bundle-remote-server.crl
928 </code></p></div>
929
930 </div>
931 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
932 <div class="directive-section"><h2><a name="SSLProxyCARevocationPath" id="SSLProxyCARevocationPath">SSLProxyCARevocationPath</a> <a name="sslproxycarevocationpath" id="sslproxycarevocationpath">Directive</a></h2>
933 <table class="directive">
934 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Directory of PEM-encoded CA CRLs for 
935 Remote Server Auth</td></tr>
936 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLProxyCARevocationPath <em>directory-path</em></code></td></tr>
937 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
938 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
939 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
940 </table>
941 <p>
942 This directive sets the directory where you keep the Certificate Revocation
943 Lists (CRL) of Certification Authorities (CAs) whose remote servers you deal with.
944 These are used to revoke the remote server certificate on Remote Server Authentication.</p>
945 <p>
946 The files in this directory have to be PEM-encoded and are accessed through
947 hash filenames. So usually you have not only to place the CRL files there.
948 Additionally you have to create symbolic links named
949 <em>hash-value</em><code>.rN</code>. And you should always make sure this directory
950 contains the appropriate symbolic links. Use the <code>Makefile</code> which
951 comes with <code class="module"><a href="../mod/mod_ssl.html">mod_ssl</a></code> to accomplish this task.</p>
952 <div class="example"><h3>Example</h3><p><code>
953 SSLProxyCARevocationPath /usr/local/apache2/conf/ssl.crl/
954 </code></p></div>
955
956 </div>
957 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
958 <div class="directive-section"><h2><a name="SSLProxyCipherSuite" id="SSLProxyCipherSuite">SSLProxyCipherSuite</a> <a name="sslproxyciphersuite" id="sslproxyciphersuite">Directive</a></h2>
959 <table class="directive">
960 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Cipher Suite available for negotiation in SSL 
961 proxy handshake</td></tr>
962 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLProxyCipherSuite <em>cipher-spec</em></code></td></tr>
963 <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>
964 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
965 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>AuthConfig</td></tr>
966 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
967 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
968 </table>
969 <p>Equivalent to <code>SSLCipherSuite</code>, but for the proxy connection.
970 Please refer to <code class="directive"><a href="#sslciphersuite">SSLCipherSuite</a></code>
971 for additional information.</p>
972
973 </div>
974 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
975 <div class="directive-section"><h2><a name="SSLProxyEngine" id="SSLProxyEngine">SSLProxyEngine</a> <a name="sslproxyengine" id="sslproxyengine">Directive</a></h2>
976 <table class="directive">
977 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>SSL Proxy Engine Operation Switch</td></tr>
978 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLProxyEngine on|off</code></td></tr>
979 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSLProxyEngine off</code></td></tr>
980 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
981 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
982 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
983 </table>
984 <p>
985 This directive toggles the usage of the SSL/TLS Protocol Engine for proxy. This
986 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
987 usage in a particular virtual host. By default the SSL/TLS Protocol Engine is
988 disabled for proxy image both for the main server and all configured virtual hosts.</p>
989 <div class="example"><h3>Example</h3><p><code>
990 &lt;VirtualHost _default_:443&gt;<br />
991 SSLProxyEngine on<br />
992 ...<br />
993 &lt;/VirtualHost&gt;
994 </code></p></div>
995
996 </div>
997 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
998 <div class="directive-section"><h2><a name="SSLProxyMachineCertificateFile" id="SSLProxyMachineCertificateFile">SSLProxyMachineCertificateFile</a> <a name="sslproxymachinecertificatefile" id="sslproxymachinecertificatefile">Directive</a></h2>
999 <table class="directive">
1000 <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>
1001 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLProxyMachineCertificateFile <em>filename</em></code></td></tr>
1002 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
1003 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Not applicable</td></tr>
1004 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
1005 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
1006 </table>
1007 <p>
1008 This directive sets the all-in-one file where you keep the certificates and
1009 keys used for authentication of the proxy server to remote servers.
1010 </p>
1011 <p>
1012 This referenced file is simply the concatenation of the various PEM-encoded
1013 certificate files, in order of preference. Use this directive alternatively
1014 or additionally to <code>SSLProxyMachineCertificatePath</code>.
1015 </p>
1016 <div class="warning">
1017 <p>Currently there is no support for encrypted private keys</p>
1018 </div>
1019 <p>
1020 Example:</p>
1021 <div class="example"><p><code>
1022 SSLProxyMachineCertificateFile /usr/local/apache2/conf/ssl.crt/proxy.pem
1023 </code></p></div>
1024
1025 </div>
1026 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1027 <div class="directive-section"><h2><a name="SSLProxyMachineCertificatePath" id="SSLProxyMachineCertificatePath">SSLProxyMachineCertificatePath</a> <a name="sslproxymachinecertificatepath" id="sslproxymachinecertificatepath">Directive</a></h2>
1028 <table class="directive">
1029 <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>
1030 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLProxyMachineCertificatePath <em>directory</em></code></td></tr>
1031 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
1032 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Not applicable</td></tr>
1033 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
1034 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
1035 </table>
1036 <p>
1037 This directive sets the directory where you keep the certificates and
1038 keys used for authentication of the proxy server to remote servers.
1039 </p>
1040 <p>The files in this directory must be PEM-encoded and are accessed through
1041 hash filenames. Additionally, you must create symbolic links named
1042 <code><em>hash-value</em>.N</code>. And you should always make sure this
1043 directory contains the appropriate symbolic links. Use the Makefile which
1044 comes with mod_ssl to accomplish this task.
1045 </p>
1046 <div class="warning">
1047 <p>Currently there is no support for encrypted private keys</p>
1048 </div>
1049 <p>
1050 Example:</p>
1051 <div class="example"><p><code>
1052 SSLProxyMachineCertificatePath /usr/local/apache2/conf/proxy.crt/
1053 </code></p></div> 
1054
1055 </div>
1056 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1057 <div class="directive-section"><h2><a name="SSLProxyProtocol" id="SSLProxyProtocol">SSLProxyProtocol</a> <a name="sslproxyprotocol" id="sslproxyprotocol">Directive</a></h2>
1058 <table class="directive">
1059 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configure usable SSL protocol flavors for proxy usage</td></tr>
1060 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLProxyProtocol [+|-]<em>protocol</em> ...</code></td></tr>
1061 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSLProxyProtocol all</code></td></tr>
1062 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
1063 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>Options</td></tr>
1064 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
1065 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
1066 </table>
1067
1068 <p>
1069 This directive can be used to control the SSL protocol flavors mod_ssl should
1070 use when establishing its server environment for proxy . It will only connect
1071 to servers using one of the provided protocols.</p>
1072 <p>Please refer to <code class="directive"><a href="#sslprotocol">SSLProtocol</a></code>
1073 for additional information.
1074 </p>
1075
1076 </div>
1077 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1078 <div class="directive-section"><h2><a name="SSLProxyVerify" id="SSLProxyVerify">SSLProxyVerify</a> <a name="sslproxyverify" id="sslproxyverify">Directive</a></h2>
1079 <table class="directive">
1080 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Type of remote server Certificate verification</td></tr>
1081 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLProxyVerify <em>level</em></code></td></tr>
1082 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSLProxyVerify none</code></td></tr>
1083 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
1084 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>AuthConfig</td></tr>
1085 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
1086 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
1087 </table>
1088 <p>
1089 This directive sets the Certificate verification level for the remote server
1090 Authentication. Notice that this directive can be used both in per-server and
1091 per-directory context. In per-server context it applies to the remote server
1092 authentication process used in the standard SSL handshake when a connection is
1093 established. In per-directory context it forces a SSL renegotation with the
1094 reconfigured remote server verification level after the HTTP request was read but
1095 before the HTTP response is sent.</p>
1096 <p>
1097 The following levels are available for <em>level</em>:</p>
1098 <ul>
1099 <li><strong>none</strong>:
1100      no remote server Certificate is required at all</li>
1101 <li><strong>optional</strong>:
1102      the remote server <em>may</em> present a valid Certificate</li>
1103 <li><strong>require</strong>:
1104      the remote server <em>has to</em> present a valid Certificate</li>
1105 <li><strong>optional_no_ca</strong>:
1106      the remote server may present a valid Certificate<br />
1107      but it need not to be (successfully) verifiable.</li>
1108 </ul>
1109 <p>In practice only levels <strong>none</strong> and
1110 <strong>require</strong> are really interesting, because level
1111 <strong>optional</strong> doesn't work with all servers and level
1112 <strong>optional_no_ca</strong> is actually against the idea of
1113 authentication (but can be used to establish SSL test pages, etc.)</p>
1114 <div class="example"><h3>Example</h3><p><code>
1115 SSLProxyVerify require
1116 </code></p></div>
1117
1118 </div>
1119 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1120 <div class="directive-section"><h2><a name="SSLProxyVerifyDepth" id="SSLProxyVerifyDepth">SSLProxyVerifyDepth</a> <a name="sslproxyverifydepth" id="sslproxyverifydepth">Directive</a></h2>
1121 <table class="directive">
1122 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Maximum depth of CA Certificates in Remote Server
1123 Certificate verification</td></tr>
1124 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLProxyVerifyDepth <em>number</em></code></td></tr>
1125 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSLProxyVerifyDepth 1</code></td></tr>
1126 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
1127 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>AuthConfig</td></tr>
1128 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
1129 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
1130 </table>
1131 <p>
1132 This directive sets how deeply mod_ssl should verify before deciding that the
1133 remote server does not have a valid certificate. Notice that this directive can be
1134 used both in per-server and per-directory context. In per-server context it
1135 applies to the client authentication process used in the standard SSL
1136 handshake when a connection is established. In per-directory context it forces
1137 a SSL renegotation with the reconfigured remote server verification depth after the
1138 HTTP request was read but before the HTTP response is sent.</p>
1139 <p>
1140 The depth actually is the maximum number of intermediate certificate issuers,
1141 i.e. the number of CA certificates which are max allowed to be followed while
1142 verifying the remote server certificate. A depth of 0 means that self-signed
1143 remote server certificates are accepted only, the default depth of 1 means
1144 the remote server certificate can be self-signed or has to be signed by a CA
1145 which is directly known to the server (i.e. the CA's certificate is under
1146 <code class="directive"><a href="#sslproxycacertificatepath">SSLProxyCACertificatePath</a></code>), etc.</p>
1147 <div class="example"><h3>Example</h3><p><code>
1148 SSLProxyVerifyDepth 10
1149 </code></p></div>
1150
1151 </div>
1152 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1153 <div class="directive-section"><h2><a name="SSLRandomSeed" id="SSLRandomSeed">SSLRandomSeed</a> <a name="sslrandomseed" id="sslrandomseed">Directive</a></h2>
1154 <table class="directive">
1155 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Pseudo Random Number Generator (PRNG) seeding 
1156 source</td></tr>
1157 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLRandomSeed <em>context</em> <em>source</em> 
1158 [<em>bytes</em>]</code></td></tr>
1159 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
1160 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
1161 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
1162 </table>
1163 <p>
1164 This configures one or more sources for seeding the Pseudo Random Number
1165 Generator (PRNG) in OpenSSL at startup time (<em>context</em> is
1166 <code>startup</code>) and/or just before a new SSL connection is established
1167 (<em>context</em> is <code>connect</code>). This directive can only be used
1168 in the global server context because the PRNG is a global facility.</p>
1169 <p>
1170 The following <em>source</em> variants are available:</p>
1171 <ul>
1172 <li><code>builtin</code>
1173     <p> This is the always available builtin seeding source. It's usage
1174     consumes minimum CPU cycles under runtime and hence can be always used
1175     without drawbacks. The source used for seeding the PRNG contains of the
1176     current time, the current process id and (when applicable) a randomly
1177     choosen 1KB extract of the inter-process scoreboard structure of Apache.
1178     The drawback is that this is not really a strong source and at startup
1179     time (where the scoreboard is still not available) this source just
1180     produces a few bytes of entropy. So you should always, at least for the
1181     startup, use an additional seeding source.</p></li>
1182 <li><code>file:/path/to/source</code>
1183     <p>
1184     This variant uses an external file <code>/path/to/source</code> as the
1185     source for seeding the PRNG. When <em>bytes</em> is specified, only the
1186     first <em>bytes</em> number of bytes of the file form the entropy (and
1187     <em>bytes</em> is given to <code>/path/to/source</code> as the first
1188     argument). When <em>bytes</em> is not specified the whole file forms the
1189     entropy (and <code>0</code> is given to <code>/path/to/source</code> as
1190     the first argument). Use this especially at startup time, for instance
1191     with an available <code>/dev/random</code> and/or
1192     <code>/dev/urandom</code> devices (which usually exist on modern Unix
1193     derivates like FreeBSD and Linux).</p>
1194     <p>
1195     <em>But be careful</em>: Usually <code>/dev/random</code> provides only as
1196     much entropy data as it actually has, i.e. when you request 512 bytes of
1197     entropy, but the device currently has only 100 bytes available two things
1198     can happen: On some platforms you receive only the 100 bytes while on
1199     other platforms the read blocks until enough bytes are available (which
1200     can take a long time). Here using an existing <code>/dev/urandom</code> is
1201     better, because it never blocks and actually gives the amount of requested
1202     data. The drawback is just that the quality of the received data may not
1203     be the best.</p>
1204     <p>
1205     On some platforms like FreeBSD one can even control how the entropy is
1206     actually generated, i.e. by which system interrupts. More details one can
1207     find under <em>rndcontrol(8)</em> on those platforms. Alternatively, when
1208     your system lacks such a random device, you can use tool
1209     like <a href="http://www.lothar.com/tech/crypto/">EGD</a>
1210     (Entropy Gathering Daemon) and run it's client program with the
1211     <code>exec:/path/to/program/</code> variant (see below) or use
1212     <code>egd:/path/to/egd-socket</code> (see below).</p></li>
1213
1214 <li><code>exec:/path/to/program</code>
1215     <p>
1216     This variant uses an external executable
1217     <code>/path/to/program</code> as the source for seeding the
1218     PRNG. When <em>bytes</em> is specified, only the first
1219     <em>bytes</em> number of bytes of its <code>stdout</code> contents
1220     form the entropy. When <em>bytes</em> is not specified, the
1221     entirety of the data produced on <code>stdout</code> form the
1222     entropy. Use this only at startup time when you need a very strong
1223     seeding with the help of an external program (for instance as in
1224     the example above with the <code>truerand</code> utility you can
1225     find in the mod_ssl distribution which is based on the AT&amp;T
1226     <em>truerand</em> library). Using this in the connection context
1227     slows down the server too dramatically, of course.  So usually you
1228     should avoid using external programs in that context.</p></li>
1229 <li><code>egd:/path/to/egd-socket</code> (Unix only)
1230     <p>
1231     This variant uses the Unix domain socket of the
1232     external Entropy Gathering Daemon (EGD) (see <a href="http://www.lothar.com/tech/crypto/">http://www.lothar.com/tech
1233     /crypto/</a>) to seed the PRNG. Use this if no random device exists
1234     on your platform.</p></li>
1235 </ul>
1236 <div class="example"><h3>Example</h3><p><code>
1237 SSLRandomSeed startup builtin<br />
1238 SSLRandomSeed startup file:/dev/random<br />
1239 SSLRandomSeed startup file:/dev/urandom 1024<br />
1240 SSLRandomSeed startup exec:/usr/local/bin/truerand 16<br />
1241 SSLRandomSeed connect builtin<br />
1242 SSLRandomSeed connect file:/dev/random<br />
1243 SSLRandomSeed connect file:/dev/urandom 1024<br />
1244 </code></p></div>
1245
1246 </div>
1247 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1248 <div class="directive-section"><h2><a name="SSLRequire" id="SSLRequire">SSLRequire</a> <a name="sslrequire" id="sslrequire">Directive</a></h2>
1249 <table class="directive">
1250 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Allow access only when an arbitrarily complex 
1251 boolean expression is true</td></tr>
1252 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLRequire <em>expression</em></code></td></tr>
1253 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
1254 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>AuthConfig</td></tr>
1255 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
1256 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
1257 </table>
1258 <p>
1259 This directive specifies a general access requirement which has to be
1260 fulfilled in order to allow access. It's a very powerful directive because the
1261 requirement specification is an arbitrarily complex boolean expression
1262 containing any number of access checks.</p>
1263 <p>
1264 The <em>expression</em> must match the following syntax (given as a BNF
1265 grammar notation):</p>
1266 <blockquote>
1267 <pre>
1268 expr     ::= "<strong>true</strong>" | "<strong>false</strong>"
1269            | "<strong>!</strong>" expr
1270            | expr "<strong>&amp;&amp;</strong>" expr
1271            | expr "<strong>||</strong>" expr
1272            | "<strong>(</strong>" expr "<strong>)</strong>"
1273            | comp
1274
1275 comp     ::= word "<strong>==</strong>" word | word "<strong>eq</strong>" word
1276            | word "<strong>!=</strong>" word | word "<strong>ne</strong>" word
1277            | word "<strong>&lt;</strong>"  word | word "<strong>lt</strong>" word
1278            | word "<strong>&lt;=</strong>" word | word "<strong>le</strong>" word
1279            | word "<strong>&gt;</strong>"  word | word "<strong>gt</strong>" word
1280            | word "<strong>&gt;=</strong>" word | word "<strong>ge</strong>" word
1281            | word "<strong>in</strong>" "<strong>{</strong>" wordlist "<strong>}</strong>"
1282            | word "<strong>=~</strong>" regex
1283            | word "<strong>!~</strong>" regex
1284
1285 wordlist ::= word
1286            | wordlist "<strong>,</strong>" word
1287
1288 word     ::= digit
1289            | cstring
1290            | variable
1291            | function
1292
1293 digit    ::= [0-9]+
1294 cstring  ::= "..."
1295 variable ::= "<strong>%{</strong>" varname "<strong>}</strong>"
1296 function ::= funcname "<strong>(</strong>" funcargs "<strong>)</strong>"
1297 </pre>
1298 </blockquote>
1299 <p>while for <code>varname</code> any variable from <a href="#table3">Table 3</a> can be used. Finally for
1300 <code>funcname</code> the following functions are available:</p>
1301 <ul>
1302 <li><code>file(</code><em>filename</em><code>)</code>
1303     <p>
1304     This function takes one string argument and expands to the contents of the
1305     file. This is especially useful for matching this contents against a
1306     regular expression, etc.</p>
1307 </li>
1308 </ul>
1309 <p>Notice that <em>expression</em> is first parsed into an internal machine
1310 representation and then evaluated in a second step. Actually, in Global and
1311 Per-Server Class context <em>expression</em> is parsed at startup time and
1312 at runtime only the machine representation is executed. For Per-Directory
1313 context this is different: here <em>expression</em> has to be parsed and
1314 immediately executed for every request.</p>
1315 <div class="example"><h3>Example</h3><p><code>
1316 SSLRequire (    %{SSL_CIPHER} !~ m/^(EXP|NULL)-/ \<br />
1317             and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \<br />
1318             and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} \<br />
1319             and %{TIME_WDAY} &gt;= 1 and %{TIME_WDAY} &lt;= 5 \<br />
1320             and %{TIME_HOUR} &gt;= 8 and %{TIME_HOUR} &lt;= 20       ) \<br />
1321            or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/
1322 </code></p></div>
1323
1324 <p><em>Standard CGI/1.0 and Apache variables:</em></p>
1325 <pre>
1326 HTTP_USER_AGENT        PATH_INFO             AUTH_TYPE
1327 HTTP_REFERER           QUERY_STRING          SERVER_SOFTWARE
1328 HTTP_COOKIE            REMOTE_HOST           API_VERSION
1329 HTTP_FORWARDED         REMOTE_IDENT          TIME_YEAR
1330 HTTP_HOST              IS_SUBREQ             TIME_MON
1331 HTTP_PROXY_CONNECTION  DOCUMENT_ROOT         TIME_DAY
1332 HTTP_ACCEPT            SERVER_ADMIN          TIME_HOUR
1333 HTTP:headername        SERVER_NAME           TIME_MIN
1334 THE_REQUEST            SERVER_PORT           TIME_SEC
1335 REQUEST_METHOD         SERVER_PROTOCOL       TIME_WDAY
1336 REQUEST_SCHEME         REMOTE_ADDR           TIME
1337 REQUEST_URI            REMOTE_USER           ENV:<strong>variablename</strong>
1338 REQUEST_FILENAME
1339 </pre>
1340 <p><em>SSL-related variables:</em></p>
1341 <pre>
1342 HTTPS                  SSL_CLIENT_M_VERSION   SSL_SERVER_M_VERSION
1343                        SSL_CLIENT_M_SERIAL    SSL_SERVER_M_SERIAL
1344 SSL_PROTOCOL           SSL_CLIENT_V_START     SSL_SERVER_V_START
1345 SSL_SESSION_ID         SSL_CLIENT_V_END       SSL_SERVER_V_END
1346 SSL_CIPHER             SSL_CLIENT_S_DN        SSL_SERVER_S_DN
1347 SSL_CIPHER_EXPORT      SSL_CLIENT_S_DN_C      SSL_SERVER_S_DN_C
1348 SSL_CIPHER_ALGKEYSIZE  SSL_CLIENT_S_DN_ST     SSL_SERVER_S_DN_ST
1349 SSL_CIPHER_USEKEYSIZE  SSL_CLIENT_S_DN_L      SSL_SERVER_S_DN_L
1350 SSL_VERSION_LIBRARY    SSL_CLIENT_S_DN_O      SSL_SERVER_S_DN_O
1351 SSL_VERSION_INTERFACE  SSL_CLIENT_S_DN_OU     SSL_SERVER_S_DN_OU
1352                        SSL_CLIENT_S_DN_CN     SSL_SERVER_S_DN_CN
1353                        SSL_CLIENT_S_DN_T      SSL_SERVER_S_DN_T
1354                        SSL_CLIENT_S_DN_I      SSL_SERVER_S_DN_I
1355                        SSL_CLIENT_S_DN_G      SSL_SERVER_S_DN_G
1356                        SSL_CLIENT_S_DN_S      SSL_SERVER_S_DN_S
1357                        SSL_CLIENT_S_DN_D      SSL_SERVER_S_DN_D
1358                        SSL_CLIENT_S_DN_UID    SSL_SERVER_S_DN_UID
1359                        SSL_CLIENT_S_DN_Email  SSL_SERVER_S_DN_Email
1360                        SSL_CLIENT_I_DN        SSL_SERVER_I_DN
1361                        SSL_CLIENT_I_DN_C      SSL_SERVER_I_DN_C
1362                        SSL_CLIENT_I_DN_ST     SSL_SERVER_I_DN_ST
1363                        SSL_CLIENT_I_DN_L      SSL_SERVER_I_DN_L
1364                        SSL_CLIENT_I_DN_O      SSL_SERVER_I_DN_O
1365                        SSL_CLIENT_I_DN_OU     SSL_SERVER_I_DN_OU
1366                        SSL_CLIENT_I_DN_CN     SSL_SERVER_I_DN_CN
1367                        SSL_CLIENT_I_DN_T      SSL_SERVER_I_DN_T
1368                        SSL_CLIENT_I_DN_I      SSL_SERVER_I_DN_I
1369                        SSL_CLIENT_I_DN_G      SSL_SERVER_I_DN_G
1370                        SSL_CLIENT_I_DN_S      SSL_SERVER_I_DN_S
1371                        SSL_CLIENT_I_DN_D      SSL_SERVER_I_DN_D
1372                        SSL_CLIENT_I_DN_UID    SSL_SERVER_I_DN_UID
1373                        SSL_CLIENT_I_DN_Email  SSL_SERVER_I_DN_Email
1374                        SSL_CLIENT_A_SIG       SSL_SERVER_A_SIG
1375                        SSL_CLIENT_A_KEY       SSL_SERVER_A_KEY
1376                        SSL_CLIENT_CERT        SSL_SERVER_CERT
1377                        SSL_CLIENT_CERT_CHAIN<strong>n</strong>
1378                        SSL_CLIENT_VERIFY
1379 </pre>
1380
1381 </div>
1382 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1383 <div class="directive-section"><h2><a name="SSLRequireSSL" id="SSLRequireSSL">SSLRequireSSL</a> <a name="sslrequiressl" id="sslrequiressl">Directive</a></h2>
1384 <table class="directive">
1385 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Deny access when SSL is not used for the 
1386 HTTP request</td></tr>
1387 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLRequireSSL</code></td></tr>
1388 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory, .htaccess</td></tr>
1389 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>AuthConfig</td></tr>
1390 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
1391 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
1392 </table>
1393 <p>
1394 This directive forbids access unless HTTP over SSL (i.e. HTTPS) is enabled for
1395 the current connection. This is very handy inside the SSL-enabled virtual
1396 host or directories for defending against configuration errors that expose
1397 stuff that should be protected. When this directive is present all requests
1398 are denied which are not using SSL.</p>
1399 <div class="example"><h3>Example</h3><p><code>
1400 SSLRequireSSL
1401 </code></p></div>
1402
1403 </div>
1404 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1405 <div class="directive-section"><h2><a name="SSLSessionCache" id="SSLSessionCache">SSLSessionCache</a> <a name="sslsessioncache" id="sslsessioncache">Directive</a></h2>
1406 <table class="directive">
1407 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Type of the global/inter-process SSL Session 
1408 Cache</td></tr>
1409 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLSessionCache <em>type</em></code></td></tr>
1410 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSLSessionCache none</code></td></tr>
1411 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config</td></tr>
1412 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
1413 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
1414 </table>
1415 <p>
1416 This configures the storage type of the global/inter-process SSL Session
1417 Cache. This cache is an optional facility which speeds up parallel request
1418 processing. For requests to the same server process (via HTTP keep-alive),
1419 OpenSSL already caches the SSL session information locally. But because modern
1420 clients request inlined images and other data via parallel requests (usually
1421 up to four parallel requests are common) those requests are served by
1422 <em>different</em> pre-forked server processes. Here an inter-process cache
1423 helps to avoid unneccessary session handshakes.</p>
1424 <p>
1425 The following two storage <em>type</em>s are currently supported:</p>
1426 <ul>
1427 <li><code>none</code>
1428     <p>
1429     This is the default and just disables the global/inter-process Session
1430     Cache. There is no drawback in functionality, but a noticeable speed
1431     penalty can be observed.</p></li>
1432 <li><code>dbm:/path/to/datafile</code>
1433     <p>
1434     This makes use of a DBM hashfile on the local disk to synchronize the
1435     local OpenSSL memory caches of the server processes. The slight increase
1436     in I/O on the server results in a visible request speedup for your
1437     clients, so this type of storage is generally recommended.</p></li>
1438 <li><code>shm:/path/to/datafile</code>[<code>(</code><em>size</em><code>)</code>]
1439     <p>
1440     This makes use of a high-performance hash table (approx. <em>size</em> bytes
1441     in size) inside a shared memory segment in RAM (established via
1442     <code>/path/to/datafile</code>) to synchronize the local OpenSSL memory
1443     caches of the server processes. This storage type is not available on all
1444     platforms.</p></li>
1445 </ul>
1446 <div class="example"><h3>Examples</h3><p><code>
1447 SSLSessionCache dbm:/usr/local/apache/logs/ssl_gcache_data<br />
1448 SSLSessionCache shm:/usr/local/apache/logs/ssl_gcache_data(512000)
1449 </code></p></div>
1450
1451 </div>
1452 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1453 <div class="directive-section"><h2><a name="SSLSessionCacheTimeout" id="SSLSessionCacheTimeout">SSLSessionCacheTimeout</a> <a name="sslsessioncachetimeout" id="sslsessioncachetimeout">Directive</a></h2>
1454 <table class="directive">
1455 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Number of seconds before an SSL session expires
1456 in the Session Cache</td></tr>
1457 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLSessionCacheTimeout <em>seconds</em></code></td></tr>
1458 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSLSessionCacheTimeout 300</code></td></tr>
1459 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
1460 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
1461 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
1462 </table>
1463 <p>
1464 This directive sets the timeout in seconds for the information stored in the
1465 global/inter-process SSL Session Cache and the OpenSSL internal memory cache.
1466 It can be set as low as 15 for testing, but should be set to higher
1467 values like 300 in real life.</p>
1468 <div class="example"><h3>Example</h3><p><code>
1469 SSLSessionCacheTimeout 600
1470 </code></p></div>
1471
1472 </div>
1473 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1474 <div class="directive-section"><h2><a name="SSLUserName" id="SSLUserName">SSLUserName</a> <a name="sslusername" id="sslusername">Directive</a></h2>
1475 <table class="directive">
1476 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Variable name to determine user name</td></tr>
1477 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLUserName <em>varname</em></code></td></tr>
1478 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, directory, .htaccess</td></tr>
1479 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>AuthConfig</td></tr>
1480 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
1481 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
1482 <tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.0.51 and later</td></tr>
1483 </table>
1484 <p>
1485 This directive sets the "user" field in the Apache request object.
1486 This is used by lower modules to identify the user with a character
1487 string. In particular, this may cause the environment variable
1488 <code>REMOTE_USER</code> to be set.  The <em>varname</em> can be
1489 any of the <a href="#envvars">SSL environment variables</a>.</p>
1490 <div class="example"><h3>Example</h3><p><code>
1491 SSLUserName SSL_CLIENT_S_DN_CN
1492 </code></p></div>
1493
1494 </div>
1495 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1496 <div class="directive-section"><h2><a name="SSLVerifyClient" id="SSLVerifyClient">SSLVerifyClient</a> <a name="sslverifyclient" id="sslverifyclient">Directive</a></h2>
1497 <table class="directive">
1498 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Type of Client Certificate verification</td></tr>
1499 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLVerifyClient <em>level</em></code></td></tr>
1500 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSLVerifyClient none</code></td></tr>
1501 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
1502 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>AuthConfig</td></tr>
1503 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
1504 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
1505 </table>
1506 <p>
1507 This directive sets the Certificate verification level for the Client
1508 Authentication. Notice that this directive can be used both in per-server and
1509 per-directory context. In per-server context it applies to the client
1510 authentication process used in the standard SSL handshake when a connection is
1511 established. In per-directory context it forces a SSL renegotation with the
1512 reconfigured client verification level after the HTTP request was read but
1513 before the HTTP response is sent.</p>
1514 <p>
1515 The following levels are available for <em>level</em>:</p>
1516 <ul>
1517 <li><strong>none</strong>:
1518      no client Certificate is required at all</li>
1519 <li><strong>optional</strong>:
1520      the client <em>may</em> present a valid Certificate</li>
1521 <li><strong>require</strong>:
1522      the client <em>has to</em> present a valid Certificate</li>
1523 <li><strong>optional_no_ca</strong>:
1524      the client may present a valid Certificate<br />
1525      but it need not to be (successfully) verifiable.</li>
1526 </ul>
1527 <p>In practice only levels <strong>none</strong> and
1528 <strong>require</strong> are really interesting, because level
1529 <strong>optional</strong> doesn't work with all browsers and level
1530 <strong>optional_no_ca</strong> is actually against the idea of
1531 authentication (but can be used to establish SSL test pages, etc.)</p>
1532 <div class="example"><h3>Example</h3><p><code>
1533 SSLVerifyClient require
1534 </code></p></div>
1535
1536 </div>
1537 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
1538 <div class="directive-section"><h2><a name="SSLVerifyDepth" id="SSLVerifyDepth">SSLVerifyDepth</a> <a name="sslverifydepth" id="sslverifydepth">Directive</a></h2>
1539 <table class="directive">
1540 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Maximum depth of CA Certificates in Client 
1541 Certificate verification</td></tr>
1542 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>SSLVerifyDepth <em>number</em></code></td></tr>
1543 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>SSLVerifyDepth 1</code></td></tr>
1544 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
1545 <tr><th><a href="directive-dict.html#Override">Override:</a></th><td>AuthConfig</td></tr>
1546 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
1547 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_ssl</td></tr>
1548 </table>
1549 <p>
1550 This directive sets how deeply mod_ssl should verify before deciding that the
1551 clients don't have a valid certificate. Notice that this directive can be
1552 used both in per-server and per-directory context. In per-server context it
1553 applies to the client authentication process used in the standard SSL
1554 handshake when a connection is established. In per-directory context it forces
1555 a SSL renegotation with the reconfigured client verification depth after the
1556 HTTP request was read but before the HTTP response is sent.</p>
1557 <p>
1558 The depth actually is the maximum number of intermediate certificate issuers,
1559 i.e. the number of CA certificates which are max allowed to be followed while
1560 verifying the client certificate. A depth of 0 means that self-signed client
1561 certificates are accepted only, the default depth of 1 means the client
1562 certificate can be self-signed or has to be signed by a CA which is directly
1563 known to the server (i.e. the CA's certificate is under
1564 <code class="directive"><a href="#sslcacertificatepath">SSLCACertificatePath</a></code>), etc.</p>
1565 <div class="example"><h3>Example</h3><p><code>
1566 SSLVerifyDepth 10
1567 </code></p></div>
1568
1569 </div>
1570 </div>
1571 <div class="bottomlang">
1572 <p><span>Available Languages: </span><a href="../en/mod/mod_ssl.html" title="English">&nbsp;en&nbsp;</a></p>
1573 </div><div id="footer">
1574 <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>
1575 <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>
1576 </body></html>