blob: c5d692402f85dfd4398689c98d1939110f006004 [file] [log] [blame]
<!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="A type which allows for configuration of a client-side TLS session before connection."><meta name="keywords" content="rust, rustlang, rust-lang, ConnectConfiguration"><title>ConnectConfiguration in openssl::ssl - Rust</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Regular.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../FiraSans-Medium.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Regular.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceSerif4-Bold.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../SourceCodePro-Semibold.ttf.woff2"><link rel="stylesheet" href="../../normalize.css"><link rel="stylesheet" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" href="../../ayu.css" disabled><link rel="stylesheet" href="../../dark.css" disabled><link rel="stylesheet" href="../../light.css" id="themeStyle"><script id="default-settings" ></script><script src="../../storage.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../main.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../favicon.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button><a class="sidebar-logo" href="../../openssl/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div></a><h2></h2></nav><nav class="sidebar"><a class="sidebar-logo" href="../../openssl/index.html"><div class="logo-container"><img class="rust-logo" src="../../rust-logo.svg" alt="logo"></div></a><h2 class="location"><a href="#">ConnectConfiguration</a></h2><div class="sidebar-elems"><section><h3><a href="#implementations">Methods</a></h3><ul class="block"><li><a href="#method.connect">connect</a></li><li><a href="#method.into_ssl">into_ssl</a></li><li><a href="#method.set_use_server_name_indication">set_use_server_name_indication</a></li><li><a href="#method.set_verify_hostname">set_verify_hostname</a></li><li><a href="#method.use_server_name_indication">use_server_name_indication</a></li><li><a href="#method.verify_hostname">verify_hostname</a></li></ul><h3><a href="#deref-methods-SslRef">Methods from Deref&lt;Target=SslRef&gt;</a></h3><ul class="block"><li><a href="#method.add_chain_cert">add_chain_cert</a></li><li><a href="#method.add_client_ca">add_client_ca</a></li><li><a href="#method.bytes_to_cipher_list">bytes_to_cipher_list</a></li><li><a href="#method.certificate">certificate</a></li><li><a href="#method.client_hello_ciphers">client_hello_ciphers</a></li><li><a href="#method.client_hello_compression_methods">client_hello_compression_methods</a></li><li><a href="#method.client_hello_isv2">client_hello_isv2</a></li><li><a href="#method.client_hello_legacy_version">client_hello_legacy_version</a></li><li><a href="#method.client_hello_random">client_hello_random</a></li><li><a href="#method.client_hello_session_id">client_hello_session_id</a></li><li><a href="#method.client_random">client_random</a></li><li><a href="#method.current_cipher">current_cipher</a></li><li><a href="#method.ex_data">ex_data</a></li><li><a href="#method.ex_data_mut">ex_data_mut</a></li><li><a href="#method.export_keying_material">export_keying_material</a></li><li><a href="#method.export_keying_material_early">export_keying_material_early</a></li><li><a href="#method.extms_support">extms_support</a></li><li><a href="#method.finished">finished</a></li><li><a href="#method.is_init_finished">is_init_finished</a></li><li><a href="#method.is_server">is_server</a></li><li><a href="#method.max_early_data">max_early_data</a></li><li><a href="#method.num_tickets">num_tickets</a></li><li><a href="#method.ocsp_status">ocsp_status</a></li><li><a href="#method.param_mut">param_mut</a></li><li><a href="#method.peer_cert_chain">peer_cert_chain</a></li><li><a href="#method.peer_certificate">peer_certificate</a></li><li><a href="#method.peer_finished">peer_finished</a></li><li><a href="#method.pending">pending</a></li><li><a href="#method.private_key">private_key</a></li><li><a href="#method.psk_identity">psk_identity</a></li><li><a href="#method.psk_identity_hint">psk_identity_hint</a></li><li><a href="#method.selected_alpn_protocol">selected_alpn_protocol</a></li><li><a href="#method.selected_srtp_profile">selected_srtp_profile</a></li><li><a href="#method.server_random">server_random</a></li><li><a href="#method.servername">servername</a></li><li><a href="#method.servername_raw">servername_raw</a></li><li><a href="#method.session">session</a></li><li><a href="#method.session_reused">session_reused</a></li><li><a href="#method.set_accept_state">set_accept_state</a></li><li><a href="#method.set_alpn_protos">set_alpn_protos</a></li><li><a href="#method.set_certificate">set_certificate</a></li><li><a href="#method.set_certificate_chain_file">set_certificate_chain_file</a></li><li><a href="#method.set_cipher_list">set_cipher_list</a></li><li><a href="#method.set_ciphersuites">set_ciphersuites</a></li><li><a href="#method.set_client_ca_list">set_client_ca_list</a></li><li><a href="#method.set_connect_state">set_connect_state</a></li><li><a href="#method.set_ex_data">set_ex_data</a></li><li><a href="#method.set_hostname">set_hostname</a></li><li><a href="#method.set_max_early_data">set_max_early_data</a></li><li><a href="#method.set_max_proto_version">set_max_proto_version</a></li><li><a href="#method.set_method">set_method</a></li><li><a href="#method.set_min_proto_version">set_min_proto_version</a></li><li><a href="#method.set_mtu">set_mtu</a></li><li><a href="#method.set_num_tickets">set_num_tickets</a></li><li><a href="#method.set_ocsp_status">set_ocsp_status</a></li><li><a href="#method.set_private_key">set_private_key</a></li><li><a href="#method.set_private_key_file">set_private_key_file</a></li><li><a href="#method.set_session">set_session</a></li><li><a href="#method.set_ssl_context">set_ssl_context</a></li><li><a href="#method.set_status_type">set_status_type</a></li><li><a href="#method.set_tlsext_use_srtp">set_tlsext_use_srtp</a></li><li><a href="#method.set_tmp_dh">set_tmp_dh</a></li><li><a href="#method.set_tmp_dh_callback">set_tmp_dh_callback</a></li><li><a href="#method.set_tmp_ecdh">set_tmp_ecdh</a></li><li><a href="#method.set_verify">set_verify</a></li><li><a href="#method.set_verify_callback">set_verify_callback</a></li><li><a href="#method.set_verify_cert_store">set_verify_cert_store</a></li><li><a href="#method.srtp_profiles">srtp_profiles</a></li><li><a href="#method.ssl_context">ssl_context</a></li><li><a href="#method.state_string">state_string</a></li><li><a href="#method.state_string_long">state_string_long</a></li><li><a href="#method.verified_chain">verified_chain</a></li><li><a href="#method.verify_mode">verify_mode</a></li><li><a href="#method.verify_result">verify_result</a></li><li><a href="#method.version">version</a></li><li><a href="#method.version2">version2</a></li><li><a href="#method.version_str">version_str</a></li></ul><h3><a href="#trait-implementations">Trait Implementations</a></h3><ul class="block"><li><a href="#impl-Deref-for-ConnectConfiguration">Deref</a></li><li><a href="#impl-DerefMut-for-ConnectConfiguration">DerefMut</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block"><li><a href="#impl-RefUnwindSafe-for-ConnectConfiguration">RefUnwindSafe</a></li><li><a href="#impl-Send-for-ConnectConfiguration">Send</a></li><li><a href="#impl-Sync-for-ConnectConfiguration">Sync</a></li><li><a href="#impl-Unpin-for-ConnectConfiguration">Unpin</a></li><li><a href="#impl-UnwindSafe-for-ConnectConfiguration">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block"><li><a href="#impl-Any-for-ConnectConfiguration">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-ConnectConfiguration">Borrow&lt;T&gt;</a></li><li><a href="#impl-BorrowMut%3CT%3E-for-ConnectConfiguration">BorrowMut&lt;T&gt;</a></li><li><a href="#impl-From%3CT%3E-for-ConnectConfiguration">From&lt;T&gt;</a></li><li><a href="#impl-Into%3CU%3E-for-ConnectConfiguration">Into&lt;U&gt;</a></li><li><a href="#impl-TryFrom%3CU%3E-for-ConnectConfiguration">TryFrom&lt;U&gt;</a></li><li><a href="#impl-TryInto%3CU%3E-for-ConnectConfiguration">TryInto&lt;U&gt;</a></li></ul></section><h2><a href="index.html">In openssl::ssl</a></h2></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><div class="search-container"><span></span><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../wheel.svg"></a></div></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1 class="fqn">Struct <a href="../index.html">openssl</a>::<wbr><a href="index.html">ssl</a>::<wbr><a class="struct" href="#">ConnectConfiguration</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="srclink" href="../../src/openssl/ssl/connector.rs.html#140-144">source</a> · <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span></div><div class="item-decl"><pre class="rust struct"><code>pub struct ConnectConfiguration { /* private fields */ }</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>A type which allows for configuration of a client-side TLS session before connection.</p>
</div></details><h2 id="implementations" class="small-section-header">Implementations<a href="#implementations" class="anchor"></a></h2><div id="implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-ConnectConfiguration" class="impl has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/connector.rs.html#146-203">source</a><a href="#impl-ConnectConfiguration" class="anchor"></a><h3 class="code-header">impl <a class="struct" href="struct.ConnectConfiguration.html" title="struct openssl::ssl::ConnectConfiguration">ConnectConfiguration</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.use_server_name_indication" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/connector.rs.html#148-151">source</a><h4 class="code-header">pub fn <a href="#method.use_server_name_indication" class="fnname">use_server_name_indication</a>(self, use_sni: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -&gt; <a class="struct" href="struct.ConnectConfiguration.html" title="struct openssl::ssl::ConnectConfiguration">ConnectConfiguration</a></h4></section></summary><div class="docblock"><p>A builder-style version of <code>set_use_server_name_indication</code>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.set_use_server_name_indication" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/connector.rs.html#156-158">source</a><h4 class="code-header">pub fn <a href="#method.set_use_server_name_indication" class="fnname">set_use_server_name_indication</a>(&amp;mut self, use_sni: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>)</h4></section></summary><div class="docblock"><p>Configures the use of Server Name Indication (SNI) when connecting.</p>
<p>Defaults to <code>true</code>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.verify_hostname" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/connector.rs.html#161-164">source</a><h4 class="code-header">pub fn <a href="#method.verify_hostname" class="fnname">verify_hostname</a>(self, verify_hostname: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -&gt; <a class="struct" href="struct.ConnectConfiguration.html" title="struct openssl::ssl::ConnectConfiguration">ConnectConfiguration</a></h4></section></summary><div class="docblock"><p>A builder-style version of <code>set_verify_hostname</code>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.set_verify_hostname" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/connector.rs.html#175-177">source</a><h4 class="code-header">pub fn <a href="#method.set_verify_hostname" class="fnname">set_verify_hostname</a>(&amp;mut self, verify_hostname: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>)</h4></section></summary><div class="docblock"><p>Configures the use of hostname verification when connecting.</p>
<p>Defaults to <code>true</code>.</p>
<h5 id="warning"><a href="#warning">Warning</a></h5>
<p>You should think very carefully before you use this method. If hostname verification is not
used, <em>any</em> valid certificate for <em>any</em> site will be trusted for use from any other. This
introduces a significant vulnerability to man-in-the-middle attacks.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into_ssl" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/connector.rs.html#182-192">source</a><h4 class="code-header">pub fn <a href="#method.into_ssl" class="fnname">into_ssl</a>(self, domain: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.Ssl.html" title="struct openssl::ssl::Ssl">Ssl</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Returns an <code>Ssl</code> configured to connect to the provided domain.</p>
<p>The domain is used for SNI (if it is not an IP address) and hostname verification if enabled.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.connect" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/connector.rs.html#197-202">source</a><h4 class="code-header">pub fn <a href="#method.connect" class="fnname">connect</a>&lt;S&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;self,<br>&nbsp;&nbsp;&nbsp;&nbsp;domain: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;stream: S<br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.SslStream.html" title="struct openssl::ssl::SslStream">SslStream</a>&lt;S&gt;, <a class="enum" href="enum.HandshakeError.html" title="enum openssl::ssl::HandshakeError">HandshakeError</a>&lt;S&gt;&gt;<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;S: <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html" title="trait std::io::Read">Read</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Write.html" title="trait std::io::Write">Write</a>,</span></h4></section></summary><div class="docblock"><p>Initiates a client-side TLS session on a stream.</p>
<p>The domain is used for SNI and hostname verification if enabled.</p>
</div></details></div></details></div><h2 id="deref-methods-SslRef" class="small-section-header"><span>Methods from <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a>&lt;Target = <a class="struct" href="struct.SslRef.html" title="struct openssl::ssl::SslRef">SslRef</a>&gt;</span><a href="#deref-methods-SslRef" class="anchor"></a></h2><div id="deref-methods-SslRef-1"><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.set_connect_state" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#2338-2340">source</a><h4 class="code-header">pub fn <a href="#method.set_connect_state" class="fnname">set_connect_state</a>(&amp;mut self)</h4></section></summary><div class="docblock"><p>Configure as an outgoing stream from a client.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_set_connect_state.html"><code>SSL_set_connect_state</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.set_accept_state" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#2344-2346">source</a><h4 class="code-header">pub fn <a href="#method.set_accept_state" class="fnname">set_accept_state</a>(&amp;mut self)</h4></section></summary><div class="docblock"><p>Configure as an incoming stream to a server.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_set_accept_state.html"><code>SSL_set_accept_state</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.set_verify" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#2352-2354">source</a><h4 class="code-header">pub fn <a href="#method.set_verify" class="fnname">set_verify</a>(&amp;mut self, mode: <a class="struct" href="struct.SslVerifyMode.html" title="struct openssl::ssl::SslVerifyMode">SslVerifyMode</a>)</h4></section></summary><div class="docblock"><p>Like <a href="struct.SslContextBuilder.html#method.set_verify"><code>SslContextBuilder::set_verify</code></a>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_set_verify.html"><code>SSL_set_verify</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.verify_mode" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#2358-2361">source</a><h4 class="code-header">pub fn <a href="#method.verify_mode" class="fnname">verify_mode</a>(&amp;self) -&gt; <a class="struct" href="struct.SslVerifyMode.html" title="struct openssl::ssl::SslVerifyMode">SslVerifyMode</a></h4></section></summary><div class="docblock"><p>Returns the verify mode that was set using <code>set_verify</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_set_verify_mode.html"><code>SSL_set_verify_mode</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.set_verify_callback" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#2367-2376">source</a><h4 class="code-header">pub fn <a href="#method.set_verify_callback" class="fnname">set_verify_callback</a>&lt;F&gt;(&amp;mut self, mode: <a class="struct" href="struct.SslVerifyMode.html" title="struct openssl::ssl::SslVerifyMode">SslVerifyMode</a>, verify: F)<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>, &amp;mut <a class="struct" href="../x509/struct.X509StoreContextRef.html" title="struct openssl::x509::X509StoreContextRef">X509StoreContextRef</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a> + 'static + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,</span></h4></section></summary><div class="docblock"><p>Like <a href="struct.SslContextBuilder.html#method.set_verify_callback"><code>SslContextBuilder::set_verify_callback</code></a>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_set_verify.html"><code>SSL_set_verify</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.set_tmp_dh" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#2382-2384">source</a><h4 class="code-header">pub fn <a href="#method.set_tmp_dh" class="fnname">set_tmp_dh</a>(&amp;mut self, dh: &amp;<a class="struct" href="../dh/struct.DhRef.html" title="struct openssl::dh::DhRef">DhRef</a>&lt;<a class="enum" href="../pkey/enum.Params.html" title="enum openssl::pkey::Params">Params</a>&gt;) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Like <a href="struct.SslContextBuilder.html#method.set_tmp_dh"><code>SslContextBuilder::set_tmp_dh</code></a>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_set_tmp_dh.html"><code>SSL_set_tmp_dh</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.set_tmp_dh_callback" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#2390-2402">source</a><h4 class="code-header">pub fn <a href="#method.set_tmp_dh_callback" class="fnname">set_tmp_dh_callback</a>&lt;F&gt;(&amp;mut self, callback: F)<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;F: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.Fn.html" title="trait core::ops::function::Fn">Fn</a>(&amp;mut <a class="struct" href="struct.SslRef.html" title="struct openssl::ssl::SslRef">SslRef</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="../dh/struct.Dh.html" title="struct openssl::dh::Dh">Dh</a>&lt;<a class="enum" href="../pkey/enum.Params.html" title="enum openssl::pkey::Params">Params</a>&gt;, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt; + 'static + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a>,</span></h4></section></summary><div class="docblock"><p>Like <a href="struct.SslContextBuilder.html#method.set_tmp_dh_callback"><code>SslContextBuilder::set_tmp_dh_callback</code></a>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_set_tmp_dh_callback.html"><code>SSL_set_tmp_dh_callback</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.set_tmp_ecdh" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#2408-2410">source</a><h4 class="code-header">pub fn <a href="#method.set_tmp_ecdh" class="fnname">set_tmp_ecdh</a>(&amp;mut self, key: &amp;<a class="struct" href="../ec/struct.EcKeyRef.html" title="struct openssl::ec::EcKeyRef">EcKeyRef</a>&lt;<a class="enum" href="../pkey/enum.Params.html" title="enum openssl::pkey::Params">Params</a>&gt;) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Like <a href="struct.SslContextBuilder.html#method.set_tmp_ecdh"><code>SslContextBuilder::set_tmp_ecdh</code></a>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_set_tmp_ecdh.html"><code>SSL_set_tmp_ecdh</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.set_alpn_protos" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#2447-2462">source</a><h4 class="code-header">pub fn <a href="#method.set_alpn_protos" class="fnname">set_alpn_protos</a>(&amp;mut self, protocols: &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Like <a href="struct.SslContextBuilder.html#method.set_alpn_protos"><code>SslContextBuilder::set_alpn_protos</code></a>.</p>
<p>Requires OpenSSL 1.0.2 or LibreSSL 2.6.1 or newer.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_set_alpn_protos.html"><code>SSL_set_alpn_protos</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.current_cipher" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#2466-2472">source</a><h4 class="code-header">pub fn <a href="#method.current_cipher" class="fnname">current_cipher</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="struct" href="struct.SslCipherRef.html" title="struct openssl::ssl::SslCipherRef">SslCipherRef</a>&gt;</h4></section></summary><div class="docblock"><p>Returns the current cipher if the session is active.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_get_current_cipher.html"><code>SSL_get_current_cipher</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.state_string" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#2476-2483">source</a><h4 class="code-header">pub fn <a href="#method.state_string" class="fnname">state_string</a>(&amp;self) -&gt; &amp;'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a></h4></section></summary><div class="docblock"><p>Returns a short string describing the state of the session.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_state_string.html"><code>SSL_state_string</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.state_string_long" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#2487-2494">source</a><h4 class="code-header">pub fn <a href="#method.state_string_long" class="fnname">state_string_long</a>(&amp;self) -&gt; &amp;'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a></h4></section></summary><div class="docblock"><p>Returns a longer string describing the state of the session.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_state_string_long.html"><code>SSL_state_string_long</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.set_hostname" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#2500-2506">source</a><h4 class="code-header">pub fn <a href="#method.set_hostname" class="fnname">set_hostname</a>(&amp;mut self, hostname: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Sets the host name to be sent to the server for Server Name Indication (SNI).</p>
<p>It has no effect for a server-side connection.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_set_tlsext_host_name.html"><code>SSL_set_tlsext_host_name</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.peer_certificate" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#2510-2515">source</a><h4 class="code-header">pub fn <a href="#method.peer_certificate" class="fnname">peer_certificate</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../x509/struct.X509.html" title="struct openssl::x509::X509">X509</a>&gt;</h4></section></summary><div class="docblock"><p>Returns the peer’s certificate, if present.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_get_peer_certificate.html"><code>SSL_get_peer_certificate</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.peer_cert_chain" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#2522-2527">source</a><h4 class="code-header">pub fn <a href="#method.peer_cert_chain" class="fnname">peer_cert_chain</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="struct" href="../stack/struct.StackRef.html" title="struct openssl::stack::StackRef">StackRef</a>&lt;<a class="struct" href="../x509/struct.X509.html" title="struct openssl::x509::X509">X509</a>&gt;&gt;</h4></section></summary><div class="docblock"><p>Returns the certificate chain of the peer, if present.</p>
<p>On the client side, the chain includes the leaf certificate, but on the server side it does
not. Fun!</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_get_peer_cert_chain.html"><code>SSL_get_peer_cert_chain</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.verified_chain" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#2540-2545">source</a><h4 class="code-header">pub fn <a href="#method.verified_chain" class="fnname">verified_chain</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="struct" href="../stack/struct.StackRef.html" title="struct openssl::stack::StackRef">StackRef</a>&lt;<a class="struct" href="../x509/struct.X509.html" title="struct openssl::x509::X509">X509</a>&gt;&gt;</h4></section></summary><div class="docblock"><p>Returns the verified certificate chain of the peer, including the leaf certificate.</p>
<p>If verification was not successful (i.e. <a href="#method.verify_result"><code>verify_result</code></a> does not return
<a href="../x509/struct.X509VerifyResult.html#associatedconstant.OK"><code>X509VerifyResult::OK</code></a>), this chain may be incomplete or invalid.</p>
<p>Requires OpenSSL 1.1.0 or newer.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_get0_verified_chain.html"><code>SSL_get0_verified_chain</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.certificate" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#2549-2554">source</a><h4 class="code-header">pub fn <a href="#method.certificate" class="fnname">certificate</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="struct" href="../x509/struct.X509Ref.html" title="struct openssl::x509::X509Ref">X509Ref</a>&gt;</h4></section></summary><div class="docblock"><p>Like [<code>SslContext::certificate</code>].</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_get_certificate.html"><code>SSL_get_certificate</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.private_key" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#2560-2565">source</a><h4 class="code-header">pub fn <a href="#method.private_key" class="fnname">private_key</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="struct" href="../pkey/struct.PKeyRef.html" title="struct openssl::pkey::PKeyRef">PKeyRef</a>&lt;<a class="enum" href="../pkey/enum.Private.html" title="enum openssl::pkey::Private">Private</a>&gt;&gt;</h4></section></summary><div class="docblock"><p>Like <a href="struct.SslContext.html#method.private_key"><code>SslContext::private_key</code></a>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_get_privatekey.html"><code>SSL_get_privatekey</code></a>.</p>
</div></details><section id="method.version" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#2568-2570">source</a><h4 class="code-header">pub fn <a href="#method.version" class="fnname">version</a>(&amp;self) -&gt; &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a></h4></section><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.10.5: renamed to <code>version_str</code></span></div></span><details class="rustdoc-toggle method-toggle" open><summary><section id="method.version2" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#2574-2583">source</a><h4 class="code-header">pub fn <a href="#method.version2" class="fnname">version2</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="struct.SslVersion.html" title="struct openssl::ssl::SslVersion">SslVersion</a>&gt;</h4></section></summary><div class="docblock"><p>Returns the protocol version of the session.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_version.html"><code>SSL_version</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.version_str" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#2587-2594">source</a><h4 class="code-header">pub fn <a href="#method.version_str" class="fnname">version_str</a>(&amp;self) -&gt; &amp;'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a></h4></section></summary><div class="docblock"><p>Returns a string describing the protocol version of the session.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_get_version.html"><code>SSL_get_version</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.selected_alpn_protocol" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#2604-2618">source</a><h4 class="code-header">pub fn <a href="#method.selected_alpn_protocol" class="fnname">selected_alpn_protocol</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]&gt;</h4></section></summary><div class="docblock"><p>Returns the protocol selected via Application Layer Protocol Negotiation (ALPN).</p>
<p>The protocol’s name is returned is an opaque sequence of bytes. It is up to the client
to interpret it.</p>
<p>Requires OpenSSL 1.0.2 or LibreSSL 2.6.1 or newer.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_get0_alpn_selected.html"><code>SSL_get0_alpn_selected</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.set_tlsext_use_srtp" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#2626-2638">source</a><h4 class="code-header">pub fn <a href="#method.set_tlsext_use_srtp" class="fnname">set_tlsext_use_srtp</a>(&amp;mut self, protocols: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Enables the DTLS extension “use_srtp” as defined in RFC5764.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/man1.1.1/man3/SSL_CTX_set_tlsext_use_srtp.html"><code>SSL_set_tlsext_use_srtp</code></a>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_set_tlsext_use_srtp.html"><code>SSL_set_tlsext_use_srtp</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.srtp_profiles" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#2648-2654">source</a><h4 class="code-header">pub fn <a href="#method.srtp_profiles" class="fnname">srtp_profiles</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="struct" href="../stack/struct.StackRef.html" title="struct openssl::stack::StackRef">StackRef</a>&lt;<a class="struct" href="../srtp/struct.SrtpProtectionProfile.html" title="struct openssl::srtp::SrtpProtectionProfile">SrtpProtectionProfile</a>&gt;&gt;</h4></section></summary><div class="docblock"><p>Gets all SRTP profiles that are enabled for handshake via set_tlsext_use_srtp</p>
<p>DTLS extension “use_srtp” as defined in RFC5764 has to be enabled.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/man1.1.1/man3/SSL_CTX_set_tlsext_use_srtp.html"><code>SSL_get_srtp_profiles</code></a>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_get_srtp_profiles.html"><code>SSL_get_srtp_profiles</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.selected_srtp_profile" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#2660-2666">source</a><h4 class="code-header">pub fn <a href="#method.selected_srtp_profile" class="fnname">selected_srtp_profile</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="struct" href="../srtp/struct.SrtpProtectionProfileRef.html" title="struct openssl::srtp::SrtpProtectionProfileRef">SrtpProtectionProfileRef</a>&gt;</h4></section></summary><div class="docblock"><p>Gets the SRTP profile selected by handshake.</p>
<p>DTLS extension “use_srtp” as defined in RFC5764 has to be enabled.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_get_selected_srtp_profile.html"><code>SSL_get_selected_srtp_profile</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.pending" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#2673-2675">source</a><h4 class="code-header">pub fn <a href="#method.pending" class="fnname">pending</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Returns the number of bytes remaining in the currently processed TLS record.</p>
<p>If this is greater than 0, the next call to <code>read</code> will not call down to the underlying
stream.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_pending.html"><code>SSL_pending</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.servername" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#2691-2694">source</a><h4 class="code-header">pub fn <a href="#method.servername" class="fnname">servername</a>(&amp;self, type_: <a class="struct" href="struct.NameType.html" title="struct openssl::ssl::NameType">NameType</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>&gt;</h4></section></summary><div class="docblock"><p>Returns the servername sent by the client via Server Name Indication (SNI).</p>
<p>It is only useful on the server side.</p>
<h5 id="note"><a href="#note">Note</a></h5>
<p>While the SNI specification requires that servernames be valid domain names (and therefore
ASCII), OpenSSL does not enforce this restriction. If the servername provided by the client
is not valid UTF-8, this function will return <code>None</code>. The <code>servername_raw</code> method returns
the raw bytes and does not have this restriction.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_get_servername.html"><code>SSL_get_servername</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.servername_raw" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#2704-2713">source</a><h4 class="code-header">pub fn <a href="#method.servername_raw" class="fnname">servername_raw</a>(&amp;self, type_: <a class="struct" href="struct.NameType.html" title="struct openssl::ssl::NameType">NameType</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]&gt;</h4></section></summary><div class="docblock"><p>Returns the servername sent by the client via Server Name Indication (SNI).</p>
<p>It is only useful on the server side.</p>
<h5 id="note-1"><a href="#note-1">Note</a></h5>
<p>Unlike <code>servername</code>, this method does not require the name be valid UTF-8.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_get_servername.html"><code>SSL_get_servername</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.set_ssl_context" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#2719-2721">source</a><h4 class="code-header">pub fn <a href="#method.set_ssl_context" class="fnname">set_ssl_context</a>(&amp;mut self, ctx: &amp;<a class="struct" href="struct.SslContextRef.html" title="struct openssl::ssl::SslContextRef">SslContextRef</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Changes the context corresponding to the current connection.</p>
<p>It is most commonly used in the Server Name Indication (SNI) callback.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_set_SSL_CTX.html"><code>SSL_set_SSL_CTX</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ssl_context" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#2725-2730">source</a><h4 class="code-header">pub fn <a href="#method.ssl_context" class="fnname">ssl_context</a>(&amp;self) -&gt; &amp;<a class="struct" href="struct.SslContextRef.html" title="struct openssl::ssl::SslContextRef">SslContextRef</a></h4></section></summary><div class="docblock"><p>Returns the context corresponding to the current connection.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_get_SSL_CTX.html"><code>SSL_get_SSL_CTX</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.param_mut" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#2737-2739">source</a><h4 class="code-header">pub fn <a href="#method.param_mut" class="fnname">param_mut</a>(&amp;mut self) -&gt; &amp;mut <a class="struct" href="../x509/verify/struct.X509VerifyParamRef.html" title="struct openssl::x509::verify::X509VerifyParamRef">X509VerifyParamRef</a></h4></section></summary><div class="docblock"><p>Returns a mutable reference to the X509 verification configuration.</p>
<p>Requires OpenSSL 1.0.2 or newer.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_get0_param.html"><code>SSL_get0_param</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.verify_result" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#2743-2745">source</a><h4 class="code-header">pub fn <a href="#method.verify_result" class="fnname">verify_result</a>(&amp;self) -&gt; <a class="struct" href="../x509/struct.X509VerifyResult.html" title="struct openssl::x509::X509VerifyResult">X509VerifyResult</a></h4></section></summary><div class="docblock"><p>Returns the certificate verification result.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_get_verify_result.html"><code>SSL_get_verify_result</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.session" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#2749-2754">source</a><h4 class="code-header">pub fn <a href="#method.session" class="fnname">session</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="struct" href="struct.SslSessionRef.html" title="struct openssl::ssl::SslSessionRef">SslSessionRef</a>&gt;</h4></section></summary><div class="docblock"><p>Returns a shared reference to the SSL session.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_get_session.html"><code>SSL_get_session</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.client_random" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#2764-2768">source</a><h4 class="code-header">pub fn <a href="#method.client_random" class="fnname">client_random</a>(&amp;self, buf: &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Copies the <code>client_random</code> value sent by the client in the TLS handshake into a buffer.</p>
<p>Returns the number of bytes copied, or if the buffer is empty, the size of the <code>client_random</code>
value.</p>
<p>Requires OpenSSL 1.1.0 or LibreSSL 2.7.0 or newer.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_get_client_random.html"><code>SSL_get_client_random</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.server_random" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#2778-2782">source</a><h4 class="code-header">pub fn <a href="#method.server_random" class="fnname">server_random</a>(&amp;self, buf: &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Copies the <code>server_random</code> value sent by the server in the TLS handshake into a buffer.</p>
<p>Returns the number of bytes copied, or if the buffer is empty, the size of the <code>server_random</code>
value.</p>
<p>Requires OpenSSL 1.1.0 or LibreSSL 2.7.0 or newer.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_get_server_random.html"><code>SSL_get_server_random</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.export_keying_material" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#2786-2809">source</a><h4 class="code-header">pub fn <a href="#method.export_keying_material" class="fnname">export_keying_material</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self,<br>&nbsp;&nbsp;&nbsp;&nbsp;out: &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>],<br>&nbsp;&nbsp;&nbsp;&nbsp;label: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;context: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]&gt;<br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Derives keying material for application use in accordance to RFC 5705.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_export_keying_material.html"><code>SSL_export_keying_material</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.export_keying_material_early" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#2819-2837">source</a><h4 class="code-header">pub fn <a href="#method.export_keying_material_early" class="fnname">export_keying_material_early</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self,<br>&nbsp;&nbsp;&nbsp;&nbsp;out: &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>],<br>&nbsp;&nbsp;&nbsp;&nbsp;label: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;context: &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]<br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Derives keying material for application use in accordance to RFC 5705.</p>
<p>This function is only usable with TLSv1.3, wherein there is no distinction between an empty context and no
context. Therefore, unlike <code>export_keying_material</code>, <code>context</code> must always be supplied.</p>
<p>Requires OpenSSL 1.1.1 or newer.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_export_keying_material_early.html"><code>SSL_export_keying_material_early</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.set_session" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#2850-2852">source</a><h4 class="code-header">pub unsafe fn <a href="#method.set_session" class="fnname">set_session</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self,<br>&nbsp;&nbsp;&nbsp;&nbsp;session: &amp;<a class="struct" href="struct.SslSessionRef.html" title="struct openssl::ssl::SslSessionRef">SslSessionRef</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Sets the session to be used.</p>
<p>This should be called before the handshake to attempt to reuse a previously established
session. If the server is not willing to reuse the session, a new one will be transparently
negotiated.</p>
<h5 id="safety"><a href="#safety">Safety</a></h5>
<p>The caller of this method is responsible for ensuring that the session is associated
with the same <code>SslContext</code> as this <code>Ssl</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_set_session.html"><code>SSL_set_session</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.session_reused" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#2856-2858">source</a><h4 class="code-header">pub fn <a href="#method.session_reused" class="fnname">session_reused</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Determines if the session provided to <code>set_session</code> was successfully reused.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_session_reused.html"><code>SSL_session_reused</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.set_status_type" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#2862-2866">source</a><h4 class="code-header">pub fn <a href="#method.set_status_type" class="fnname">set_status_type</a>(&amp;mut self, type_: <a class="struct" href="struct.StatusType.html" title="struct openssl::ssl::StatusType">StatusType</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Sets the status response a client wishes the server to reply with.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_set_tlsext_status_type.html"><code>SSL_set_tlsext_status_type</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.extms_support" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#2873-2880">source</a><h4 class="code-header">pub fn <a href="#method.extms_support" class="fnname">extms_support</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>&gt;</h4></section></summary><div class="docblock"><p>Determines if current session used Extended Master Secret</p>
<p>Returns <code>None</code> if the handshake is still in-progress.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_get_extms_support.html"><code>SSL_get_extms_support</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ocsp_status" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#2885-2896">source</a><h4 class="code-header">pub fn <a href="#method.ocsp_status" class="fnname">ocsp_status</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]&gt;</h4></section></summary><div class="docblock"><p>Returns the server’s OCSP response, if present.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_get_tlsext_status_ocsp_resp.html"><code>SSL_get_tlsext_status_ocsp_resp</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.set_ocsp_status" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#2901-2917">source</a><h4 class="code-header">pub fn <a href="#method.set_ocsp_status" class="fnname">set_ocsp_status</a>(&amp;mut self, response: &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Sets the OCSP response to be returned to the client.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_set_tlsext_status_oscp_resp.html"><code>SSL_set_tlsext_status_oscp_resp</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.is_server" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#2921-2923">source</a><h4 class="code-header">pub fn <a href="#method.is_server" class="fnname">is_server</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Determines if this <code>Ssl</code> is configured for server-side or client-side use.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_is_server.html"><code>SSL_is_server</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.set_ex_data" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#2930-2939">source</a><h4 class="code-header">pub fn <a href="#method.set_ex_data" class="fnname">set_ex_data</a>&lt;T&gt;(&amp;mut self, index: <a class="struct" href="../ex_data/struct.Index.html" title="struct openssl::ex_data::Index">Index</a>&lt;<a class="struct" href="struct.Ssl.html" title="struct openssl::ssl::Ssl">Ssl</a>, T&gt;, data: T)</h4></section></summary><div class="docblock"><p>Sets the extra data at the specified index.</p>
<p>This can be used to provide data to callbacks registered with the context. Use the
<code>Ssl::new_ex_index</code> method to create an <code>Index</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_set_ex_data.html"><code>SSL_set_ex_data</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ex_data" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#2943-2952">source</a><h4 class="code-header">pub fn <a href="#method.ex_data" class="fnname">ex_data</a>&lt;T&gt;(&amp;self, index: <a class="struct" href="../ex_data/struct.Index.html" title="struct openssl::ex_data::Index">Index</a>&lt;<a class="struct" href="struct.Ssl.html" title="struct openssl::ssl::Ssl">Ssl</a>, T&gt;) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T&gt;</h4></section></summary><div class="docblock"><p>Returns a reference to the extra data at the specified index.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_get_ex_data.html"><code>SSL_get_ex_data</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.ex_data_mut" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#2956-2965">source</a><h4 class="code-header">pub fn <a href="#method.ex_data_mut" class="fnname">ex_data_mut</a>&lt;T&gt;(&amp;mut self, index: <a class="struct" href="../ex_data/struct.Index.html" title="struct openssl::ex_data::Index">Index</a>&lt;<a class="struct" href="struct.Ssl.html" title="struct openssl::ssl::Ssl">Ssl</a>, T&gt;) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T&gt;</h4></section></summary><div class="docblock"><p>Returns a mutable reference to the extra data at the specified index.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_get_ex_data.html"><code>SSL_get_ex_data</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.set_max_early_data" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#2972-2978">source</a><h4 class="code-header">pub fn <a href="#method.set_max_early_data" class="fnname">set_max_early_data</a>(&amp;mut self, bytes: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Sets the maximum amount of early data that will be accepted on this connection.</p>
<p>Requires OpenSSL 1.1.1 or LibreSSL 3.4.0 or newer.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_set_max_early_data.html"><code>SSL_set_max_early_data</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.max_early_data" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#2985-2987">source</a><h4 class="code-header">pub fn <a href="#method.max_early_data" class="fnname">max_early_data</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a></h4></section></summary><div class="docblock"><p>Gets the maximum amount of early data that can be sent on this connection.</p>
<p>Requires OpenSSL 1.1.1 or LibreSSL 3.4.0 or newer.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_get_max_early_data.html"><code>SSL_get_max_early_data</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.finished" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#2994-2996">source</a><h4 class="code-header">pub fn <a href="#method.finished" class="fnname">finished</a>(&amp;self, buf: &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Copies the contents of the last Finished message sent to the peer into the provided buffer.</p>
<p>The total size of the message is returned, so this can be used to determine the size of the
buffer required.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_get_finished.html"><code>SSL_get_finished</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.peer_finished" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#3004-3008">source</a><h4 class="code-header">pub fn <a href="#method.peer_finished" class="fnname">peer_finished</a>(&amp;self, buf: &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Copies the contents of the last Finished message received from the peer into the provided
buffer.</p>
<p>The total size of the message is returned, so this can be used to determine the size of the
buffer required.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_get_peer_finished.html"><code>SSL_get_peer_finished</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.is_init_finished" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#3013-3015">source</a><h4 class="code-header">pub fn <a href="#method.is_init_finished" class="fnname">is_init_finished</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Determines if the initial handshake has been completed.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_is_init_finished.html"><code>SSL_is_init_finished</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.client_hello_isv2" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#3024-3026">source</a><h4 class="code-header">pub fn <a href="#method.client_hello_isv2" class="fnname">client_hello_isv2</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></section></summary><div class="docblock"><p>Determines if the client’s hello message is in the SSLv2 format.</p>
<p>This can only be used inside of the client hello callback. Otherwise, <code>false</code> is returned.</p>
<p>Requires OpenSSL 1.1.1 or newer.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_client_hello_isv2.html"><code>SSL_client_hello_isv2</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.client_hello_legacy_version" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#3035-3044">source</a><h4 class="code-header">pub fn <a href="#method.client_hello_legacy_version" class="fnname">client_hello_legacy_version</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="struct.SslVersion.html" title="struct openssl::ssl::SslVersion">SslVersion</a>&gt;</h4></section></summary><div class="docblock"><p>Returns the legacy version field of the client’s hello message.</p>
<p>This can only be used inside of the client hello callback. Otherwise, <code>None</code> is returned.</p>
<p>Requires OpenSSL 1.1.1 or newer.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_client_hello_get0_legacy_version.html"><code>SSL_client_hello_get0_legacy_version</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.client_hello_random" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#3053-3063">source</a><h4 class="code-header">pub fn <a href="#method.client_hello_random" class="fnname">client_hello_random</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]&gt;</h4></section></summary><div class="docblock"><p>Returns the random field of the client’s hello message.</p>
<p>This can only be used inside of the client hello callback. Otherwise, <code>None</code> is returned.</p>
<p>Requires OpenSSL 1.1.1 or newer.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_client_hello_get0_random.html"><code>SSL_client_hello_get0_random</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.client_hello_session_id" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#3072-3082">source</a><h4 class="code-header">pub fn <a href="#method.client_hello_session_id" class="fnname">client_hello_session_id</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]&gt;</h4></section></summary><div class="docblock"><p>Returns the session ID field of the client’s hello message.</p>
<p>This can only be used inside of the client hello callback. Otherwise, <code>None</code> is returned.</p>
<p>Requires OpenSSL 1.1.1 or newer.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_client_hello_get0_session_id.html"><code>SSL_client_hello_get0_session_id</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.client_hello_ciphers" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#3091-3101">source</a><h4 class="code-header">pub fn <a href="#method.client_hello_ciphers" class="fnname">client_hello_ciphers</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]&gt;</h4></section></summary><div class="docblock"><p>Returns the ciphers field of the client’s hello message.</p>
<p>This can only be used inside of the client hello callback. Otherwise, <code>None</code> is returned.</p>
<p>Requires OpenSSL 1.1.1 or newer.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_client_hello_get0_ciphers.html"><code>SSL_client_hello_get0_ciphers</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.bytes_to_cipher_list" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#3109-3136">source</a><h4 class="code-header">pub fn <a href="#method.bytes_to_cipher_list" class="fnname">bytes_to_cipher_list</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;self,<br>&nbsp;&nbsp;&nbsp;&nbsp;bytes: &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>],<br>&nbsp;&nbsp;&nbsp;&nbsp;isv2format: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="struct.CipherLists.html" title="struct openssl::ssl::CipherLists">CipherLists</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Decodes a slice of wire-format cipher suite specification bytes. Unsupported cipher suites
are ignored.</p>
<p>Requires OpenSSL 1.1.1 or newer.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_bytes_to_cipher_list.html"><code>SSL_bytes_to_cipher_list</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.client_hello_compression_methods" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#3145-3155">source</a><h4 class="code-header">pub fn <a href="#method.client_hello_compression_methods" class="fnname">client_hello_compression_methods</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]&gt;</h4></section></summary><div class="docblock"><p>Returns the compression methods field of the client’s hello message.</p>
<p>This can only be used inside of the client hello callback. Otherwise, <code>None</code> is returned.</p>
<p>Requires OpenSSL 1.1.1 or newer.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_client_hello_get0_compression_methods.html"><code>SSL_client_hello_get0_compression_methods</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.set_mtu" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#3159-3161">source</a><h4 class="code-header">pub fn <a href="#method.set_mtu" class="fnname">set_mtu</a>(&amp;mut self, mtu: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Sets the MTU used for DTLS connections.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_set_mtu.html"><code>SSL_set_mtu</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.psk_identity_hint" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#3168-3177">source</a><h4 class="code-header">pub fn <a href="#method.psk_identity_hint" class="fnname">psk_identity_hint</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]&gt;</h4></section></summary><div class="docblock"><p>Returns the PSK identity hint used during connection setup.</p>
<p>May return <code>None</code> if no PSK identity hint was used during the connection setup.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_get_psk_identity_hint.html"><code>SSL_get_psk_identity_hint</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.psk_identity" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#3182-3191">source</a><h4 class="code-header">pub fn <a href="#method.psk_identity" class="fnname">psk_identity</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>]&gt;</h4></section></summary><div class="docblock"><p>Returns the PSK identity used during connection setup.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_get_psk_identity.html"><code>SSL_get_psk_identity</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.add_chain_cert" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#3195-3201">source</a><h4 class="code-header">pub fn <a href="#method.add_chain_cert" class="fnname">add_chain_cert</a>(&amp;mut self, chain: <a class="struct" href="../x509/struct.X509.html" title="struct openssl::x509::X509">X509</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_add0_chain_cert.html"><code>SSL_add0_chain_cert</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.set_method" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#3205-3210">source</a><h4 class="code-header">pub fn <a href="#method.set_method" class="fnname">set_method</a>(&amp;mut self, method: <a class="struct" href="struct.SslMethod.html" title="struct openssl::ssl::SslMethod">SslMethod</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Sets a new default TLS/SSL method for SSL objects</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.set_private_key_file" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#3214-3229">source</a><h4 class="code-header">pub fn <a href="#method.set_private_key_file" class="fnname">set_private_key_file</a>&lt;P:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/std/path/struct.Path.html" title="struct std::path::Path">Path</a>&gt;&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self,<br>&nbsp;&nbsp;&nbsp;&nbsp;path: P,<br>&nbsp;&nbsp;&nbsp;&nbsp;ssl_file_type: <a class="struct" href="struct.SslFiletype.html" title="struct openssl::ssl::SslFiletype">SslFiletype</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Loads the private key from a file.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_use_Private_Key_file.html"><code>SSL_use_Private_Key_file</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.set_private_key" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#3233-3238">source</a><h4 class="code-header">pub fn <a href="#method.set_private_key" class="fnname">set_private_key</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self,<br>&nbsp;&nbsp;&nbsp;&nbsp;pkey: &amp;<a class="struct" href="../pkey/struct.PKeyRef.html" title="struct openssl::pkey::PKeyRef">PKeyRef</a>&lt;<a class="enum" href="../pkey/enum.Private.html" title="enum openssl::pkey::Private">Private</a>&gt;<br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Sets the private key.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_use_PrivateKey.html"><code>SSL_use_PrivateKey</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.set_certificate" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#3242-3247">source</a><h4 class="code-header">pub fn <a href="#method.set_certificate" class="fnname">set_certificate</a>(&amp;mut self, cert: &amp;<a class="struct" href="../x509/struct.X509Ref.html" title="struct openssl::x509::X509Ref">X509Ref</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Sets the certificate</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_use_certificate.html"><code>SSL_use_certificate</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.set_certificate_chain_file" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#3256-3269">source</a><h4 class="code-header">pub fn <a href="#method.set_certificate_chain_file" class="fnname">set_certificate_chain_file</a>&lt;P:&nbsp;<a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/std/path/struct.Path.html" title="struct std::path::Path">Path</a>&gt;&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self,<br>&nbsp;&nbsp;&nbsp;&nbsp;path: P<br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Loads a certificate chain from a file.</p>
<p>The file should contain a sequence of PEM-formatted certificates, the first being the leaf
certificate, and the remainder forming the chain of certificates up to and including the
trusted root certificate.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_use_certificate_chain_file.html"><code>SSL_use_certificate_chain_file</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.add_client_ca" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#3273-3278">source</a><h4 class="code-header">pub fn <a href="#method.add_client_ca" class="fnname">add_client_ca</a>(&amp;mut self, cacert: &amp;<a class="struct" href="../x509/struct.X509Ref.html" title="struct openssl::x509::X509Ref">X509Ref</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Sets ca certificate that client trusted</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_add_client_CA.html"><code>SSL_add_client_CA</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.set_client_ca_list" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#3282-3285">source</a><h4 class="code-header">pub fn <a href="#method.set_client_ca_list" class="fnname">set_client_ca_list</a>(&amp;mut self, list: <a class="struct" href="../stack/struct.Stack.html" title="struct openssl::stack::Stack">Stack</a>&lt;<a class="struct" href="../x509/struct.X509Name.html" title="struct openssl::x509::X509Name">X509Name</a>&gt;)</h4></section></summary><div class="docblock"><p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_set_client_CA_list.html"><code>SSL_set_client_CA_list</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.set_min_proto_version" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#3295-3303">source</a><h4 class="code-header">pub fn <a href="#method.set_min_proto_version" class="fnname">set_min_proto_version</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self,<br>&nbsp;&nbsp;&nbsp;&nbsp;version: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="struct.SslVersion.html" title="struct openssl::ssl::SslVersion">SslVersion</a>&gt;<br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Sets the minimum supported protocol version.</p>
<p>A value of <code>None</code> will enable protocol versions down to the lowest version supported by
OpenSSL.</p>
<p>Requires OpenSSL 1.1.0 or LibreSSL 2.6.1 or newer.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_set_min_proto_version.html"><code>SSL_set_min_proto_version</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.set_max_proto_version" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#3313-3321">source</a><h4 class="code-header">pub fn <a href="#method.set_max_proto_version" class="fnname">set_max_proto_version</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self,<br>&nbsp;&nbsp;&nbsp;&nbsp;version: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="struct.SslVersion.html" title="struct openssl::ssl::SslVersion">SslVersion</a>&gt;<br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Sets the maximum supported protocol version.</p>
<p>A value of <code>None</code> will enable protocol versions up to the highest version supported by
OpenSSL.</p>
<p>Requires OpenSSL 1.1.0 or or LibreSSL 2.6.1 or newer.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_set_max_proto_version.html"><code>SSL_set_max_proto_version</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.set_ciphersuites" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#3333-3342">source</a><h4 class="code-header">pub fn <a href="#method.set_ciphersuites" class="fnname">set_ciphersuites</a>(&amp;mut self, cipher_list: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Sets the list of supported ciphers for the TLSv1.3 protocol.</p>
<p>The <code>set_cipher_list</code> method controls the cipher suites for protocols before TLSv1.3.</p>
<p>The format consists of TLSv1.3 cipher suite names separated by <code>:</code> characters in order of
preference.</p>
<p>Requires OpenSSL 1.1.1 or LibreSSL 3.4.0 or newer.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_set_ciphersuites.html"><code>SSL_set_ciphersuites</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.set_cipher_list" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#3352-3361">source</a><h4 class="code-header">pub fn <a href="#method.set_cipher_list" class="fnname">set_cipher_list</a>(&amp;mut self, cipher_list: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Sets the list of supported ciphers for protocols before TLSv1.3.</p>
<p>The <code>set_ciphersuites</code> method controls the cipher suites for TLSv1.3.</p>
<p>See <a href="https://www.openssl.org/docs/manmaster/apps/ciphers.html"><code>ciphers</code></a> for details on the format.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_set_cipher_list.html"><code>SSL_set_cipher_list</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.set_verify_cert_store" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#3366-3372">source</a><h4 class="code-header">pub fn <a href="#method.set_verify_cert_store" class="fnname">set_verify_cert_store</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;&amp;mut self,<br>&nbsp;&nbsp;&nbsp;&nbsp;cert_store: <a class="struct" href="../x509/store/struct.X509Store.html" title="struct openssl::x509::store::X509Store">X509Store</a><br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Set the certificate store used for certificate verification</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_set_cert_store.html"><code>SSL_set_cert_store</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.set_num_tickets" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#3380-3382">source</a><h4 class="code-header">pub fn <a href="#method.set_num_tickets" class="fnname">set_num_tickets</a>(&amp;mut self, num_tickets: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="../error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Sets the number of TLS 1.3 session tickets that will be sent to a client after a full
handshake.</p>
<p>Requires OpenSSL 1.1.1 or newer.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_set_num_tickets.html"><code>SSL_set_num_tickets</code></a>.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.num_tickets" class="method has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/mod.rs.html#3390-3392">source</a><h4 class="code-header">pub fn <a href="#method.num_tickets" class="fnname">num_tickets</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></h4></section></summary><div class="docblock"><p>Gets the number of TLS 1.3 session tickets that will be sent to a client after a full
handshake.</p>
<p>Requires OpenSSL 1.1.1 or newer.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_get_num_tickets.html"><code>SSL_get_num_tickets</code></a>.</p>
</div></details></div></div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-Deref-for-ConnectConfiguration" class="impl has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/connector.rs.html#205-211">source</a><a href="#impl-Deref-for-ConnectConfiguration" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a> for <a class="struct" href="struct.ConnectConfiguration.html" title="struct openssl::ssl::ConnectConfiguration">ConnectConfiguration</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Target" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Target" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html#associatedtype.Target" class="associatedtype">Target</a> = <a class="struct" href="struct.SslRef.html" title="struct openssl::ssl::SslRef">SslRef</a></h4></section></summary><div class='docblock'>The resulting type after dereferencing.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.deref" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/connector.rs.html#208-210">source</a><a href="#method.deref" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html#tymethod.deref" class="fnname">deref</a>(&amp;self) -&gt; &amp;<a class="struct" href="struct.SslRef.html" title="struct openssl::ssl::SslRef">SslRef</a></h4></section></summary><div class='docblock'>Dereferences the value.</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><section id="impl-DerefMut-for-ConnectConfiguration" class="impl has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/connector.rs.html#213-217">source</a><a href="#impl-DerefMut-for-ConnectConfiguration" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html" title="trait core::ops::deref::DerefMut">DerefMut</a> for <a class="struct" href="struct.ConnectConfiguration.html" title="struct openssl::ssl::ConnectConfiguration">ConnectConfiguration</a></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.deref_mut" class="method trait-impl has-srclink"><a class="srclink rightside" href="../../src/openssl/ssl/connector.rs.html#214-216">source</a><a href="#method.deref_mut" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html#tymethod.deref_mut" class="fnname">deref_mut</a>(&amp;mut self) -&gt; &amp;mut <a class="struct" href="struct.SslRef.html" title="struct openssl::ssl::SslRef">SslRef</a></h4></section></summary><div class='docblock'>Mutably dereferences the value.</div></details></div></details></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><section id="impl-RefUnwindSafe-for-ConnectConfiguration" class="impl has-srclink"><a href="#impl-RefUnwindSafe-for-ConnectConfiguration" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.ConnectConfiguration.html" title="struct openssl::ssl::ConnectConfiguration">ConnectConfiguration</a></h3></section><section id="impl-Send-for-ConnectConfiguration" class="impl has-srclink"><a href="#impl-Send-for-ConnectConfiguration" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.ConnectConfiguration.html" title="struct openssl::ssl::ConnectConfiguration">ConnectConfiguration</a></h3></section><section id="impl-Sync-for-ConnectConfiguration" class="impl has-srclink"><a href="#impl-Sync-for-ConnectConfiguration" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.ConnectConfiguration.html" title="struct openssl::ssl::ConnectConfiguration">ConnectConfiguration</a></h3></section><section id="impl-Unpin-for-ConnectConfiguration" class="impl has-srclink"><a href="#impl-Unpin-for-ConnectConfiguration" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.ConnectConfiguration.html" title="struct openssl::ssl::ConnectConfiguration">ConnectConfiguration</a></h3></section><section id="impl-UnwindSafe-for-ConnectConfiguration" class="impl has-srclink"><a href="#impl-UnwindSafe-for-ConnectConfiguration" class="anchor"></a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.ConnectConfiguration.html" title="struct openssl::ssl::ConnectConfiguration">ConnectConfiguration</a></h3></section></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Any-for-ConnectConfiguration" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#200">source</a><a href="#impl-Any-for-ConnectConfiguration" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#201">source</a><a href="#method.type_id" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-ConnectConfiguration" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211">source</a><a href="#impl-Borrow%3CT%3E-for-ConnectConfiguration" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#213">source</a></span><a href="#method.borrow" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-ConnectConfiguration" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#220">source</a><a href="#impl-BorrowMut%3CT%3E-for-ConnectConfiguration" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/91522" title="Tracking issue for const_borrow">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#221">source</a></span><a href="#method.borrow_mut" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T</h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-ConnectConfiguration" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#733">source</a><a href="#impl-From%3CT%3E-for-ConnectConfiguration" class="anchor"></a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for T</h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#736">source</a></span><a href="#method.from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -&gt; T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-ConnectConfiguration" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#717">source</a><a href="#impl-Into%3CU%3E-for-ConnectConfiguration" class="anchor"></a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt;,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><section id="method.into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#725">source</a></span><a href="#method.into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -&gt; U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p>
<p>That is, this conversion is whatever the implementation of
<code><a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="From">From</a>&lt;T&gt; for U</code> chooses to do.</p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-ConnectConfiguration" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#775">source</a><a href="#impl-TryFrom%3CU%3E-for-ConnectConfiguration" class="anchor"></a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;T&gt;,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error-1" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#781">source</a></span><a href="#method.try_from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, &lt;T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="rustdoc-toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-ConnectConfiguration" class="impl has-srclink"><a class="srclink rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#760">source</a><a href="#impl-TryInto%3CU%3E-for-ConnectConfiguration" class="anchor"></a><h3 class="code-header">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a>&lt;U&gt; for T<span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;,</span></h3></section></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl has-srclink"><a href="#associatedtype.Error" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="rustdoc-toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl has-srclink"><span class="rightside"><span class="since" title="const unstable">const: <a href="https://github.com/rust-lang/rust/issues/88674" title="Tracking issue for const_convert">unstable</a></span> · <a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#766">source</a></span><a href="#method.try_into" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into" class="fnname">try_into</a>(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;U, &lt;U as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;T&gt;&gt;::<a class="associatedtype" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main><div id="rustdoc-vars" data-root-path="../../" data-current-crate="openssl" data-themes="ayu,dark,light" data-resource-suffix="" data-rustdoc-version="1.66.0-nightly (5c8bff74b 2022-10-21)" ></div></body></html>