1 <html xmlns="http://www.w3.org/TR/xhtml1/strict"><head><!--
2 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
3 This file is generated from xml source: DO NOT EDIT
4 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
5 --><title>mod_ssl- Apache HTTP Server</title><link href="../style/manual.css" type="text/css" rel="stylesheet"/></head><body><blockquote><div align="center"><img src="../images/sub.gif" alt="[APACHE DOCUMENTATION]"/><h3>Apache HTTP Server Version 2.0</h3></div><h1 align="center">Apache Module mod_ssl</h1><table cellspacing="1" cellpadding="0" bgcolor="#cccccc"><tr><td><table bgcolor="#ffffff"><tr><td valign="top"><span class="help">Description:</span></td><td>Strong cryptography using the Secure Sockets
6 Layer (SSL) and Transport Layer Security (TLS) protocols</td></tr><tr><td><a href="module-dict.html#Status" class="help">Status:</a></td><td>Extension</td></tr><tr><td><a href="module-dict.html#ModuleIdentifier" class="help">Module Identifier:</a></td><td>ssl_module</td></tr></table></td></tr></table><h2>Summary</h2>
7 <p>This module provides SSL v2/v3 and TLS v1 support for the Apache
8 HTTP Server. It was contributed by Ralf S. Engeschall based on his
9 mod_ssl project and originally derived from work by Ben Laurie.</p>
11 <p>This module relies on <a href="http://www.openssl.org/">OpenSSL</a>
12 to provide the cryptography engine.</p>
14 <p>Further details, discussion, and examples are provided in the
15 <a href="../ssl/">SSL documentation</a>.</p>
16 <h2>Directives</h2><ul><li><a href="#sslcacertificatefile">SSLCACertificateFile</a></li><li><a href="#sslcacertificatepath">SSLCACertificatePath</a></li><li><a href="#sslcarevocationfile">SSLCARevocationFile</a></li><li><a href="#sslcarevocationpath">SSLCARevocationPath</a></li><li><a href="#sslcertificatechainfile">SSLCertificateChainFile</a></li><li><a href="#sslcertificatefile">SSLCertificateFile</a></li><li><a href="#sslcertificatekeyfile">SSLCertificateKeyFile</a></li><li><a href="#sslciphersuite">SSLCipherSuite</a></li><li><a href="#sslengine">SSLEngine</a></li><li><a href="#sslmutex">SSLMutex</a></li><li><a href="#ssloptions">SSLOptions</a></li><li><a href="#sslpassphrasedialog">SSLPassPhraseDialog</a></li><li><a href="#sslprotocol">SSLProtocol</a></li><li><a href="#sslrandomseed">SSLRandomSeed</a></li><li><a href="#sslrequire">SSLRequire</a></li><li><a href="#sslrequiressl">SSLRequireSSL</a></li><li><a href="#sslsessioncache">SSLSessionCache</a></li><li><a href="#sslsessioncachetimeout">SSLSessionCacheTimeout</a></li><li><a href="#sslverifyclient">SSLVerifyClient</a></li><li><a href="#sslverifydepth">SSLVerifyDepth</a></li></ul><h2>Environment Variables</h2>
18 <p>This module provides a lot of SSL information as additional environment
19 variables to the SSI and CGI namespace. The generated variables are listed in
20 the table below. For backward compatibility the information can
21 be made available under different names, too. Look in the <a href="../ssl/ssl_compat.html">Compatibility</a> chapter for details on the
22 compatibility variables.</p>
24 <table width="600" cellspacing="0" cellpadding="1" border="0" summary="">
26 <tr><td bgcolor="#cccccc">
27 <table width="598" cellpadding="5" cellspacing="0" border="0" summary="">
28 <tr><td bgcolor="#ffffff">
29 <table border="0" cellspacing="0" cellpadding="2" width="598" summary="">
31 <td><strong>Variable Name:</strong></td>
32 <td><strong>Value Type:</strong></td>
33 <td><strong>Description:</strong></td>
35 <tr><td><code>HTTPS</code></td> <td>flag</td> <td>HTTPS is being used.</td></tr>
36 <tr><td><code>SSL_PROTOCOL</code></td> <td>string</td> <td>The SSL protocol version (SSLv2, SSLv3, TLSv1)</td></tr>
37 <tr><td><code>SSL_SESSION_ID</code></td> <td>string</td> <td>The hex-encoded SSL session id</td></tr>
38 <tr><td><code>SSL_CIPHER</code></td> <td>string</td> <td>The cipher specification name</td></tr>
39 <tr><td><code>SSL_CIPHER_EXPORT</code></td> <td>string</td> <td><code>true</code> if cipher is an export cipher</td></tr>
40 <tr><td><code>SSL_CIPHER_USEKEYSIZE</code></td> <td>number</td> <td>Number of cipher bits (actually used)</td></tr>
41 <tr><td><code>SSL_CIPHER_ALGKEYSIZE</code></td> <td>number</td> <td>Number of cipher bits (possible)</td></tr>
42 <tr><td><code>SSL_VERSION_INTERFACE</code></td> <td>string</td> <td>The mod_ssl program version</td></tr>
43 <tr><td><code>SSL_VERSION_LIBRARY</code></td> <td>string</td> <td>The OpenSSL program version</td></tr>
44 <tr><td><code>SSL_CLIENT_M_VERSION</code></td> <td>string</td> <td>The version of the client certificate</td></tr>
45 <tr><td><code>SSL_CLIENT_M_SERIAL</code></td> <td>string</td> <td>The serial of the client certificate</td></tr>
46 <tr><td><code>SSL_CLIENT_S_DN</code></td> <td>string</td> <td>Subject DN in client's certificate</td></tr>
47 <tr><td><code>SSL_CLIENT_S_DN_</code><em>x509</em></td> <td>string</td> <td>Component of client's Subject DN</td></tr>
48 <tr><td><code>SSL_CLIENT_I_DN</code></td> <td>string</td> <td>Issuer DN of client's certificate</td></tr>
49 <tr><td><code>SSL_CLIENT_I_DN_</code><em>x509</em></td> <td>string</td> <td>Component of client's Issuer DN</td></tr>
50 <tr><td><code>SSL_CLIENT_V_START</code></td> <td>string</td> <td>Validity of client's certificate (start time)</td></tr>
51 <tr><td><code>SSL_CLIENT_V_END</code></td> <td>string</td> <td>Validity of client's certificate (end time)</td></tr>
52 <tr><td><code>SSL_CLIENT_A_SIG</code></td> <td>string</td> <td>Algorithm used for the signature of client's certificate</td></tr>
53 <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>
54 <tr><td><code>SSL_CLIENT_CERT</code></td> <td>string</td> <td>PEM-encoded client certificate</td></tr>
55 <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>
56 <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>
57 <tr><td><code>SSL_SERVER_M_VERSION</code></td> <td>string</td> <td>The version of the server certificate</td></tr>
58 <tr><td><code>SSL_SERVER_M_SERIAL</code></td> <td>string</td> <td>The serial of the server certificate</td></tr>
59 <tr><td><code>SSL_SERVER_S_DN</code></td> <td>string</td> <td>Subject DN in server's certificate</td></tr>
60 <tr><td><code>SSL_SERVER_S_DN_</code><em>x509</em></td> <td>string</td> <td>Component of server's Subject DN</td></tr>
61 <tr><td><code>SSL_SERVER_I_DN</code></td> <td>string</td> <td>Issuer DN of server's certificate</td></tr>
62 <tr><td><code>SSL_SERVER_I_DN_</code><em>x509</em></td> <td>string</td> <td>Component of server's Issuer DN</td></tr>
63 <tr><td><code>SSL_SERVER_V_START</code></td> <td>string</td> <td>Validity of server's certificate (start time)</td></tr>
64 <tr><td><code>SSL_SERVER_V_END</code></td> <td>string</td> <td>Validity of server's certificate (end time)</td></tr>
65 <tr><td><code>SSL_SERVER_A_SIG</code></td> <td>string</td> <td>Algorithm used for the signature of server's certificate</td></tr>
66 <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>
67 <tr><td><code>SSL_SERVER_CERT</code></td> <td>string</td> <td>PEM-encoded server certificate</td></tr>
69 [ where <em>x509</em> is a component of a X.509 DN:
70 <code>C,ST,L,O,OU,CN,T,I,G,S,D,UID,Email</code> ]
74 <h2>Custom Log Formats</h2>
76 <p>When <code><a href="mod_ssl.html">mod_ssl</a></code> is built into Apache or at least
77 loaded (under DSO situation) additional functions exist for the <a href="../mod_log_config.html#formats">Custom Log Format</a> of
78 <code><a href="mod_log_config.html">mod_log_config</a></code>. First there is an
79 additional ``<code>%{</code><em>varname</em><code>}x</code>''
80 eXtension format function which can be used to expand any variables
81 provided by any module, especially those provided by mod_ssl which can
82 you find in the above table.</p>
84 For backward compatibility there is additionally a special
85 ``<code>%{</code><em>name</em><code>}c</code>'' cryptography format function
86 provided. Information about this function is provided in the <a href="../ssl/ssl_compat.html">Compatibility</a> chapter.</p>
89 <blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><code>
90 CustomLog logs/ssl_request_log \
91 "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
92 </code></td></tr></table></blockquote>
93 <hr/><h2><a name="SSLCACertificateFile">SSLCACertificateFile</a> <a name="sslcacertificatefile">Directive</a></h2><table cellpadding="1" cellspacing="0" border="0" bgcolor="#cccccc"><tr><td><table bgcolor="#ffffff"><tr><td><strong>Description: </strong></td><td>File of concatenated PEM-encoded CA Certificates
94 for Client Auth</td></tr><tr><td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td>SSLCACertificateFile <em>file-path</em></td></tr><tr><td><a href="directive-dict.html#Context" class="help">Context:</a></td><td>server config, virtual host</td></tr><tr><td><a href="directive-dict.html#Status" class="help">Status:</a></td><td>Extension</td></tr><tr><td><a href="directive-dict.html#Module" class="help">Module:</a></td><td>mod_ssl</td></tr></table></td></tr></table>
96 This directive sets the <em>all-in-one</em> file where you can assemble the
97 Certificates of Certification Authorities (CA) whose <em>clients</em> you deal
98 with. These are used for Client Authentication. Such a file is simply the
99 concatenation of the various PEM-encoded Certificate files, in order of
100 preference. This can be used alternatively and/or additionally to
101 <a href="#sslcacertificatepath" class="directive"><code class="directive">SSLCACertificatePath</code></a>.</p>
102 <blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><p align="center"><strong>Example</strong></p><code>
103 SSLCACertificateFile /usr/local/apache/conf/ssl.crt/ca-bundle-client.crt
104 </code></td></tr></table></blockquote>
105 <hr/><h2><a name="SSLCACertificatePath">SSLCACertificatePath</a> <a name="sslcacertificatepath">Directive</a></h2><table cellpadding="1" cellspacing="0" border="0" bgcolor="#cccccc"><tr><td><table bgcolor="#ffffff"><tr><td><strong>Description: </strong></td><td>Directory of PEM-encoded CA Certificates for
106 Client Auth</td></tr><tr><td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td>SSLCACertificatePath <em>directory-path</em></td></tr><tr><td><a href="directive-dict.html#Context" class="help">Context:</a></td><td>server config, virtual host</td></tr><tr><td><a href="directive-dict.html#Status" class="help">Status:</a></td><td>Extension</td></tr><tr><td><a href="directive-dict.html#Module" class="help">Module:</a></td><td>mod_ssl</td></tr></table></td></tr></table>
108 This directive sets the directory where you keep the Certificates of
109 Certification Authorities (CAs) whose clients you deal with. These are used to
110 verify the client certificate on Client Authentication.</p>
112 The files in this directory have to be PEM-encoded and are accessed through
113 hash filenames. So usually you can't just place the Certificate files
114 there: you also have to create symbolic links named
115 <em>hash-value</em><code>.N</code>. And you should always make sure this directory
116 contains the appropriate symbolic links. Use the <code>Makefile</code> which
117 comes with mod_ssl to accomplish this task.</p>
118 <blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><p align="center"><strong>Example</strong></p><code>
119 SSLCACertificatePath /usr/local/apache/conf/ssl.crt/
120 </code></td></tr></table></blockquote>
121 <hr/><h2><a name="SSLCARevocationFile">SSLCARevocationFile</a> <a name="sslcarevocationfile">Directive</a></h2><table cellpadding="1" cellspacing="0" border="0" bgcolor="#cccccc"><tr><td><table bgcolor="#ffffff"><tr><td><strong>Description: </strong></td><td>File of concatenated PEM-encoded CA CRLs for
122 Client Auth</td></tr><tr><td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td>SSLCARevocationFile <em>file-path</em></td></tr><tr><td><a href="directive-dict.html#Context" class="help">Context:</a></td><td>server config, virtual host</td></tr><tr><td><a href="directive-dict.html#Status" class="help">Status:</a></td><td>Extension</td></tr><tr><td><a href="directive-dict.html#Module" class="help">Module:</a></td><td>mod_ssl</td></tr></table></td></tr></table>
124 This directive sets the <em>all-in-one</em> file where you can
125 assemble the Certificate Revocation Lists (CRL) of Certification
126 Authorities (CA) whose <em>clients</em> you deal with. These are used
127 for Client Authentication. Such a file is simply the concatenation of
128 the various PEM-encoded CRL files, in order of preference. This can be
129 used alternatively and/or additionally to <a href="#sslcarevocationpath" class="directive"><code class="directive">SSLCARevocationPath</code></a>.</p>
130 <blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><p align="center"><strong>Example</strong></p><code>
131 SSLCARevocationFile /usr/local/apache/conf/ssl.crl/ca-bundle-client.crl
132 </code></td></tr></table></blockquote>
133 <hr/><h2><a name="SSLCARevocationPath">SSLCARevocationPath</a> <a name="sslcarevocationpath">Directive</a></h2><table cellpadding="1" cellspacing="0" border="0" bgcolor="#cccccc"><tr><td><table bgcolor="#ffffff"><tr><td><strong>Description: </strong></td><td>Directory of PEM-encoded CA CRLs for
134 Client Auth</td></tr><tr><td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td>SSLCARevocationPath <em>directory-path</em></td></tr><tr><td><a href="directive-dict.html#Context" class="help">Context:</a></td><td>server config, virtual host</td></tr><tr><td><a href="directive-dict.html#Status" class="help">Status:</a></td><td>Extension</td></tr><tr><td><a href="directive-dict.html#Module" class="help">Module:</a></td><td>mod_ssl</td></tr></table></td></tr></table>
136 This directive sets the directory where you keep the Certificate Revocation
137 Lists (CRL) of Certification Authorities (CAs) whose clients you deal with.
138 These are used to revoke the client certificate on Client Authentication.</p>
140 The files in this directory have to be PEM-encoded and are accessed through
141 hash filenames. So usually you have not only to place the CRL files there.
142 Additionally you have to create symbolic links named
143 <em>hash-value</em><code>.rN</code>. And you should always make sure this directory
144 contains the appropriate symbolic links. Use the <code>Makefile</code> which
145 comes with <code><a href="mod_ssl.html">mod_ssl</a></code> to accomplish this task.</p>
146 <blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><p align="center"><strong>Example</strong></p><code>
147 SSLCARevocationPath /usr/local/apache/conf/ssl.crl/
148 </code></td></tr></table></blockquote>
149 <hr/><h2><a name="SSLCertificateChainFile">SSLCertificateChainFile</a> <a name="sslcertificatechainfile">Directive</a></h2><table cellpadding="1" cellspacing="0" border="0" bgcolor="#cccccc"><tr><td><table bgcolor="#ffffff"><tr><td><strong>Description: </strong></td><td>File of PEM-encoded Server CA Certificates</td></tr><tr><td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td>SSLCertificateChainFile <em>file-path</em></td></tr><tr><td><a href="directive-dict.html#Context" class="help">Context:</a></td><td>server config, virtual host</td></tr><tr><td><a href="directive-dict.html#Status" class="help">Status:</a></td><td>Extension</td></tr><tr><td><a href="directive-dict.html#Module" class="help">Module:</a></td><td>mod_ssl</td></tr></table></td></tr></table>
151 This directive sets the optional <em>all-in-one</em> file where you can
152 assemble the certificates of Certification Authorities (CA) which form the
153 certificate chain of the server certificate. This starts with the issuing CA
154 certificate of of the server certificate and can range up to the root CA
155 certificate. Such a file is simply the concatenation of the various
156 PEM-encoded CA Certificate files, usually in certificate chain order.</p>
158 This should be used alternatively and/or additionally to <a href="#sslcacertificatepath" class="directive"><code class="directive">SSLCACertificatePath</code></a> for explicitly
159 constructing the server certificate chain which is sent to the browser
160 in addition to the server certificate. It is especially useful to
161 avoid conflicts with CA certificates when using client
162 authentication. Because although placing a CA certificate of the
163 server certificate chain into <a href="#sslcacertificatepath" class="directive"><code class="directive">SSLCACertificatePath</code></a> has the same effect
164 for the certificate chain construction, it has the side-effect that
165 client certificates issued by this same CA certificate are also
166 accepted on client authentication. That's usually not one expect.</p>
168 But be careful: Providing the certificate chain works only if you are using a
169 <em>single</em> (either RSA <em>or</em> DSA) based server certificate. If you are
170 using a coupled RSA+DSA certificate pair, this will work only if actually both
171 certificates use the <em>same</em> certificate chain. Else the browsers will be
172 confused in this situation.</p>
173 <blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><p align="center"><strong>Example</strong></p><code>
174 SSLCertificateChainFile /usr/local/apache/conf/ssl.crt/ca.crt
175 </code></td></tr></table></blockquote>
176 <hr/><h2><a name="SSLCertificateFile">SSLCertificateFile</a> <a name="sslcertificatefile">Directive</a></h2><table cellpadding="1" cellspacing="0" border="0" bgcolor="#cccccc"><tr><td><table bgcolor="#ffffff"><tr><td><strong>Description: </strong></td><td>Server PEM-encoded X.509 Certificate file</td></tr><tr><td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td>SSLCertificateFile <em>file-path</em></td></tr><tr><td><a href="directive-dict.html#Context" class="help">Context:</a></td><td>server config, virtual host</td></tr><tr><td><a href="directive-dict.html#Status" class="help">Status:</a></td><td>Extension</td></tr><tr><td><a href="directive-dict.html#Module" class="help">Module:</a></td><td>mod_ssl</td></tr></table></td></tr></table>
178 This directive points to the PEM-encoded Certificate file for the server and
179 optionally also to the corresponding RSA or DSA Private Key file for it
180 (contained in the same file). If the contained Private Key is encrypted the
181 Pass Phrase dialog is forced at startup time. This directive can be used up to
182 two times (referencing different filenames) when both a RSA and a DSA based
183 server certificate is used in parallel.</p>
184 <blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><p align="center"><strong>Example</strong></p><code>
185 SSLCertificateFile /usr/local/apache/conf/ssl.crt/server.crt
186 </code></td></tr></table></blockquote>
187 <hr/><h2><a name="SSLCertificateKeyFile">SSLCertificateKeyFile</a> <a name="sslcertificatekeyfile">Directive</a></h2><table cellpadding="1" cellspacing="0" border="0" bgcolor="#cccccc"><tr><td><table bgcolor="#ffffff"><tr><td><strong>Description: </strong></td><td>Server PEM-encoded Private Key file</td></tr><tr><td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td>SSLCertificateKeyFile <em>file-path</em></td></tr><tr><td><a href="directive-dict.html#Context" class="help">Context:</a></td><td>server config, virtual host</td></tr><tr><td><a href="directive-dict.html#Status" class="help">Status:</a></td><td>Extension</td></tr><tr><td><a href="directive-dict.html#Module" class="help">Module:</a></td><td>mod_ssl</td></tr></table></td></tr></table>
189 This directive points to the PEM-encoded Private Key file for the
190 server. If the Private Key is not combined with the Certificate in the
191 <code class="directive">SSLCertificateFile</code>, use this additional directive to
192 point to the file with the stand-alone Private Key. When
193 <code class="directive">SSLCertificateFile</code> is used and the file
194 contains both the Certificate and the Private Key this directive need
195 not be used. But we strongly discourage this practice. Instead we
196 recommend you to separate the Certificate and the Private Key. If the
197 contained Private Key is encrypted, the Pass Phrase dialog is forced
198 at startup time. This directive can be used up to two times
199 (referencing different filenames) when both a RSA and a DSA based
200 private key is used in parallel.</p>
201 <blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><p align="center"><strong>Example</strong></p><code>
202 SSLCertificateKeyFile /usr/local/apache/conf/ssl.key/server.key
203 </code></td></tr></table></blockquote>
204 <hr/><h2><a name="SSLCipherSuite">SSLCipherSuite</a> <a name="sslciphersuite">Directive</a></h2><table cellpadding="1" cellspacing="0" border="0" bgcolor="#cccccc"><tr><td><table bgcolor="#ffffff"><tr><td><strong>Description: </strong></td><td>Cipher Suite available for negotiation in SSL
205 handshake</td></tr><tr><td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td>SSLCipherSuite <em>cipher-spec</em></td></tr><tr><td><a href="directive-dict.html#Default" class="help">Default:</a></td><td><code>SSLCipherSuite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP</code></td></tr><tr><td><a href="directive-dict.html#Context" class="help">Context:</a></td><td>server config, virtual host, directory, .htaccess</td></tr><tr><td><a href="directive-dict.html#Override" class="help">Override:</a></td><td>AuthConfig</td></tr><tr><td><a href="directive-dict.html#Status" class="help">Status:</a></td><td>Extension</td></tr><tr><td><a href="directive-dict.html#Module" class="help">Module:</a></td><td>mod_ssl</td></tr></table></td></tr></table>
207 This complex directive uses a colon-separated <em>cipher-spec</em> string
208 consisting of OpenSSL cipher specifications to configure the Cipher Suite the
209 client is permitted to negotiate in the SSL handshake phase. Notice that this
210 directive can be used both in per-server and per-directory context. In
211 per-server context it applies to the standard SSL handshake when a connection
212 is established. In per-directory context it forces a SSL renegotation with the
213 reconfigured Cipher Suite after the HTTP request was read but before the HTTP
214 response is sent.</p>
216 An SSL cipher specification in <em>cipher-spec</em> is composed of 4 major
217 attributes plus a few extra minor ones:</p>
219 <li><em>Key Exchange Algorithm</em>:<br>
220 RSA or Diffie-Hellman variants.
222 <li><em>Authentication Algorithm</em>:<br>
223 RSA, Diffie-Hellman, DSS or none.
225 <li><em>Cipher/Encryption Algorithm</em>:<br>
226 DES, Triple-DES, RC4, RC2, IDEA or none.
228 <li><em>MAC Digest Algorithm</em>:<br>
232 <p>An SSL cipher can also be an export cipher and is either a SSLv2 or SSLv3/TLSv1
233 cipher (here TLSv1 is equivalent to SSLv3). To specify which ciphers to use,
234 one can either specify all the Ciphers, one at a time, or use aliases to
235 specify the preference and order for the ciphers (see <a href="#table1">Table
238 <table width="600" cellspacing="0" cellpadding="1" border="0" summary="">
240 <tr><td bgcolor="#cccccc">
241 <table width="598" cellpadding="5" cellspacing="0" border="0" summary="">
242 <tr><td bgcolor="#ffffff">
243 <table border="0" cellspacing="0" cellpadding="2" width="598" summary="">
244 <tr><td><strong>Tag</strong></td> <td><strong>Description</strong></td></tr>
245 <tr><td colspan="2"><em>Key Exchange Algorithm:</em></td></tr>
246 <tr><td><code>kRSA</code></td> <td>RSA key exchange</td></tr>
247 <tr><td><code>kDHr</code></td> <td>Diffie-Hellman key exchange with RSA key</td></tr>
248 <tr><td><code>kDHd</code></td> <td>Diffie-Hellman key exchange with DSA key</td></tr>
249 <tr><td><code>kEDH</code></td> <td>Ephemeral (temp.key) Diffie-Hellman key exchange (no cert)</td> </tr>
250 <tr><td colspan="2"><em>Authentication Algorithm:</em></td></tr>
251 <tr><td><code>aNULL</code></td> <td>No authentication</td></tr>
252 <tr><td><code>aRSA</code></td> <td>RSA authentication</td></tr>
253 <tr><td><code>aDSS</code></td> <td>DSS authentication</td> </tr>
254 <tr><td><code>aDH</code></td> <td>Diffie-Hellman authentication</td></tr>
255 <tr><td colspan="2"><em>Cipher Encoding Algorithm:</em></td></tr>
256 <tr><td><code>eNULL</code></td> <td>No encoding</td> </tr>
257 <tr><td><code>DES</code></td> <td>DES encoding</td> </tr>
258 <tr><td><code>3DES</code></td> <td>Triple-DES encoding</td> </tr>
259 <tr><td><code>RC4</code></td> <td>RC4 encoding</td> </tr>
260 <tr><td><code>RC2</code></td> <td>RC2 encoding</td> </tr>
261 <tr><td><code>IDEA</code></td> <td>IDEA encoding</td> </tr>
262 <tr><td colspan="2"><em>MAC Digest Algorithm</em>:</td></tr>
263 <tr><td><code>MD5</code></td> <td>MD5 hash function</td></tr>
264 <tr><td><code>SHA1</code></td> <td>SHA1 hash function</td></tr>
265 <tr><td><code>SHA</code></td> <td>SHA hash function</td> </tr>
266 <tr><td colspan="2"><em>Aliases:</em></td></tr>
267 <tr><td><code>SSLv2</code></td> <td>all SSL version 2.0 ciphers</td></tr>
268 <tr><td><code>SSLv3</code></td> <td>all SSL version 3.0 ciphers</td> </tr>
269 <tr><td><code>TLSv1</code></td> <td>all TLS version 1.0 ciphers</td> </tr>
270 <tr><td><code>EXP</code></td> <td>all export ciphers</td> </tr>
271 <tr><td><code>EXPORT40</code></td> <td>all 40-bit export ciphers only</td> </tr>
272 <tr><td><code>EXPORT56</code></td> <td>all 56-bit export ciphers only</td> </tr>
273 <tr><td><code>LOW</code></td> <td>all low strength ciphers (no export, single DES)</td></tr>
274 <tr><td><code>MEDIUM</code></td> <td>all ciphers with 128 bit encryption</td> </tr>
275 <tr><td><code>HIGH</code></td> <td>all ciphers using Triple-DES</td> </tr>
276 <tr><td><code>RSA</code></td> <td>all ciphers using RSA key exchange</td> </tr>
277 <tr><td><code>DH</code></td> <td>all ciphers using Diffie-Hellman key exchange</td> </tr>
278 <tr><td><code>EDH</code></td> <td>all ciphers using Ephemeral Diffie-Hellman key exchange</td> </tr>
279 <tr><td><code>ADH</code></td> <td>all ciphers using Anonymous Diffie-Hellman key exchange</td> </tr>
280 <tr><td><code>DSS</code></td> <td>all ciphers using DSS authentication</td> </tr>
281 <tr><td><code>NULL</code></td> <td>all ciphers using no encryption</td> </tr>
287 Now where this becomes interesting is that these can be put together
288 to specify the order and ciphers you wish to use. To speed this up
289 there are also aliases (<code>SSLv2, SSLv3, TLSv1, EXP, LOW, MEDIUM,
290 HIGH</code>) for certain groups of ciphers. These tags can be joined
291 together with prefixes to form the <em>cipher-spec</em>. Available
294 <li>none: add cipher to list</li>
295 <li><code>+</code>: add ciphers to list and pull them to current location in list</li>
296 <li><code>-</code>: remove cipher from list (can be added later again)</li>
297 <li><code>!</code>: kill cipher from list completely (can <strong>not</strong> be added later again)</li>
299 <p>A simpler way to look at all of this is to use the ``<code>openssl ciphers
300 -v</code>'' command which provides a nice way to successively create the
301 correct <em>cipher-spec</em> string. The default <em>cipher-spec</em> string
302 is ``<code>ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP</code>'' which
303 means the following: first, remove from consideration any ciphers that do not
304 authenticate, i.e. for SSL only the Anonymous Diffie-Hellman ciphers. Next,
305 use ciphers using RC4 and RSA. Next include the high, medium and then the low
306 security ciphers. Finally <em>pull</em> all SSLv2 and export ciphers to the
308 <blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><code>
310 $ openssl ciphers -v 'ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP'
311 NULL-SHA SSLv3 Kx=RSA Au=RSA Enc=None Mac=SHA1
312 NULL-MD5 SSLv3 Kx=RSA Au=RSA Enc=None Mac=MD5
313 EDH-RSA-DES-CBC3-SHA SSLv3 Kx=DH Au=RSA Enc=3DES(168) Mac=SHA1
315 EXP-RC4-MD5 SSLv3 Kx=RSA(512) Au=RSA Enc=RC4(40) Mac=MD5 export
316 EXP-RC2-CBC-MD5 SSLv2 Kx=RSA(512) Au=RSA Enc=RC2(40) Mac=MD5 export
317 EXP-RC4-MD5 SSLv2 Kx=RSA(512) Au=RSA Enc=RC4(40) Mac=MD5 export
319 </code></td></tr></table></blockquote>
320 <p>The complete list of particular RSA & DH ciphers for SSL is given in <a href="#table2">Table 2</a>.</p>
321 <blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><p align="center"><strong>Example</strong></p><code>
322 SSLCipherSuite RSA:!EXP:!NULL:+HIGH:+MEDIUM:-LOW
323 </code></td></tr></table></blockquote>
324 <table width="600" cellspacing="0" cellpadding="1" border="0" summary="">
326 <tr><td bgcolor="#cccccc">
327 <table width="598" cellpadding="5" cellspacing="0" border="0" summary="">
328 <tr><td bgcolor="#ffffff">
329 <table border="0" cellspacing="0" cellpadding="2" width="598" summary="">
330 <tr><td><strong>Cipher-Tag</strong></td> <td><strong>Protocol</strong></td> <td><strong>Key Ex.</strong></td> <td><strong>Auth.</strong></td> <td><strong>Enc.</strong></td> <td><strong>MAC</strong></td> <td><strong>Type</strong></td> </tr>
331 <tr><td colspan="7"><em>RSA Ciphers:</em></td></tr>
332 <tr><td><code>DES-CBC3-SHA</code></td> <td>SSLv3</td> <td>RSA</td> <td>RSA</td> <td>3DES(168)</td> <td>SHA1</td> <td> </td> </tr>
333 <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> </td> </tr>
334 <tr><td><code>IDEA-CBC-SHA</code></td> <td>SSLv3</td> <td>RSA</td> <td>RSA</td> <td>IDEA(128)</td> <td>SHA1</td> <td> </td> </tr>
335 <tr><td><code>RC4-SHA</code></td> <td>SSLv3</td> <td>RSA</td> <td>RSA</td> <td>RC4(128)</td> <td>SHA1</td> <td> </td> </tr>
336 <tr><td><code>RC4-MD5</code></td> <td>SSLv3</td> <td>RSA</td> <td>RSA</td> <td>RC4(128)</td> <td>MD5</td> <td> </td> </tr>
337 <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> </td> </tr>
338 <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> </td> </tr>
339 <tr><td><code>RC4-MD5</code></td> <td>SSLv2</td> <td>RSA</td> <td>RSA</td> <td>RC4(128)</td> <td>MD5</td> <td> </td> </tr>
340 <tr><td><code>DES-CBC-SHA</code></td> <td>SSLv3</td> <td>RSA</td> <td>RSA</td> <td>DES(56)</td> <td>SHA1</td> <td> </td> </tr>
341 <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> </td> </tr>
342 <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> </td> </tr>
343 <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>
344 <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>
345 <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>
346 <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>
347 <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>
348 <tr><td><code>NULL-SHA</code></td> <td>SSLv3</td> <td>RSA</td> <td>RSA</td> <td>None</td> <td>SHA1</td> <td> </td> </tr>
349 <tr><td><code>NULL-MD5</code></td> <td>SSLv3</td> <td>RSA</td> <td>RSA</td> <td>None</td> <td>MD5</td> <td> </td> </tr>
350 <tr><td colspan="7"><em>Diffie-Hellman Ciphers:</em></td></tr>
351 <tr><td><code>ADH-DES-CBC3-SHA</code></td> <td>SSLv3</td> <td>DH</td> <td>None</td> <td>3DES(168)</td> <td>SHA1</td> <td> </td> </tr>
352 <tr><td><code>ADH-DES-CBC-SHA</code></td> <td>SSLv3</td> <td>DH</td> <td>None</td> <td>DES(56)</td> <td>SHA1</td> <td> </td> </tr>
353 <tr><td><code>ADH-RC4-MD5</code></td> <td>SSLv3</td> <td>DH</td> <td>None</td> <td>RC4(128)</td> <td>MD5</td> <td> </td> </tr>
354 <tr><td><code>EDH-RSA-DES-CBC3-SHA</code></td> <td>SSLv3</td> <td>DH</td> <td>RSA</td> <td>3DES(168)</td> <td>SHA1</td> <td> </td> </tr>
355 <tr><td><code>EDH-DSS-DES-CBC3-SHA</code></td> <td>SSLv3</td> <td>DH</td> <td>DSS</td> <td>3DES(168)</td> <td>SHA1</td> <td> </td> </tr>
356 <tr><td><code>EDH-RSA-DES-CBC-SHA</code></td> <td>SSLv3</td> <td>DH</td> <td>RSA</td> <td>DES(56)</td> <td>SHA1</td> <td> </td> </tr>
357 <tr><td><code>EDH-DSS-DES-CBC-SHA</code></td> <td>SSLv3</td> <td>DH</td> <td>DSS</td> <td>DES(56)</td> <td>SHA1</td> <td> </td> </tr>
358 <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>
359 <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>
360 <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>
361 <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>
366 <hr/><h2><a name="SSLEngine">SSLEngine</a> <a name="sslengine">Directive</a></h2><table cellpadding="1" cellspacing="0" border="0" bgcolor="#cccccc"><tr><td><table bgcolor="#ffffff"><tr><td><strong>Description: </strong></td><td>SSL Engine Operation Switch</td></tr><tr><td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td>SSLEngine on|off</td></tr><tr><td><a href="directive-dict.html#Default" class="help">Default:</a></td><td><code>SSLEngine off</code></td></tr><tr><td><a href="directive-dict.html#Context" class="help">Context:</a></td><td>server config, virtual host</td></tr><tr><td><a href="directive-dict.html#Status" class="help">Status:</a></td><td>Extension</td></tr><tr><td><a href="directive-dict.html#Module" class="help">Module:</a></td><td>mod_ssl</td></tr></table></td></tr></table>
368 This directive toggles the usage of the SSL/TLS Protocol Engine. This
369 is usually used inside a <a href="core.html#virtualhost" class="directive"><code class="directive"><VirtualHost></code></a> section to enable SSL/TLS for a
370 particular virtual host. By default the SSL/TLS Protocol Engine is
371 disabled for both the main server and all configured virtual hosts.</p>
372 <blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><p align="center"><strong>Example</strong></p><code>
373 <VirtualHost _default_:443><br>
377 </code></td></tr></table></blockquote>
378 <hr/><h2><a name="SSLMutex">SSLMutex</a> <a name="sslmutex">Directive</a></h2><table cellpadding="1" cellspacing="0" border="0" bgcolor="#cccccc"><tr><td><table bgcolor="#ffffff"><tr><td><strong>Description: </strong></td><td>Semaphore for internal mutual exclusion of
379 operations</td></tr><tr><td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td>SSLMutex <em>type</em></td></tr><tr><td><a href="directive-dict.html#Default" class="help">Default:</a></td><td><code>SSLMutex none</code></td></tr><tr><td><a href="directive-dict.html#Context" class="help">Context:</a></td><td>server config</td></tr><tr><td><a href="directive-dict.html#Status" class="help">Status:</a></td><td>Extension</td></tr><tr><td><a href="directive-dict.html#Module" class="help">Module:</a></td><td>mod_ssl</td></tr></table></td></tr></table>
381 This configures the SSL engine's semaphore (aka. lock) which is used for mutual
382 exclusion of operations which have to be done in a synchronized way between the
383 pre-forked Apache server processes. This directive can only be used in the
384 global server context because it's only useful to have one global mutex.</p>
386 The following Mutex <em>types</em> are available:</p>
388 <li><code>none</code>
390 This is the default where no Mutex is used at all. Use it at your own
391 risk. But because currently the Mutex is mainly used for synchronizing
392 write access to the SSL Session Cache you can live without it as long
393 as you accept a sometimes garbled Session Cache. So it's not recommended
394 to leave this the default. Instead configure a real Mutex.</p></li>
395 <li><code>file:/path/to/mutex</code>
397 This is the portable and (under Unix) always provided Mutex variant where
398 a physical (lock-)file is used as the Mutex. Always use a local disk
399 filesystem for <code>/path/to/mutex</code> and never a file residing on a
400 NFS- or AFS-filesystem. Note: Internally, the Process ID (PID) of the
401 Apache parent process is automatically appended to
402 <code>/path/to/mutex</code> to make it unique, so you don't have to worry
403 about conflicts yourself. Notice that this type of mutex is not available
404 under the Win32 environment. There you <em>have</em> to use the semaphore
408 This is the most elegant but also most non-portable Mutex variant where a
409 SysV IPC Semaphore (under Unix) and a Windows Mutex (under Win32) is used
410 when possible. It is only available when the underlying platform
411 supports it.</p></li>
413 <blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><p align="center"><strong>Example</strong></p><code>
414 SSLMutex file:/usr/local/apache/logs/ssl_mutex
415 </code></td></tr></table></blockquote>
416 <hr/><h2><a name="SSLOptions">SSLOptions</a> <a name="ssloptions">Directive</a></h2><table cellpadding="1" cellspacing="0" border="0" bgcolor="#cccccc"><tr><td><table bgcolor="#ffffff"><tr><td><strong>Description: </strong></td><td>Configure various SSL engine run-time options</td></tr><tr><td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td>SSLOptions [+|-]<em>option</em> ...</td></tr><tr><td><a href="directive-dict.html#Context" class="help">Context:</a></td><td>server config, virtual host, directory, .htaccess</td></tr><tr><td><a href="directive-dict.html#Override" class="help">Override:</a></td><td>Options</td></tr><tr><td><a href="directive-dict.html#Status" class="help">Status:</a></td><td>Extension</td></tr><tr><td><a href="directive-dict.html#Module" class="help">Module:</a></td><td>mod_ssl</td></tr></table></td></tr></table>
418 This directive can be used to control various run-time options on a
419 per-directory basis. Normally, if multiple <code>SSLOptions</code>
420 could apply to a directory, then the most specific one is taken
421 completely; the options are not merged. However if <em>all</em> the
422 options on the <code>SSLOptions</code> directive are preceded by a
423 plus (<code>+</code>) or minus (<code>-</code>) symbol, the options
424 are merged. Any options preceded by a <code>+</code> are added to the
425 options currently in force, and any options preceded by a
426 <code>-</code> are removed from the options currently in force.</p>
428 The available <em>option</em>s are:</p>
430 <li><code>StdEnvVars</code>
432 When this option is enabled, the standard set of SSL related CGI/SSI
433 environment variables are created. This per default is disabled for
434 performance reasons, because the information extraction step is a
435 rather expensive operation. So one usually enables this option for
436 CGI and SSI requests only.</p>
438 <li><code>CompatEnvVars</code>
440 When this option is enabled, additional CGI/SSI environment variables are
441 created for backward compatibility to other Apache SSL solutions. Look in
442 the <a href="../ssl/ssl_compat.html">Compatibility</a> chapter for details
443 on the particular variables generated.</p>
445 <li><code>ExportCertData</code>
447 When this option is enabled, additional CGI/SSI environment variables are
448 created: <code>SSL_SERVER_CERT</code>, <code>SSL_CLIENT_CERT</code> and
449 <code>SSL_CLIENT_CERT_CHAIN</code><em>n</em> (with <em>n</em> = 0,1,2,..).
450 These contain the PEM-encoded X.509 Certificates of server and client for
451 the current HTTPS connection and can be used by CGI scripts for deeper
452 Certificate checking. Additionally all other certificates of the client
453 certificate chain are provided, too. This bloats up the environment a
454 little bit which is why you have to use this option to enable it on
457 <li><code>FakeBasicAuth</code>
459 When this option is enabled, the Subject Distinguished Name (DN) of the
460 Client X509 Certificate is translated into a HTTP Basic Authorization
461 username. This means that the standard Apache authentication methods can
462 be used for access control. The user name is just the Subject of the
463 Client's X509 Certificate (can be determined by running OpenSSL's
464 <code>openssl x509</code> command: <code>openssl x509 -noout -subject -in
465 </code><em>certificate</em><code>.crt</code>). Note that no password is
466 obtained from the user. Every entry in the user file needs this password:
467 ``<code>xxj31ZMTZzkVA</code>'', which is the DES-encrypted version of the
468 word `<code>password</code>''. Those who live under MD5-based encryption
469 (for instance under FreeBSD or BSD/OS, etc.) should use the following MD5
470 hash of the same word: ``<code>$1$OXLyS...$Owx8s2/m9/gfkcRVXzgoE/</code>''.</p>
472 <li><code>StrictRequire</code>
474 This <em>forces</em> forbidden access when <code>SSLRequireSSL</code> or
475 <code>SSLRequire</code> successfully decided that access should be
476 forbidden. Usually the default is that in the case where a ``<code>Satisfy
477 any</code>'' directive is used, and other access restrictions are passed,
478 denial of access due to <code>SSLRequireSSL</code> or
479 <code>SSLRequire</code> is overridden (because that's how the Apache
480 <code>Satisfy</code> mechanism should work.) But for strict access restriction
481 you can use <code>SSLRequireSSL</code> and/or <code>SSLRequire</code> in
482 combination with an ``<code>SSLOptions +StrictRequire</code>''. Then an
483 additional ``<code>Satisfy Any</code>'' has no chance once mod_ssl has
484 decided to deny access.</p>
486 <li><code>OptRenegotiate</code>
488 This enables optimized SSL connection renegotiation handling when SSL
489 directives are used in per-directory context. By default a strict
490 scheme is enabled where <em>every</em> per-directory reconfiguration of
491 SSL parameters causes a <em>full</em> SSL renegotiation handshake. When this
492 option is used mod_ssl tries to avoid unnecessary handshakes by doing more
493 granular (but still safe) parameter checks. Nevertheless these granular
494 checks sometimes maybe not what the user expects, so enable this on a
495 per-directory basis only, please.</p>
498 <blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><p align="center"><strong>Example</strong></p><code>
499 SSLOptions +FakeBasicAuth -StrictRequire<br>
500 <Files ~ "\.(cgi|shtml)$"><br>
501 SSLOptions +StdEnvVars +CompatEnvVars -ExportCertData<br>
503 </code></td></tr></table></blockquote>
504 <hr/><h2><a name="SSLPassPhraseDialog">SSLPassPhraseDialog</a> <a name="sslpassphrasedialog">Directive</a></h2><table cellpadding="1" cellspacing="0" border="0" bgcolor="#cccccc"><tr><td><table bgcolor="#ffffff"><tr><td><strong>Description: </strong></td><td>Type of pass phrase dialog for encrypted private
505 keys</td></tr><tr><td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td>SSLPassPhraseDialog <em>type</em></td></tr><tr><td><a href="directive-dict.html#Default" class="help">Default:</a></td><td><code>SSLPassPhraseDialog builtin</code></td></tr><tr><td><a href="directive-dict.html#Context" class="help">Context:</a></td><td>server config</td></tr><tr><td><a href="directive-dict.html#Status" class="help">Status:</a></td><td>Extension</td></tr><tr><td><a href="directive-dict.html#Module" class="help">Module:</a></td><td>mod_ssl</td></tr></table></td></tr></table>
507 When Apache starts up it has to read the various Certificate (see
508 <a href="#sslcertificatefile" class="directive"><code class="directive">SSLCertificateFile</code></a>) and
509 Private Key (see <a href="#sslcertificatekeyfile" class="directive"><code class="directive">SSLCertificateKeyFile</code></a>) files of the
510 SSL-enabled virtual servers. Because for security reasons the Private
511 Key files are usually encrypted, mod_ssl needs to query the
512 administrator for a Pass Phrase in order to decrypt those files. This
513 query can be done in two ways which can be configured by
516 <li><code>builtin</code>
518 This is the default where an interactive terminal dialog occurs at startup
519 time just before Apache detaches from the terminal. Here the administrator
520 has to manually enter the Pass Phrase for each encrypted Private Key file.
521 Because a lot of SSL-enabled virtual hosts can be configured, the
522 following reuse-scheme is used to minimize the dialog: When a Private Key
523 file is encrypted, all known Pass Phrases (at the beginning there are
524 none, of course) are tried. If one of those known Pass Phrases succeeds no
525 dialog pops up for this particular Private Key file. If none succeeded,
526 another Pass Phrase is queried on the terminal and remembered for the next
527 round (where it perhaps can be reused).</p>
529 This scheme allows mod_ssl to be maximally flexible (because for N encrypted
530 Private Key files you <em>can</em> use N different Pass Phrases - but then
531 you have to enter all of them, of course) while minimizing the terminal
532 dialog (i.e. when you use a single Pass Phrase for all N Private Key files
533 this Pass Phrase is queried only once).</p></li>
535 <li><code>exec:/path/to/program</code>
537 Here an external program is configured which is called at startup for each
538 encrypted Private Key file. It is called with two arguments (the first is
539 of the form ``<code>servername:portnumber</code>'', the second is either
540 ``<code>RSA</code>'' or ``<code>DSA</code>''), which indicate for which
541 server and algorithm it has to print the corresponding Pass Phrase to
542 <code>stdout</code>. The intent is that this external program first runs
543 security checks to make sure that the system is not compromised by an
544 attacker, and only when these checks were passed successfully it provides
547 Both these security checks, and the way the Pass Phrase is determined, can
548 be as complex as you like. Mod_ssl just defines the interface: an
549 executable program which provides the Pass Phrase on <code>stdout</code>.
550 Nothing more or less! So, if you're really paranoid about security, here
551 is your interface. Anything else has to be left as an exercise to the
552 administrator, because local security requirements are so different.</p>
554 The reuse-algorithm above is used here, too. In other words: The external
555 program is called only once per unique Pass Phrase.</p></li>
559 <blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><code>
560 SSLPassPhraseDialog exec:/usr/local/apache/sbin/pp-filter
561 </code></td></tr></table></blockquote>
562 <hr/><h2><a name="SSLProtocol">SSLProtocol</a> <a name="sslprotocol">Directive</a></h2><table cellpadding="1" cellspacing="0" border="0" bgcolor="#cccccc"><tr><td><table bgcolor="#ffffff"><tr><td><strong>Description: </strong></td><td>Configure usable SSL protocol flavors</td></tr><tr><td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td>SSLProtocol [+|-]<em>protocol</em> ...</td></tr><tr><td><a href="directive-dict.html#Default" class="help">Default:</a></td><td><code>SSLProtocol all</code></td></tr><tr><td><a href="directive-dict.html#Context" class="help">Context:</a></td><td>server config, virtual host</td></tr><tr><td><a href="directive-dict.html#Override" class="help">Override:</a></td><td>Options</td></tr><tr><td><a href="directive-dict.html#Status" class="help">Status:</a></td><td>Extension</td></tr><tr><td><a href="directive-dict.html#Module" class="help">Module:</a></td><td>mod_ssl</td></tr></table></td></tr></table>
564 This directive can be used to control the SSL protocol flavors mod_ssl should
565 use when establishing its server environment. Clients then can only connect
566 with one of the provided protocols.</p>
568 The available (case-insensitive) <em>protocol</em>s are:</p>
570 <li><code>SSLv2</code>
572 This is the Secure Sockets Layer (SSL) protocol, version 2.0. It is the
573 original SSL protocol as designed by Netscape Corporation.</p></li>
575 <li><code>SSLv3</code>
577 This is the Secure Sockets Layer (SSL) protocol, version 3.0. It is the
578 successor to SSLv2 and the currently (as of February 1999) de-facto
579 standardized SSL protocol from Netscape Corporation. It's supported by
580 almost all popular browsers.</p></li>
582 <li><code>TLSv1</code>
584 This is the Transport Layer Security (TLS) protocol, version 1.0. It is the
585 successor to SSLv3 and currently (as of February 1999) still under
586 construction by the Internet Engineering Task Force (IETF). It's still
587 not supported by any popular browsers.</p></li>
591 This is a shortcut for ``<code>+SSLv2 +SSLv3 +TLSv1</code>'' and a
592 convinient way for enabling all protocols except one when used in
593 combination with the minus sign on a protocol as the example above
596 <blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><p align="center"><strong>Example</strong></p><code>
597 # enable SSLv3 and TLSv1, but not SSLv2<br>
598 SSLProtocol all -SSLv2
599 </code></td></tr></table></blockquote>
600 <hr/><h2><a name="SSLRandomSeed">SSLRandomSeed</a> <a name="sslrandomseed">Directive</a></h2><table cellpadding="1" cellspacing="0" border="0" bgcolor="#cccccc"><tr><td><table bgcolor="#ffffff"><tr><td><strong>Description: </strong></td><td>Pseudo Random Number Generator (PRNG) seeding
601 source</td></tr><tr><td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td>SSLRandomSeed <em>context</em> <em>source</em>
602 [<em>bytes</em>]</td></tr><tr><td><a href="directive-dict.html#Context" class="help">Context:</a></td><td>server config</td></tr><tr><td><a href="directive-dict.html#Status" class="help">Status:</a></td><td>Extension</td></tr><tr><td><a href="directive-dict.html#Module" class="help">Module:</a></td><td>mod_ssl</td></tr></table></td></tr></table>
604 This configures one or more sources for seeding the Pseudo Random Number
605 Generator (PRNG) in OpenSSL at startup time (<em>context</em> is
606 <code>startup</code>) and/or just before a new SSL connection is established
607 (<em>context</em> is <code>connect</code>). This directive can only be used
608 in the global server context because the PRNG is a global facility.</p>
610 The following <em>source</em> variants are available:</p>
612 <li><code>builtin</code>
613 <p> This is the always available builtin seeding source. It's usage
614 consumes minimum CPU cycles under runtime and hence can be always used
615 without drawbacks. The source used for seeding the PRNG contains of the
616 current time, the current process id and (when applicable) a randomly
617 choosen 1KB extract of the inter-process scoreboard structure of Apache.
618 The drawback is that this is not really a strong source and at startup
619 time (where the scoreboard is still not available) this source just
620 produces a few bytes of entropy. So you should always, at least for the
621 startup, use an additional seeding source.</p></li>
622 <li><code>file:/path/to/source</code>
624 This variant uses an external file <code>/path/to/source</code> as the
625 source for seeding the PRNG. When <em>bytes</em> is specified, only the
626 first <em>bytes</em> number of bytes of the file form the entropy (and
627 <em>bytes</em> is given to <code>/path/to/source</code> as the first
628 argument). When <em>bytes</em> is not specified the whole file forms the
629 entropy (and <code>0</code> is given to <code>/path/to/source</code> as
630 the first argument). Use this especially at startup time, for instance
631 with an available <code>/dev/random</code> and/or
632 <code>/dev/urandom</code> devices (which usually exist on modern Unix
633 derivates like FreeBSD and Linux).</p>
635 <em>But be careful</em>: Usually <code>/dev/random</code> provides only as
636 much entropy data as it actually has, i.e. when you request 512 bytes of
637 entropy, but the device currently has only 100 bytes available two things
638 can happen: On some platforms you receive only the 100 bytes while on
639 other platforms the read blocks until enough bytes are available (which
640 can take a long time). Here using an existing <code>/dev/urandom</code> is
641 better, because it never blocks and actually gives the amount of requested
642 data. The drawback is just that the quality of the received data may not
645 On some platforms like FreeBSD one can even control how the entropy is
646 actually generated, i.e. by which system interrupts. More details one can
647 find under <em>rndcontrol(8)</em> on those platforms. Alternatively, when
648 your system lacks such a random device, you can use tool
649 like <a href="http://www.lothar.com/tech/crypto/">EGD</a>
650 (Entropy Gathering Daemon) and run it's client program with the
651 <code>exec:/path/to/program/</code> variant (see below) or use
652 <code>egd:/path/to/egd-socket</code> (see below).</p></li>
654 <li><code>exec:/path/to/program</code>
656 This variant uses an external executable
657 <code>/path/to/program</code> as the source for seeding the
658 PRNG. When <em>bytes</em> is specified, only the first
659 <em>bytes</em> number of bytes of its <code>stdout</code> contents
660 form the entropy. When <em>bytes</em> is not specified, the
661 entirety of the data produced on <code>stdout</code> form the
662 entropy. Use this only at startup time when you need a very strong
663 seeding with the help of an external program (for instance as in
664 the example above with the <code>truerand</code> utility you can
665 find in the mod_ssl distribution which is based on the AT&T
666 <em>truerand</em> library). Using this in the connection context
667 slows down the server too dramatically, of course. So usually you
668 should avoid using external programs in that context.</p></li>
669 <li><code>egd:/path/to/egd-socket</code> (Unix only)
671 This variant uses the Unix domain socket of the
672 external Entropy Gathering Daemon (EGD) (see <a href="http://www.lothar.com/tech/crypto/">http://www.lothar.com/tech
673 /crypto/</a>) to seed the PRNG. Use this if no random device exists
674 on your platform.</p></li>
676 <blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><p align="center"><strong>Example</strong></p><code>
677 SSLRandomSeed startup builtin<br>
678 SSLRandomSeed startup file:/dev/random<br>
679 SSLRandomSeed startup file:/dev/urandom 1024<br>
680 SSLRandomSeed startup exec:/usr/local/bin/truerand 16<br>
681 SSLRandomSeed connect builtin<br>
682 SSLRandomSeed connect file:/dev/random<br>
683 SSLRandomSeed connect file:/dev/urandom 1024<br>
684 </code></td></tr></table></blockquote>
685 <hr/><h2><a name="SSLRequire">SSLRequire</a> <a name="sslrequire">Directive</a></h2><table cellpadding="1" cellspacing="0" border="0" bgcolor="#cccccc"><tr><td><table bgcolor="#ffffff"><tr><td><strong>Description: </strong></td><td>Allow access only when an arbitrarily complex
686 boolean expression is true</td></tr><tr><td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td>SSLRequire <em>expression</em></td></tr><tr><td><a href="directive-dict.html#Context" class="help">Context:</a></td><td>directory, .htaccess</td></tr><tr><td><a href="directive-dict.html#Override" class="help">Override:</a></td><td>AuthConfig</td></tr><tr><td><a href="directive-dict.html#Status" class="help">Status:</a></td><td>Extension</td></tr><tr><td><a href="directive-dict.html#Module" class="help">Module:</a></td><td>mod_ssl</td></tr></table></td></tr></table>
688 This directive specifies a general access requirement which has to be
689 fulfilled in order to allow access. It's a very powerful directive because the
690 requirement specification is an arbitrarily complex boolean expression
691 containing any number of access checks.</p>
693 The <em>expression</em> must match the following syntax (given as a BNF
694 grammar notation):</p>
697 expr ::= "<strong>true</strong>" | "<strong>false</strong>"
698 | "<strong>!</strong>" expr
699 | expr "<strong>&&</strong>" expr
700 | expr "<strong>||</strong>" expr
701 | "<strong>(</strong>" expr "<strong>)</strong>"
704 comp ::= word "<strong>==</strong>" word | word "<strong>eq</strong>" word
705 | word "<strong>!=</strong>" word | word "<strong>ne</strong>" word
706 | word "<strong><</strong>" word | word "<strong>lt</strong>" word
707 | word "<strong><=</strong>" word | word "<strong>le</strong>" word
708 | word "<strong>></strong>" word | word "<strong>gt</strong>" word
709 | word "<strong>>=</strong>" word | word "<strong>ge</strong>" word
710 | word "<strong>in</strong>" "<strong>{</strong>" wordlist "<strong>}</strong>"
711 | word "<strong>=~</strong>" regex
712 | word "<strong>!~</strong>" regex
715 | wordlist "<strong>,</strong>" word
724 variable ::= "<strong>%{</strong>" varname "<strong>}</strong>"
725 function ::= funcname "<strong>(</strong>" funcargs "<strong>)</strong>"
728 <p>while for <code>varname</code> any variable from <a href="#table3">Table 3</a> can be used. Finally for
729 <code>funcname</code> the following functions are available:</p>
731 <li><code>file(</code><em>filename</em><code>)</code>
733 This function takes one string argument and expands to the contents of the
734 file. This is especially useful for matching this contents against a
735 regular expression, etc.</p>
738 <p>Notice that <em>expression</em> is first parsed into an internal machine
739 representation and then evaluated in a second step. Actually, in Global and
740 Per-Server Class context <em>expression</em> is parsed at startup time and
741 at runtime only the machine representation is executed. For Per-Directory
742 context this is different: here <em>expression</em> has to be parsed and
743 immediately executed for every request.</p>
744 <blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><p align="center"><strong>Example</strong></p><code>
745 SSLRequire ( %{SSL_CIPHER} !~ m/^(EXP|NULL)-/ \<br>
746 and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \<br>
747 and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} \<br>
748 and %{TIME_WDAY} >= 1 and %{TIME_WDAY} <= 5 \<br>
749 and %{TIME_HOUR} >= 8 and %{TIME_HOUR} <= 20 ) \<br>
750 or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/
751 </code></td></tr></table></blockquote>
752 <table width="600" cellspacing="0" cellpadding="1" border="0" summary="">
754 <tr><td bgcolor="#cccccc">
755 <table width="598" cellpadding="5" cellspacing="0" border="0" summary="">
756 <tr><td bgcolor="#ffffff">
757 <table summary=""><tr><td>
758 <em>Standard CGI/1.0 and Apache variables:</em>
760 HTTP_USER_AGENT PATH_INFO AUTH_TYPE
761 HTTP_REFERER QUERY_STRING SERVER_SOFTWARE
762 HTTP_COOKIE REMOTE_HOST API_VERSION
763 HTTP_FORWARDED REMOTE_IDENT TIME_YEAR
764 HTTP_HOST IS_SUBREQ TIME_MON
765 HTTP_PROXY_CONNECTION DOCUMENT_ROOT TIME_DAY
766 HTTP_ACCEPT SERVER_ADMIN TIME_HOUR
767 HTTP:headername SERVER_NAME TIME_MIN
768 THE_REQUEST SERVER_PORT TIME_SEC
769 REQUEST_METHOD SERVER_PROTOCOL TIME_WDAY
770 REQUEST_SCHEME REMOTE_ADDR TIME
771 REQUEST_URI REMOTE_USER ENV:<strong>variablename</strong>
774 <em>SSL-related variables:</em>
776 HTTPS SSL_CLIENT_M_VERSION SSL_SERVER_M_VERSION
777 SSL_CLIENT_M_SERIAL SSL_SERVER_M_SERIAL
778 SSL_PROTOCOL SSL_CLIENT_V_START SSL_SERVER_V_START
779 SSL_SESSION_ID SSL_CLIENT_V_END SSL_SERVER_V_END
780 SSL_CIPHER SSL_CLIENT_S_DN SSL_SERVER_S_DN
781 SSL_CIPHER_EXPORT SSL_CLIENT_S_DN_C SSL_SERVER_S_DN_C
782 SSL_CIPHER_ALGKEYSIZE SSL_CLIENT_S_DN_ST SSL_SERVER_S_DN_ST
783 SSL_CIPHER_USEKEYSIZE SSL_CLIENT_S_DN_L SSL_SERVER_S_DN_L
784 SSL_VERSION_LIBRARY SSL_CLIENT_S_DN_O SSL_SERVER_S_DN_O
785 SSL_VERSION_INTERFACE SSL_CLIENT_S_DN_OU SSL_SERVER_S_DN_OU
786 SSL_CLIENT_S_DN_CN SSL_SERVER_S_DN_CN
787 SSL_CLIENT_S_DN_T SSL_SERVER_S_DN_T
788 SSL_CLIENT_S_DN_I SSL_SERVER_S_DN_I
789 SSL_CLIENT_S_DN_G SSL_SERVER_S_DN_G
790 SSL_CLIENT_S_DN_S SSL_SERVER_S_DN_S
791 SSL_CLIENT_S_DN_D SSL_SERVER_S_DN_D
792 SSL_CLIENT_S_DN_UID SSL_SERVER_S_DN_UID
793 SSL_CLIENT_S_DN_Email SSL_SERVER_S_DN_Email
794 SSL_CLIENT_I_DN SSL_SERVER_I_DN
795 SSL_CLIENT_I_DN_C SSL_SERVER_I_DN_C
796 SSL_CLIENT_I_DN_ST SSL_SERVER_I_DN_ST
797 SSL_CLIENT_I_DN_L SSL_SERVER_I_DN_L
798 SSL_CLIENT_I_DN_O SSL_SERVER_I_DN_O
799 SSL_CLIENT_I_DN_OU SSL_SERVER_I_DN_OU
800 SSL_CLIENT_I_DN_CN SSL_SERVER_I_DN_CN
801 SSL_CLIENT_I_DN_T SSL_SERVER_I_DN_T
802 SSL_CLIENT_I_DN_I SSL_SERVER_I_DN_I
803 SSL_CLIENT_I_DN_G SSL_SERVER_I_DN_G
804 SSL_CLIENT_I_DN_S SSL_SERVER_I_DN_S
805 SSL_CLIENT_I_DN_D SSL_SERVER_I_DN_D
806 SSL_CLIENT_I_DN_UID SSL_SERVER_I_DN_UID
807 SSL_CLIENT_I_DN_Email SSL_SERVER_I_DN_Email
808 SSL_CLIENT_A_SIG SSL_SERVER_A_SIG
809 SSL_CLIENT_A_KEY SSL_SERVER_A_KEY
810 SSL_CLIENT_CERT SSL_SERVER_CERT
811 SSL_CLIENT_CERT_CHAIN<strong>n</strong>
818 <hr/><h2><a name="SSLRequireSSL">SSLRequireSSL</a> <a name="sslrequiressl">Directive</a></h2><table cellpadding="1" cellspacing="0" border="0" bgcolor="#cccccc"><tr><td><table bgcolor="#ffffff"><tr><td><strong>Description: </strong></td><td>Deny access when SSL is not used for the
819 HTTP request</td></tr><tr><td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td>SSLRequireSSL</td></tr><tr><td><a href="directive-dict.html#Context" class="help">Context:</a></td><td>directory, .htaccess</td></tr><tr><td><a href="directive-dict.html#Override" class="help">Override:</a></td><td>AuthConfig</td></tr><tr><td><a href="directive-dict.html#Status" class="help">Status:</a></td><td>Extension</td></tr><tr><td><a href="directive-dict.html#Module" class="help">Module:</a></td><td>mod_ssl</td></tr></table></td></tr></table>
821 This directive forbids access unless HTTP over SSL (i.e. HTTPS) is enabled for
822 the current connection. This is very handy inside the SSL-enabled virtual
823 host or directories for defending against configuration errors that expose
824 stuff that should be protected. When this directive is present all requests
825 are denied which are not using SSL.</p>
826 <blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><p align="center"><strong>Example</strong></p><code>
828 </code></td></tr></table></blockquote>
829 <hr/><h2><a name="SSLSessionCache">SSLSessionCache</a> <a name="sslsessioncache">Directive</a></h2><table cellpadding="1" cellspacing="0" border="0" bgcolor="#cccccc"><tr><td><table bgcolor="#ffffff"><tr><td><strong>Description: </strong></td><td>Type of the global/inter-process SSL Session
830 Cache</td></tr><tr><td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td>SSLSessionCache <em>type</em></td></tr><tr><td><a href="directive-dict.html#Default" class="help">Default:</a></td><td><code>SSLSessionCache none</code></td></tr><tr><td><a href="directive-dict.html#Context" class="help">Context:</a></td><td>server config</td></tr><tr><td><a href="directive-dict.html#Status" class="help">Status:</a></td><td>Extension</td></tr><tr><td><a href="directive-dict.html#Module" class="help">Module:</a></td><td>mod_ssl</td></tr></table></td></tr></table>
832 This configures the storage type of the global/inter-process SSL Session
833 Cache. This cache is an optional facility which speeds up parallel request
834 processing. For requests to the same server process (via HTTP keep-alive),
835 OpenSSL already caches the SSL session information locally. But because modern
836 clients request inlined images and other data via parallel requests (usually
837 up to four parallel requests are common) those requests are served by
838 <em>different</em> pre-forked server processes. Here an inter-process cache
839 helps to avoid unneccessary session handshakes.</p>
841 The following two storage <em>type</em>s are currently supported:</p>
843 <li><code>none</code>
845 This is the default and just disables the global/inter-process Session
846 Cache. There is no drawback in functionality, but a noticeable speed
847 penalty can be observed.</p></li>
848 <li><code>dbm:/path/to/datafile</code>
850 This makes use of a DBM hashfile on the local disk to synchronize the
851 local OpenSSL memory caches of the server processes. The slight increase
852 in I/O on the server results in a visible request speedup for your
853 clients, so this type of storage is generally recommended.</p></li>
854 <li><code>shm:/path/to/datafile</code>[<code>(</code><em>size</em><code>)</code>]
856 This makes use of a high-performance hash table (approx. <em>size</em> bytes
857 in size) inside a shared memory segment in RAM (established via
858 <code>/path/to/datafile</code>) to synchronize the local OpenSSL memory
859 caches of the server processes. This storage type is not available on all
860 platforms. See the mod_ssl <code>INSTALL</code> document for details on
861 how to build Apache+EAPI with shared memory support.</p></li>
863 <blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><p align="center"><strong>Examples</strong></p><code>
864 SSLSessionCache dbm:/usr/local/apache/logs/ssl_gcache_data<br>
865 SSLSessionCache shm:/usr/local/apache/logs/ssl_gcache_data(512000)
866 </code></td></tr></table></blockquote>
867 <hr/><h2><a name="SSLSessionCacheTimeout">SSLSessionCacheTimeout</a> <a name="sslsessioncachetimeout">Directive</a></h2><table cellpadding="1" cellspacing="0" border="0" bgcolor="#cccccc"><tr><td><table bgcolor="#ffffff"><tr><td><strong>Description: </strong></td><td>Number of seconds before an SSL session expires
868 in the Session Cache</td></tr><tr><td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td>SSLSessionCacheTimeout <em>seconds</em></td></tr><tr><td><a href="directive-dict.html#Default" class="help">Default:</a></td><td><code>SSLSessionCacheTimeout 300</code></td></tr><tr><td><a href="directive-dict.html#Context" class="help">Context:</a></td><td>server config, virtual host</td></tr><tr><td><a href="directive-dict.html#Status" class="help">Status:</a></td><td>Extension</td></tr><tr><td><a href="directive-dict.html#Module" class="help">Module:</a></td><td>mod_ssl</td></tr></table></td></tr></table>
870 This directive sets the timeout in seconds for the information stored in the
871 global/inter-process SSL Session Cache and the OpenSSL internal memory cache.
872 It can be set as low as 15 for testing, but should be set to higher
873 values like 300 in real life.</p>
874 <blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><p align="center"><strong>Example</strong></p><code>
875 SSLSessionCacheTimeout 600
876 </code></td></tr></table></blockquote>
877 <hr/><h2><a name="SSLVerifyClient">SSLVerifyClient</a> <a name="sslverifyclient">Directive</a></h2><table cellpadding="1" cellspacing="0" border="0" bgcolor="#cccccc"><tr><td><table bgcolor="#ffffff"><tr><td><strong>Description: </strong></td><td>Type of Client Certificate verification</td></tr><tr><td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td>SSLVerifyClient <em>level</em></td></tr><tr><td><a href="directive-dict.html#Default" class="help">Default:</a></td><td><code>SSLVerifyClient none</code></td></tr><tr><td><a href="directive-dict.html#Context" class="help">Context:</a></td><td>server config, virtual host, directory, .htaccess</td></tr><tr><td><a href="directive-dict.html#Override" class="help">Override:</a></td><td>AuthConfig</td></tr><tr><td><a href="directive-dict.html#Status" class="help">Status:</a></td><td>Extension</td></tr><tr><td><a href="directive-dict.html#Module" class="help">Module:</a></td><td>mod_ssl</td></tr></table></td></tr></table>
879 This directive sets the Certificate verification level for the Client
880 Authentication. Notice that this directive can be used both in per-server and
881 per-directory context. In per-server context it applies to the client
882 authentication process used in the standard SSL handshake when a connection is
883 established. In per-directory context it forces a SSL renegotation with the
884 reconfigured client verification level after the HTTP request was read but
885 before the HTTP response is sent.</p>
887 The following levels are available for <em>level</em>:</p>
889 <li><strong>none</strong>:
890 no client Certificate is required at all</li>
891 <li><strong>optional</strong>:
892 the client <em>may</em> present a valid Certificate</li>
893 <li><strong>require</strong>:
894 the client <em>has to</em> present a valid Certificate</li>
895 <li><strong>optional_no_ca</strong>:
896 the client may present a valid Certificate<br>
897 but it need not to be (successfully) verifiable.</li>
899 <p>In practice only levels <strong>none</strong> and
900 <strong>require</strong> are really interesting, because level
901 <strong>optional</strong> doesn't work with all browsers and level
902 <strong>optional_no_ca</strong> is actually against the idea of
903 authentication (but can be used to establish SSL test pages, etc.)</p>
904 <blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><p align="center"><strong>Example</strong></p><code>
905 SSLVerifyClient require
906 </code></td></tr></table></blockquote>
907 <hr/><h2><a name="SSLVerifyDepth">SSLVerifyDepth</a> <a name="sslverifydepth">Directive</a></h2><table cellpadding="1" cellspacing="0" border="0" bgcolor="#cccccc"><tr><td><table bgcolor="#ffffff"><tr><td><strong>Description: </strong></td><td>Maximum depth of CA Certificates in Client
908 Certificate verification</td></tr><tr><td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td>SSLVerifyDepth <em>number</em></td></tr><tr><td><a href="directive-dict.html#Default" class="help">Default:</a></td><td><code>SSLVerifyDepth 1</code></td></tr><tr><td><a href="directive-dict.html#Context" class="help">Context:</a></td><td>server config, virtual host, directory, .htaccess</td></tr><tr><td><a href="directive-dict.html#Override" class="help">Override:</a></td><td>AuthConfig</td></tr><tr><td><a href="directive-dict.html#Status" class="help">Status:</a></td><td>Extension</td></tr><tr><td><a href="directive-dict.html#Module" class="help">Module:</a></td><td>mod_ssl</td></tr></table></td></tr></table>
910 This directive sets how deeply mod_ssl should verify before deciding that the
911 clients don't have a valid certificate. Notice that this directive can be
912 used both in per-server and per-directory context. In per-server context it
913 applies to the client authentication process used in the standard SSL
914 handshake when a connection is established. In per-directory context it forces
915 a SSL renegotation with the reconfigured client verification depth after the
916 HTTP request was read but before the HTTP response is sent.</p>
918 The depth actually is the maximum number of intermediate certificate issuers,
919 i.e. the number of CA certificates which are max allowed to be followed while
920 verifying the client certificate. A depth of 0 means that self-signed client
921 certificates are accepted only, the default depth of 1 means the client
922 certificate can be self-signed or has to be signed by a CA which is directly
923 known to the server (i.e. the CA's certificate is under
924 <a href="#sslcacertificatepath" class="directive"><code class="directive">SSLCACertificatePath</code></a>), etc.</p>
925 <blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><p align="center"><strong>Example</strong></p><code>
927 </code></td></tr></table></blockquote>
928 <hr/></blockquote><h3 align="center">Apache HTTP Server Version 2.0</h3><a href="./"><img src="../images/index.gif" alt="Index"/></a><a href="../"><img src="../images/home.gif" alt="Home"/></a></body></html>