📄 ssl_reference.wml
字号:
the <em>cipher-spec</em>. Available prefixes are:<ul><li>none: add cipher to list<li><code>+</code>: add ciphers to list and pull them to current location in list<li><code>-</code>: remove cipher from list (can be added later again)<li><code>!</code>: kill cipher from list completely (can <b>not</b> be added later again)</ul>A simpler way to look at all of this is to use the ``<code>openssl ciphers-v</code>'' command which provides a nice way to successively create thecorrect <em>cipher-spec</em> string. The default <em>cipher-spec</em> stringis ``<code>ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP</code>'' whichmeans the following: first, remove from consideration any ciphers that do notauthenticate, i.e. for SSL only the Anonymous Diffie-Hellman ciphers. Next,use ciphers using RC4 and RSA. Next include the high, medium and then the lowsecurity ciphers. Finally <em>pull</em> all SSLv2 and export ciphers to theend of the list.<blockquote><pre>$ openssl ciphers -v 'ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP'NULL-SHA SSLv3 Kx=RSA Au=RSA Enc=None Mac=SHA1NULL-MD5 SSLv3 Kx=RSA Au=RSA Enc=None Mac=MD5 EDH-RSA-DES-CBC3-SHA SSLv3 Kx=DH Au=RSA Enc=3DES(168) Mac=SHA1... ... ... ... ...EXP-RC4-MD5 SSLv3 Kx=RSA(512) Au=RSA Enc=RC4(40) Mac=MD5 exportEXP-RC2-CBC-MD5 SSLv2 Kx=RSA(512) Au=RSA Enc=RC2(40) Mac=MD5 exportEXP-RC4-MD5 SSLv2 Kx=RSA(512) Au=RSA Enc=RC4(40) Mac=MD5 export</pre></blockquote>The complete list of particular RSA & DH ciphers for SSL is given in <ahref="#table2">Table 2</a>.<p>Example:<blockquote><pre># allow only strongest RSA ciphersSSLCipherSuite RSA:!EXP:!NULL:+HIGH:+MEDIUM:-LOW</pre></blockquote><p><float name="table2" caption="Table 2: Particular SSL Ciphers"><table border="0" cellspacing="0" cellpadding="2" width=598><tr id=D><td><b>Cipher-Tag</b></td> <td><b>Protocol</b></td> <td><b>Key Ex.</b></td> <td><b>Auth.</b></td> <td><b>Enc.</b></td> <td><b>MAC</b></td> <td><b>Type</b></td> </tr><tr id=H><td colspan=7><em>RSA Ciphers:</em></td></tr><tr id=D><td><code>DES-CBC3-SHA</code></td> <td>SSLv3</td> <td>RSA</td> <td>RSA</td> <td>3DES(168)</td> <td>SHA1</td> <td> </td> </tr><tr id=H><td><code>DES-CBC3-MD5</code></td> <td>SSLv2</td> <td>RSA</td> <td>RSA</td> <td>3DES(168)</td> <td>MD5</td> <td> </td> </tr><tr id=D><td><code>IDEA-CBC-SHA</code></td> <td>SSLv3</td> <td>RSA</td> <td>RSA</td> <td>IDEA(128)</td> <td>SHA1</td> <td> </td> </tr><tr id=H><td><code>RC4-SHA</code></td> <td>SSLv3</td> <td>RSA</td> <td>RSA</td> <td>RC4(128)</td> <td>SHA1</td> <td> </td> </tr><tr id=D><td><code>RC4-MD5</code></td> <td>SSLv3</td> <td>RSA</td> <td>RSA</td> <td>RC4(128)</td> <td>MD5</td> <td> </td> </tr><tr id=H><td><code>IDEA-CBC-MD5</code></td> <td>SSLv2</td> <td>RSA</td> <td>RSA</td> <td>IDEA(128)</td> <td>MD5</td> <td> </td> </tr><tr id=D><td><code>RC2-CBC-MD5</code></td> <td>SSLv2</td> <td>RSA</td> <td>RSA</td> <td>RC2(128)</td> <td>MD5</td> <td> </td> </tr><tr id=H><td><code>RC4-MD5</code></td> <td>SSLv2</td> <td>RSA</td> <td>RSA</td> <td>RC4(128)</td> <td>MD5</td> <td> </td> </tr><tr id=D><td><code>DES-CBC-SHA</code></td> <td>SSLv3</td> <td>RSA</td> <td>RSA</td> <td>DES(56)</td> <td>SHA1</td> <td> </td> </tr><tr id=H><td><code>RC4-64-MD5</code></td> <td>SSLv2</td> <td>RSA</td> <td>RSA</td> <td>RC4(64)</td> <td>MD5</td> <td> </td> </tr><tr id=D><td><code>DES-CBC-MD5</code></td> <td>SSLv2</td> <td>RSA</td> <td>RSA</td> <td>DES(56)</td> <td>MD5</td> <td> </td> </tr><tr id=H><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><tr id=D><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><tr id=H><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><tr id=D><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><tr id=H><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><tr id=D><td><code>NULL-SHA</code></td> <td>SSLv3</td> <td>RSA</td> <td>RSA</td> <td>None</td> <td>SHA1</td> <td> </td> </tr><tr id=H><td><code>NULL-MD5</code></td> <td>SSLv3</td> <td>RSA</td> <td>RSA</td> <td>None</td> <td>MD5</td> <td> </td> </tr><tr id=D><td colspan=7><em>Diffie-Hellman Ciphers:</em></td></tr><tr id=H><td><code>ADH-DES-CBC3-SHA</code></td> <td>SSLv3</td> <td>DH</td> <td>None</td> <td>3DES(168)</td> <td>SHA1</td> <td> </td> </tr><tr id=D><td><code>ADH-DES-CBC-SHA</code></td> <td>SSLv3</td> <td>DH</td> <td>None</td> <td>DES(56)</td> <td>SHA1</td> <td> </td> </tr><tr id=H><td><code>ADH-RC4-MD5</code></td> <td>SSLv3</td> <td>DH</td> <td>None</td> <td>RC4(128)</td> <td>MD5</td> <td> </td> </tr><tr id=D><td><code>EDH-RSA-DES-CBC3-SHA</code></td> <td>SSLv3</td> <td>DH</td> <td>RSA</td> <td>3DES(168)</td> <td>SHA1</td> <td> </td> </tr><tr id=H><td><code>EDH-DSS-DES-CBC3-SHA</code></td> <td>SSLv3</td> <td>DH</td> <td>DSS</td> <td>3DES(168)</td> <td>SHA1</td> <td> </td> </tr><tr id=D><td><code>EDH-RSA-DES-CBC-SHA</code></td> <td>SSLv3</td> <td>DH</td> <td>RSA</td> <td>DES(56)</td> <td>SHA1</td> <td> </td> </tr><tr id=H><td><code>EDH-DSS-DES-CBC-SHA</code></td> <td>SSLv3</td> <td>DH</td> <td>DSS</td> <td>DES(56)</td> <td>SHA1</td> <td> </td> </tr><tr id=D><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><tr id=H><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><tr id=D><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><tr id=H><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></table></float><!-- SSLCertificateFile ---------------------------------------------><p><br><a name="SSLCertificateFile"></a><h2>SSLCertificateFile</h2><directive name="SSLCertificateFile" description="Server PEM-encoded X.509 Certificate file" syntax="<code>SSLCertificateFile</code> <em>filename</em>" default="<em>None</em>" context="server config, virtual host" override="<em>Not applicable</em>" compat="mod_ssl 2.0"><p>This directive points to the PEM-encoded Certificate file for the server andoptionally also to the corresponding RSA or DSA Private Key file for it(contained in the same file). If the contained Private Key is encrypted thePass Phrase dialog is forced at startup time. This directive can be used up totwo times (referencing different filenames) when both a RSA and a DSA basedserver certificate is used in parallel.<p>Example:<blockquote><pre>SSLCertificateFile /usr/local/apache/conf/ssl.crt/server.crt</pre></blockquote><!-- SSLCertificateKeyFile ------------------------------------------><p><br><a name="SSLCertificateKeyFile"></a><h2>SSLCertificateKeyFile</h2><directive name="SSLCertificateKeyFile" description="Server PEM-encoded Private Key file" syntax="<code>SSLCertificateKeyFile</code> <em>filename</em>" default="<em>None</em>" context="server config, virtual host" override="<em>Not applicable</em>" compat="mod_ssl 2.0"><p>This directive points to the PEM-encoded Private Key file for the server. Ifthe Private Key is not combined with the Certificate in the<code>SSLCertificateFile</code>, use this additional directive to point to thefile with the stand-alone Private Key. When <code>SSLCertificateFile</code>is used and the file contains both the Certificate and the Private Key thisdirective need not be used. But we strongly discourage this practice.Instead we recommend you to separate the Certificate and the Private Key. Ifthe contained Private Key is encrypted, the Pass Phrase dialog is forced atstartup time. This directive can be used up to two times (referencingdifferent filenames) when both a RSA and a DSA based private key is used inparallel.<p>Example:<blockquote><pre>SSLCertificateKeyFile /usr/local/apache/conf/ssl.key/server.key</pre></blockquote><!-- SSLCertificateChainFile ----------------------------------------><p><br><a name="SSLCertificateChainFile"></a><h2>SSLCertificateChainFile</h2><directive name="SSLCertificateChainFile" description="File of PEM-encoded Server CA Certificates" syntax="<code>SSLCertificateChainFile</code> <em>filename</em>" default="<em>None</em>" context="server config, virtual host" override="<em>Not applicable</em>" compat="mod_ssl 2.3.6"><p>This directive sets the optional <em>all-in-one</em> file where you canassemble the certificates of Certification Authorities (CA) which form thecertificate chain of the server certificate. This starts with the issuing CAcertificate of of the server certificate and can range up to the root CAcertificate. Such a file is simply the concatenation of the variousPEM-encoded CA Certificate files, usually in certificate chain order. <p>This should be used alternatively and/or additionally to <ahref="#SSLCACertificatePath">SSLCACertificatePath</a> for explicitlyconstructing the server certificate chain which is sent to the browser inaddition to the server certificate. It is especially useful to avoid conflictswith CA certificates when using client authentication. Because althoughplacing a CA certificate of the server certificate chain into <ahref="#SSLCACertificatePath">SSLCACertificatePath</a> has the same effect forthe certificate chain construction, it has the side-effect that clientcertificates issued by this same CA certificate are also accepted on clientauthentication. That's usually not one expect.<p>But be careful: Providing the certificate chain works only if you are using a<i>single</i> (either RSA <i>or</i> DSA) based server certificate. If you areusing a coupled RSA+DSA certificate pair, this will work only if actually bothcertificates use the <i>same</i> certificate chain. Else the browsers will beconfused in this situation.<p>Example:<blockquote><pre>SSLCertificateChainFile /usr/local/apache/conf/ssl.crt/ca.crt</pre></blockquote><!-- SSLCACertificatePath -------------------------------------------><p><br><a name="SSLCACertificatePath"></a><h2>SSLCACertificatePath</h2><directive name="SSLCACertificatePath" description="Directory of PEM-encoded CA Certificates for Client Auth." syntax="<code>SSLCACertificatePath</code> <em>directory</em>" default="<em>None</em>" context="server config, virtual host" override="<em>Not applicable</em>" compat="mod_ssl 2.0"><p>This directive sets the directory where you keep the Certificates ofCertification Authorities (CAs) whose clients you deal with. These are used toverify the client certificate on Client Authentication.<p>The files in this directory have to be PEM-encoded and are accessed throughhash filenames. So usually you can't just place the Certificate filesthere: you also have to create symbolic links named<i>hash-value</i><tt>.N</tt>. And you should always make sure this directorycontains the appropriate symbolic links. Use the <code>Makefile</code> whichcomes with mod_ssl to accomplish this task.<p>Example:<blockquote><pre>SSLCACertificatePath /usr/local/apache/conf/ssl.crt/</pre></blockquote><!-- SSLCACertificateFile -------------------------------------------><p><br><a name="SSLCACertificateFile"></a><h2>SSLCACertificateFile</h2><directive name="SSLCACertificateFile" description="File of concatenated PEM-encoded CA Certificates for Client Auth." syntax="<code>SSLCACertificateFile</code> <em>filename</em>" default="<em>None</em>" context="server config, virtual host" override="<em>Not applicable</em>" compat="mod_ssl 2.0"><p>This directive sets the <em>all-in-one</em> file where you can assemble theCertificates of Certification Authorities (CA) whose <em>clients</em> you dealwith. These are used for Client Authentication. Such a file is simply theconcatenation of the various PEM-encoded Certificate files, in order ofpreference. This can be used alternatively and/or additionally to <ahref="#SSLCACertificatePath">SSLCACertificatePath</a>.<p>Example:<blockquote><pre>SSLCACertificateFile /usr/local/apache/conf/ssl.crt/ca-bundle-client.crt</pre></blockquote><!-- SSLCARevocationPath --------------------------------------------><p><br><a name="SSLCARevocationPath"></a><h2>SSLCARevocationPath</h2><directive name="SSLCARevocationPath" description="Directory of PEM-encoded CA CRLs for Client Auth." syntax="<code>SSLCARevocationPath</code> <em>directory</em>" default="<em>None</em>" context="server config, virtual host" override="<em>Not applicable</em>" compat="mod_ssl 2.3"><p>This directive sets the directory where you keep the Certificate RevocationLists (CRL) of Certification Authorities (CAs) whose clients you deal with.These are used to revoke the client certificate on Client Authentication.<p>The files in this directory have to be PEM-encoded and are accessed throughhash filenames. So usually you have not only to place the CRL files there.Additionally you have to create symbolic links named<i>hash-value</i><tt>.rN</tt>. And you should always make sure this directorycontains the appropriate symbolic links. Use the <code>Makefile</code> whichcomes with mod_ssl to accomplish this task.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -