<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="generator" content="rustdoc"> <meta name="description" content="API documentation for the Rust `ssl` mod in crate `openssl`."> <meta name="keywords" content="rust, rustlang, rust-lang, ssl"> <title>openssl::ssl - Rust</title> <link rel="stylesheet" type="text/css" href="../../rustdoc.css"> <link rel="stylesheet" type="text/css" href="../../main.css"> </head> <body class="rustdoc"> <!--[if lte IE 8]> <div class="warning"> This old browser is unsupported and will most likely display funky things. </div> <![endif]--> <nav class="sidebar"> <p class='location'><a href='../index.html'>openssl</a></p><script>window.sidebarCurrent = {name: 'ssl', ty: 'mod', relpath: '../'};</script><script defer src="../sidebar-items.js"></script> </nav> <nav class="sub"> <form class="search-form js-only"> <div class="search-container"> <input class="search-input" name="search" autocomplete="off" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"> </div> </form> </nav> <section id='main' class="content mod"> <h1 class='fqn'><span class='in-band'>Module <a href='../index.html'>openssl</a>::<wbr><a class='mod' href=''>ssl</a></span><span class='out-of-band'><span id='render-detail'> <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs"> [<span class='inner'>−</span>] </a> </span><a id='src-1325' class='srclink' href='../../src/openssl/ssl/mod.rs.html#1-1727' title='goto source code'>[src]</a></span></h1> <h2 id='modules' class='section-header'><a href="#modules">Modules</a></h2> <table> <tr class=' module-item'> <td><a class='mod' href='error/index.html' title='openssl::ssl::error'>error</a></td> <td class='docblock short'> </td> </tr></table><h2 id='structs' class='section-header'><a href="#structs">Structs</a></h2> <table> <tr class=' module-item'> <td><a class='struct' href='struct.CipherBits.html' title='openssl::ssl::CipherBits'>CipherBits</a></td> <td class='docblock short'> </td> </tr> <tr class=' module-item'> <td><a class='struct' href='struct.NonblockingSslStream.html' title='openssl::ssl::NonblockingSslStream'>NonblockingSslStream</a></td> <td class='docblock short'> </td> </tr> <tr class=' module-item'> <td><a class='struct' href='struct.Ssl.html' title='openssl::ssl::Ssl'>Ssl</a></td> <td class='docblock short'> </td> </tr> <tr class=' module-item'> <td><a class='struct' href='struct.SslCipher.html' title='openssl::ssl::SslCipher'>SslCipher</a></td> <td class='docblock short'> </td> </tr> <tr class=' module-item'> <td><a class='struct' href='struct.SslContext.html' title='openssl::ssl::SslContext'>SslContext</a></td> <td class='docblock short'> <p>An SSL context object</p> </td> </tr> <tr class=' module-item'> <td><a class='struct' href='struct.SslContextOptions.html' title='openssl::ssl::SslContextOptions'>SslContextOptions</a></td> <td class='docblock short'> </td> </tr> <tr class=' module-item'> <td><a class='struct' href='struct.SslStream.html' title='openssl::ssl::SslStream'>SslStream</a></td> <td class='docblock short'> <p>A stream wrapper which handles SSL encryption for an underlying stream.</p> </td> </tr> <tr class=' module-item'> <td><a class='struct' href='struct.SslVerifyMode.html' title='openssl::ssl::SslVerifyMode'>SslVerifyMode</a></td> <td class='docblock short'> </td> </tr></table><h2 id='enums' class='section-header'><a href="#enums">Enums</a></h2> <table> <tr class=' module-item'> <td><a class='enum' href='enum.Error.html' title='openssl::ssl::Error'>Error</a></td> <td class='docblock short'> <p>An SSL error.</p> </td> </tr> <tr class=' module-item'> <td><a class='enum' href='enum.MaybeSslStream.html' title='openssl::ssl::MaybeSslStream'>MaybeSslStream</a></td> <td class='docblock short'> <p>A utility type to help in cases where the use of SSL is decided at runtime.</p> </td> </tr> <tr class=' module-item'> <td><a class='enum' href='enum.SslMethod.html' title='openssl::ssl::SslMethod'>SslMethod</a></td> <td class='docblock short'> <p>Determines the SSL method supported</p> </td> </tr></table><h2 id='constants' class='section-header'><a href="#constants">Constants</a></h2> <table> <tr class=' module-item'> <td><a class='constant' href='constant.SSL_OP_ALL.html' title='openssl::ssl::SSL_OP_ALL'>SSL_OP_ALL</a></td> <td class='docblock short'> </td> </tr> <tr class=' module-item'> <td><a class='constant' href='constant.SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION.html' title='openssl::ssl::SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION'>SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION</a></td> <td class='docblock short'> </td> </tr> <tr class=' module-item'> <td><a class='constant' href='constant.SSL_OP_CIPHER_SERVER_PREFERENCE.html' title='openssl::ssl::SSL_OP_CIPHER_SERVER_PREFERENCE'>SSL_OP_CIPHER_SERVER_PREFERENCE</a></td> <td class='docblock short'> </td> </tr> <tr class=' module-item'> <td><a class='constant' href='constant.SSL_OP_CISCO_ANYCONNECT.html' title='openssl::ssl::SSL_OP_CISCO_ANYCONNECT'>SSL_OP_CISCO_ANYCONNECT</a></td> <td class='docblock short'> </td> </tr> <tr class=' module-item'> <td><a class='constant' href='constant.SSL_OP_COOKIE_EXCHANGE.html' title='openssl::ssl::SSL_OP_COOKIE_EXCHANGE'>SSL_OP_COOKIE_EXCHANGE</a></td> <td class='docblock short'> </td> </tr> <tr class=' module-item'> <td><a class='constant' href='constant.SSL_OP_CRYPTOPRO_TLSEXT_BUG.html' title='openssl::ssl::SSL_OP_CRYPTOPRO_TLSEXT_BUG'>SSL_OP_CRYPTOPRO_TLSEXT_BUG</a></td> <td class='docblock short'> </td> </tr> <tr class=' module-item'> <td><a class='constant' href='constant.SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS.html' title='openssl::ssl::SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS'>SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS</a></td> <td class='docblock short'> </td> </tr> <tr class=' module-item'> <td><a class='constant' href='constant.SSL_OP_EPHEMERAL_RSA.html' title='openssl::ssl::SSL_OP_EPHEMERAL_RSA'>SSL_OP_EPHEMERAL_RSA</a></td> <td class='docblock short'> </td> </tr> <tr class=' module-item'> <td><a class='constant' href='constant.SSL_OP_LEGACY_SERVER_CONNECT.html' title='openssl::ssl::SSL_OP_LEGACY_SERVER_CONNECT'>SSL_OP_LEGACY_SERVER_CONNECT</a></td> <td class='docblock short'> </td> </tr> <tr class=' module-item'> <td><a class='constant' href='constant.SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER.html' title='openssl::ssl::SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER'>SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER</a></td> <td class='docblock short'> </td> </tr> <tr class=' module-item'> <td><a class='constant' href='constant.SSL_OP_MICROSOFT_SESS_ID_BUG.html' title='openssl::ssl::SSL_OP_MICROSOFT_SESS_ID_BUG'>SSL_OP_MICROSOFT_SESS_ID_BUG</a></td> <td class='docblock short'> </td> </tr> <tr class=' module-item'> <td><a class='constant' href='constant.SSL_OP_MSIE_SSLV2_RSA_PADDING.html' title='openssl::ssl::SSL_OP_MSIE_SSLV2_RSA_PADDING'>SSL_OP_MSIE_SSLV2_RSA_PADDING</a></td> <td class='docblock short'> </td> </tr> <tr class=' module-item'> <td><a class='constant' href='constant.SSL_OP_NETSCAPE_CA_DN_BUG.html' title='openssl::ssl::SSL_OP_NETSCAPE_CA_DN_BUG'>SSL_OP_NETSCAPE_CA_DN_BUG</a></td> <td class='docblock short'> </td> </tr> <tr class=' module-item'> <td><a class='constant' href='constant.SSL_OP_NETSCAPE_CHALLENGE_BUG.html' title='openssl::ssl::SSL_OP_NETSCAPE_CHALLENGE_BUG'>SSL_OP_NETSCAPE_CHALLENGE_BUG</a></td> <td class='docblock short'> </td> </tr> <tr class=' module-item'> <td><a class='constant' href='constant.SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG.html' title='openssl::ssl::SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG'>SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG</a></td> <td class='docblock short'> </td> </tr> <tr class=' module-item'> <td><a class='constant' href='constant.SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG.html' title='openssl::ssl::SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG'>SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG</a></td> <td class='docblock short'> </td> </tr> <tr class=' module-item'> <td><a class='constant' href='constant.SSL_OP_NO_COMPRESSION.html' title='openssl::ssl::SSL_OP_NO_COMPRESSION'>SSL_OP_NO_COMPRESSION</a></td> <td class='docblock short'> </td> </tr> <tr class=' module-item'> <td><a class='constant' href='constant.SSL_OP_NO_DTLSV1.html' title='openssl::ssl::SSL_OP_NO_DTLSV1'>SSL_OP_NO_DTLSV1</a></td> <td class='docblock short'> </td> </tr> <tr class=' module-item'> <td><a class='constant' href='constant.SSL_OP_NO_DTLSV1_2.html' title='openssl::ssl::SSL_OP_NO_DTLSV1_2'>SSL_OP_NO_DTLSV1_2</a></td> <td class='docblock short'> </td> </tr> <tr class=' module-item'> <td><a class='constant' href='constant.SSL_OP_NO_QUERY_MTU.html' title='openssl::ssl::SSL_OP_NO_QUERY_MTU'>SSL_OP_NO_QUERY_MTU</a></td> <td class='docblock short'> </td> </tr> <tr class=' module-item'> <td><a class='constant' href='constant.SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION.html' title='openssl::ssl::SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION'>SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION</a></td> <td class='docblock short'> </td> </tr> <tr class=' module-item'> <td><a class='constant' href='constant.SSL_OP_NO_SSLV2.html' title='openssl::ssl::SSL_OP_NO_SSLV2'>SSL_OP_NO_SSLV2</a></td> <td class='docblock short'> </td> </tr> <tr class=' module-item'> <td><a class='constant' href='constant.SSL_OP_NO_SSLV3.html' title='openssl::ssl::SSL_OP_NO_SSLV3'>SSL_OP_NO_SSLV3</a></td> <td class='docblock short'> </td> </tr> <tr class=' module-item'> <td><a class='constant' href='constant.SSL_OP_NO_SSL_MASK.html' title='openssl::ssl::SSL_OP_NO_SSL_MASK'>SSL_OP_NO_SSL_MASK</a></td> <td class='docblock short'> </td> </tr> <tr class=' module-item'> <td><a class='constant' href='constant.SSL_OP_NO_TICKET.html' title='openssl::ssl::SSL_OP_NO_TICKET'>SSL_OP_NO_TICKET</a></td> <td class='docblock short'> </td> </tr> <tr class=' module-item'> <td><a class='constant' href='constant.SSL_OP_NO_TLSV1.html' title='openssl::ssl::SSL_OP_NO_TLSV1'>SSL_OP_NO_TLSV1</a></td> <td class='docblock short'> </td> </tr> <tr class=' module-item'> <td><a class='constant' href='constant.SSL_OP_NO_TLSV1_1.html' title='openssl::ssl::SSL_OP_NO_TLSV1_1'>SSL_OP_NO_TLSV1_1</a></td> <td class='docblock short'> </td> </tr> <tr class=' module-item'> <td><a class='constant' href='constant.SSL_OP_NO_TLSV1_2.html' title='openssl::ssl::SSL_OP_NO_TLSV1_2'>SSL_OP_NO_TLSV1_2</a></td> <td class='docblock short'> </td> </tr> <tr class=' module-item'> <td><a class='constant' href='constant.SSL_OP_PKCS1_CHECK_1.html' title='openssl::ssl::SSL_OP_PKCS1_CHECK_1'>SSL_OP_PKCS1_CHECK_1</a></td> <td class='docblock short'> </td> </tr> <tr class=' module-item'> <td><a class='constant' href='constant.SSL_OP_PKCS1_CHECK_2.html' title='openssl::ssl::SSL_OP_PKCS1_CHECK_2'>SSL_OP_PKCS1_CHECK_2</a></td> <td class='docblock short'> </td> </tr> <tr class=' module-item'> <td><a class='constant' href='constant.SSL_OP_SAFARI_ECDHE_ECDSA_BUG.html' title='openssl::ssl::SSL_OP_SAFARI_ECDHE_ECDSA_BUG'>SSL_OP_SAFARI_ECDHE_ECDSA_BUG</a></td> <td class='docblock short'> </td> </tr> <tr class=' module-item'> <td><a class='constant' href='constant.SSL_OP_SINGLE_DH_USE.html' title='openssl::ssl::SSL_OP_SINGLE_DH_USE'>SSL_OP_SINGLE_DH_USE</a></td> <td class='docblock short'> </td> </tr> <tr class=' module-item'> <td><a class='constant' href='constant.SSL_OP_SINGLE_ECDH_USE.html' title='openssl::ssl::SSL_OP_SINGLE_ECDH_USE'>SSL_OP_SINGLE_ECDH_USE</a></td> <td class='docblock short'> </td> </tr> <tr class=' module-item'> <td><a class='constant' href='constant.SSL_OP_SSLEAY_080_CLIENT_DH_BUG.html' title='openssl::ssl::SSL_OP_SSLEAY_080_CLIENT_DH_BUG'>SSL_OP_SSLEAY_080_CLIENT_DH_BUG</a></td> <td class='docblock short'> </td> </tr> <tr class=' module-item'> <td><a class='constant' href='constant.SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG.html' title='openssl::ssl::SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG'>SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG</a></td> <td class='docblock short'> </td> </tr> <tr class=' module-item'> <td><a class='constant' href='constant.SSL_OP_TLSEXT_PADDING.html' title='openssl::ssl::SSL_OP_TLSEXT_PADDING'>SSL_OP_TLSEXT_PADDING</a></td> <td class='docblock short'> </td> </tr> <tr class=' module-item'> <td><a class='constant' href='constant.SSL_OP_TLS_BLOCK_PADDING_BUG.html' title='openssl::ssl::SSL_OP_TLS_BLOCK_PADDING_BUG'>SSL_OP_TLS_BLOCK_PADDING_BUG</a></td> <td class='docblock short'> </td> </tr> <tr class=' module-item'> <td><a class='constant' href='constant.SSL_OP_TLS_D5_BUG.html' title='openssl::ssl::SSL_OP_TLS_D5_BUG'>SSL_OP_TLS_D5_BUG</a></td> <td class='docblock short'> </td> </tr> <tr class=' module-item'> <td><a class='constant' href='constant.SSL_OP_TLS_ROLLBACK_BUG.html' title='openssl::ssl::SSL_OP_TLS_ROLLBACK_BUG'>SSL_OP_TLS_ROLLBACK_BUG</a></td> <td class='docblock short'> </td> </tr> <tr class=' module-item'> <td><a class='constant' href='constant.SSL_VERIFY_FAIL_IF_NO_PEER_CERT.html' title='openssl::ssl::SSL_VERIFY_FAIL_IF_NO_PEER_CERT'>SSL_VERIFY_FAIL_IF_NO_PEER_CERT</a></td> <td class='docblock short'> <p>Terminate handshake if client did not return a certificate. Use together with SSL_VERIFY_PEER.</p> </td> </tr> <tr class=' module-item'> <td><a class='constant' href='constant.SSL_VERIFY_NONE.html' title='openssl::ssl::SSL_VERIFY_NONE'>SSL_VERIFY_NONE</a></td> <td class='docblock short'> <p>Do not verify the server's certificate</p> </td> </tr> <tr class=' module-item'> <td><a class='constant' href='constant.SSL_VERIFY_PEER.html' title='openssl::ssl::SSL_VERIFY_PEER'>SSL_VERIFY_PEER</a></td> <td class='docblock short'> <p>Verify that the server's certificate is trusted</p> </td> </tr></table><h2 id='traits' class='section-header'><a href="#traits">Traits</a></h2> <table> <tr class=' module-item'> <td><a class='trait' href='trait.IntoSsl.html' title='openssl::ssl::IntoSsl'>IntoSsl</a></td> <td class='docblock short'> </td> </tr></table><h2 id='functions' class='section-header'><a href="#functions">Functions</a></h2> <table> <tr class=' module-item'> <td><a class='fn' href='fn.init.html' title='openssl::ssl::init'>init</a></td> <td class='docblock short'> <p>Manually initialize SSL. It is optional to call this function and safe to do so more than once.</p> </td> </tr></table><h2 id='types' class='section-header'><a href="#types">Type Definitions</a></h2> <table> <tr class=' module-item'> <td><a class='type' href='type.ServerNameCallback.html' title='openssl::ssl::ServerNameCallback'>ServerNameCallback</a></td> <td class='docblock short'> <p>The signature of functions that can be used to choose the context depending on the server name</p> </td> </tr> <tr class=' module-item'> <td><a class='type' href='type.ServerNameCallbackData.html' title='openssl::ssl::ServerNameCallbackData'>ServerNameCallbackData</a></td> <td class='docblock short'> </td> </tr> <tr class=' module-item'> <td><a class='type' href='type.VerifyCallback.html' title='openssl::ssl::VerifyCallback'>VerifyCallback</a></td> <td class='docblock short'> <p>The signature of functions that can be used to manually verify certificates</p> </td> </tr> <tr class=' module-item'> <td><a class='type' href='type.VerifyCallbackData.html' title='openssl::ssl::VerifyCallbackData'>VerifyCallbackData</a></td> <td class='docblock short'> <p>The signature of functions that can be used to manually verify certificates when user-data should be carried for all verification process</p> </td> </tr></table></section> <section id='search' class="content hidden"></section> <section class="footer"></section> <aside id="help" class="hidden"> <div> <h1 class="hidden">Help</h1> <div class="shortcuts"> <h2>Keyboard Shortcuts</h2> <dl> <dt>?</dt> <dd>Show this help dialog</dd> <dt>S</dt> <dd>Focus the search field</dd> <dt>⇤</dt> <dd>Move up in search results</dd> <dt>⇥</dt> <dd>Move down in search results</dd> <dt>⏎</dt> <dd>Go to active search result</dd> <dt>+</dt> <dd>Collapse/expand all sections</dd> </dl> </div> <div class="infos"> <h2>Search Tricks</h2> <p> Prefix searches with a type followed by a colon (e.g. <code>fn:</code>) to restrict the search to a given type. </p> <p> Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, and <code>const</code>. </p> <p> Search functions by type signature (e.g. <code>vec -> usize</code> or <code>* -> vec</code>) </p> </div> </div> </aside> <script> window.rootPath = "../../"; window.currentCrate = "openssl"; window.playgroundUrl = ""; </script> <script src="../../jquery.js"></script> <script src="../../main.js"></script> <script defer src="../../search-index.js"></script> </body> </html>