home *** CD-ROM | disk | FTP | other *** search
/ Cricao de Sites - 650 Layouts Prontos / WebMasters.iso / Servidores / apache_2.2.8-win32-x86-no_ssl.msi / Data1.cab / _D2CCFE0EEAC1654047486C9D6439F32B < prev    next >
Extensible Markup Language  |  2007-09-01  |  112KB  |  1,722 lines

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