1
0
mirror of https://github.com/fafhrd91/actix-net synced 2025-01-31 10:22:09 +01:00
actix-net/actix_tls/accept/openssl/reexports/struct.SslAcceptorBuilder.html

326 lines
120 KiB
HTML
Raw Permalink Normal View History

<!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 builder for `SslAcceptor`s."><title>SslAcceptorBuilder in actix_tls::accept::openssl::reexports - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-46f98efaafac5295.ttf.woff2,FiraSans-Regular-018c141bf0843ffd.woff2,FiraSans-Medium-8f9a781e4970d388.woff2,SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2,SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../../../static.files/rustdoc-b778ab399e080a4b.css"><meta name="rustdoc-vars" data-root-path="../../../../" data-static-root-path="../../../../static.files/" data-current-crate="actix_tls" data-themes="" data-resource-suffix="" data-rustdoc-version="1.83.0-nightly (7608018cb 2024-09-29)" data-channel="nightly" data-search-js="search-e056c65ede92db13.js" data-settings-js="settings-805db61a62df4bd2.js" ><script src="../../../../static.files/storage-1d39b6787ed640ff.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../../../static.files/main-54bc299d2a5e4e43.js"></script><noscript><link rel="stylesheet" href="../../../../static.files/noscript-0111fcff984fae8f.css"></noscript><link rel="icon" href="https://actix.rs/favicon.ico"></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" title="show sidebar"></button><a class="logo-container" href="../../../../actix_tls/index.html"><img src="https://actix.rs/img/logo.png" alt=""></a></nav><nav class="sidebar"><div class="sidebar-crate"><a class="logo-container" href="../../../../actix_tls/index.html"><img src="https://actix.rs/img/logo.png" alt="logo"></a><h2><a href="../../../../actix_tls/index.html">actix_<wbr>tls</a><span class="version">3.4.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">SslAcceptor<wbr>Builder</a></h2><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.build" title="build">build</a></li></ul><h3><a href="#deref-methods-SslContextBuilder">Methods from Deref&lt;<wbr>Target=<wbr>SslContext<wbr>Builder&gt;</a></h3><ul class="block deref-methods"><li><a href="#method.add_client_ca" title="add_client_ca">add_client_ca</a></li><li><a href="#method.add_custom_ext" title="add_custom_ext">add_custom_ext</a></li><li><a href="#method.add_extra_chain_cert" title="add_extra_chain_cert">add_extra_chain_cert</a></li><li><a href="#method.as_ptr" title="as_ptr">as_ptr</a></li><li><a href="#method.cert_store" title="cert_store">cert_store</a></li><li><a href="#method.cert_store_mut" title="cert_store_mut">cert_store_mut</a></li><li><a href="#method.check_private_key" title="check_private_key">check_private_key</a></li><li><a href="#method.clear_options" title="clear_options">clear_options</a></li><li><a href="#method.max_proto_version" title="max_proto_version">max_proto_version</a></li><li><a href="#method.min_proto_version" title="min_proto_version">min_proto_version</a></li><li><a href="#method.options" title="options">options</a></li><li><a href="#method.set_alpn_protos" title="set_alpn_protos">set_alpn_protos</a></li><li><a href="#method.set_alpn_select_callback" title="set_alpn_select_callback">set_alpn_select_callback</a></li><li><a href="#method.set_ca_file" title="set_ca_file">set_ca_file</a></li><li><a href="#method.set_cert_store" title="set_cert_store">set_cert_store</a></li><li><a href="#method.set_certificate" title="set_certificate">set_certificate</a></li><li><a href="#method.set_certifica
</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-SslAcceptorBuilder" class="impl"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/connector.rs.html#345">source</a><a href="#impl-SslAcceptorBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.SslAcceptorBuilder.html" title="struct actix_tls::accept::openssl::reexports::SslAcceptorBuilder">SslAcceptorBuilder</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.build" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/connector.rs.html#347">source</a><h4 class="code-header">pub fn <a href="#method.build" class="fn">build</a>(self) -&gt; <a class="struct" href="struct.SslAcceptor.html" title="struct actix_tls::accept::openssl::reexports::SslAcceptor">SslAcceptor</a></h4></section></summary><div class="docblock"><p>Consumes the builder, returning a <code>SslAcceptor</code>.</p>
</div></details></div></details></div><details class="toggle big-toggle" open><summary><h2 id="deref-methods-SslContextBuilder" class="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="https://docs.rs/openssl/0.10/openssl/ssl/struct.SslContextBuilder.html" title="struct openssl::ssl::SslContextBuilder">SslContextBuilder</a>&gt;</span><a href="#deref-methods-SslContextBuilder" class="anchor">§</a></h2></summary><div id="deref-methods-SslContextBuilder-1" class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.as_ptr" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#743">source</a><h4 class="code-header">pub fn <a href="#method.as_ptr" class="fn">as_ptr</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.pointer.html">*mut </a><a class="enum" href="https://docs.rs/openssl-sys/0.9/openssl_sys/openssl/handwritten/types/enum.SSL_CTX.html" title="enum openssl_sys::openssl::handwritten::types::SSL_CTX">SSL_CTX</a></h4></section></summary><div class="docblock"><p>Returns a pointer to the raw OpenSSL value.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_verify" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#749">source</a><h4 class="code-header">pub fn <a href="#method.set_verify" class="fn">set_verify</a>(&amp;mut self, mode: <a class="struct" href="https://docs.rs/openssl/0.10/openssl/ssl/struct.SslVerifyMode.html" title="struct openssl::ssl::SslVerifyMode">SslVerifyMode</a>)</h4></section></summary><div class="docblock"><p>Configures the certificate verification method for new connections.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_verify.html"><code>SSL_CTX_set_verify</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_verify_callback" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#762-764">source</a><h4 class="code-header">pub fn <a href="#method.set_verify_callback" class="fn">set_verify_callback</a>&lt;F&gt;(&amp;mut self, mode: <a class="struct" href="https://docs.rs/openssl/0.10/openssl/ssl/struct.SslVerifyMode.html" title="struct openssl::ssl::SslVerifyMode">SslVerifyMode</a>, verify: F)<div class="where">where
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="https://docs.rs/openssl/0.10/openssl/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>,</div></h4></section></summary><div class="docblock"><p>Configures the certificate verification method for new connections and
registers a verification callback.</p>
<p>The callback is passed a boolean indicating if OpenSSLs internal verification succeeded as
well as a reference to the <code>X509StoreContext</code> which can be used to examine the certificate
chain. It should return a boolean indicating if verification succeeded.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_verify.html"><code>SSL_CTX_set_verify</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_servername_callback" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#781-783">source</a><h4 class="code-header">pub fn <a href="#method.set_servername_callback" class="fn">set_servername_callback</a>&lt;F&gt;(&amp;mut self, callback: F)<div class="where">where
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="https://docs.rs/openssl/0.10/openssl/ssl/struct.SslRef.html" title="struct openssl::ssl::SslRef">SslRef</a>, &amp;mut <a class="struct" href="https://docs.rs/openssl/0.10/openssl/ssl/struct.SslAlert.html" title="struct openssl::ssl::SslAlert">SslAlert</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="https://docs.rs/openssl/0.10/openssl/ssl/struct.SniError.html" title="struct openssl::ssl::SniError">SniError</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>,</div></h4></section></summary><div class="docblock"><p>Configures the server name indication (SNI) callback for new connections.</p>
<p>SNI is used to allow a single server to handle requests for multiple domains, each of which
has its own certificate chain and configuration.</p>
<p>Obtain the server name with the <code>servername</code> method and then set the corresponding context
with <code>set_ssl_context</code></p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_tlsext_servername_callback.html"><code>SSL_CTX_set_tlsext_servername_callback</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_verify_depth" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#807">source</a><h4 class="code-header">pub fn <a href="#method.set_verify_depth" class="fn">set_verify_depth</a>(&amp;mut self, depth: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>)</h4></section></summary><div class="docblock"><p>Sets the certificate verification depth.</p>
<p>If the peers certificate chain is longer than this value, verification will fail.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_verify_depth.html"><code>SSL_CTX_set_verify_depth</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_verify_cert_store" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#818">source</a><h4 class="code-header">pub fn <a href="#method.set_verify_cert_store" class="fn">set_verify_cert_store</a>(
&amp;mut self,
cert_store: <a class="struct" href="https://docs.rs/openssl/0.10/openssl/x509/store/struct.X509Store.html" title="struct openssl::x509::store::X509Store">X509Store</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="https://docs.rs/openssl/0.10/openssl/error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Sets a custom certificate store for verifying peer certificates.</p>
<p>Requires OpenSSL 1.0.2 or newer.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set0_verify_cert_store.html"><code>SSL_CTX_set0_verify_cert_store</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_cert_store" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#830">source</a><h4 class="code-header">pub fn <a href="#method.set_cert_store" class="fn">set_cert_store</a>(&amp;mut self, cert_store: <a class="struct" href="https://docs.rs/openssl/0.10/openssl/x509/store/struct.X509Store.html" title="struct openssl::x509::store::X509Store">X509Store</a>)</h4></section></summary><div class="docblock"><p>Replaces the contexts certificate store.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_cert_store.html"><code>SSL_CTX_set_cert_store</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_read_ahead" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#844">source</a><h4 class="code-header">pub fn <a href="#method.set_read_ahead" class="fn">set_read_ahead</a>(&amp;mut self, read_ahead: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>)</h4></section></summary><div class="docblock"><p>Controls read ahead behavior.</p>
<p>If enabled, OpenSSL will read as much data as is available from the underlying stream,
instead of a single record at a time.</p>
<p>It has no effect when used with DTLS.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_read_ahead.html"><code>SSL_CTX_set_read_ahead</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_mode" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#852">source</a><h4 class="code-header">pub fn <a href="#method.set_mode" class="fn">set_mode</a>(&amp;mut self, mode: <a class="struct" href="https://docs.rs/openssl/0.10/openssl/ssl/struct.SslMode.html" title="struct openssl::ssl::SslMode">SslMode</a>) -&gt; <a class="struct" href="https://docs.rs/openssl/0.10/openssl/ssl/struct.SslMode.html" title="struct openssl::ssl::SslMode">SslMode</a></h4></section></summary><div class="docblock"><p>Sets the mode used by the context, returning the previous mode.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_mode.html"><code>SSL_CTX_set_mode</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_tmp_dh" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#861">source</a><h4 class="code-header">pub fn <a href="#method.set_tmp_dh" class="fn">set_tmp_dh</a>(&amp;mut self, dh: &amp;<a class="struct" href="https://docs.rs/openssl/0.10/openssl/dh/struct.DhRef.html" title="struct openssl::dh::DhRef">DhRef</a>&lt;<a class="enum" href="https://docs.rs/openssl/0.10/openssl/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="https://docs.rs/openssl/0.10/openssl/error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Sets the parameters to be used during ephemeral Diffie-Hellman key exchange.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_tmp_dh.html"><code>SSL_CTX_set_tmp_dh</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_tmp_dh_callback" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#872-874">source</a><h4 class="code-header">pub fn <a href="#method.set_tmp_dh_callback" class="fn">set_tmp_dh_callback</a>&lt;F&gt;(&amp;mut self, callback: F)<div class="where">where
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="https://docs.rs/openssl/0.10/openssl/ssl/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="https://docs.rs/openssl/0.10/openssl/dh/struct.Dh.html" title="struct openssl::dh::Dh">Dh</a>&lt;<a class="enum" href="https://docs.rs/openssl/0.10/openssl/pkey/enum.Params.html" title="enum openssl::pkey::Params">Params</a>&gt;, <a class="struct" href="https://docs.rs/openssl/0.10/openssl/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>,</div></h4></section></summary><div class="docblock"><p>Sets the callback which will generate parameters to be used during ephemeral Diffie-Hellman
key exchange.</p>
<p>The callback is provided with a reference to the <code>Ssl</code> for the session, as well as a boolean
indicating if the selected cipher is export-grade, and the key length. The export and key
length options are archaic and should be ignored in almost all cases.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_tmp_dh_callback.html"><code>SSL_CTX_set_tmp_dh_callback</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_tmp_ecdh" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#888">source</a><h4 class="code-header">pub fn <a href="#method.set_tmp_ecdh" class="fn">set_tmp_ecdh</a>(&amp;mut self, key: &amp;<a class="struct" href="https://docs.rs/openssl/0.10/openssl/ec/struct.EcKeyRef.html" title="struct openssl::ec::EcKeyRef">EcKeyRef</a>&lt;<a class="enum" href="https://docs.rs/openssl/0.10/openssl/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="https://docs.rs/openssl/0.10/openssl/error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Sets the parameters to be used during ephemeral elliptic curve Diffie-Hellman key exchange.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_tmp_ecdh.html"><code>SSL_CTX_set_tmp_ecdh</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_default_verify_paths" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#918">source</a><h4 class="code-header">pub fn <a href="#method.set_default_verify_paths" class="fn">set_default_verify_paths</a>(&amp;mut 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;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://docs.rs/openssl/0.10/openssl/error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Use the default locations of trusted certificates for verification.</p>
<p>These locations are read from the <code>SSL_CERT_FILE</code> and <code>SSL_CERT_DIR</code> environment variables
if present, or defaults specified at OpenSSL build time otherwise.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_default_verify_paths.html"><code>SSL_CTX_set_default_verify_paths</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_ca_file" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#926">source</a><h4 class="code-header">pub fn <a href="#method.set_ca_file" class="fn">set_ca_file</a>&lt;P&gt;(&amp;mut self, file: P) -&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="https://docs.rs/openssl/0.10/openssl/error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;<div class="where">where
P: <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;,</div></h4></section></summary><div class="docblock"><p>Loads trusted root certificates from a file.</p>
<p>The file should contain a sequence of PEM-formatted CA certificates.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_CTX_load_verify_locations.html"><code>SSL_CTX_load_verify_locations</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_client_ca_list" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#943">source</a><h4 class="code-header">pub fn <a href="#method.set_client_ca_list" class="fn">set_client_ca_list</a>(&amp;mut self, list: <a class="struct" href="https://docs.rs/openssl/0.10/openssl/stack/struct.Stack.html" title="struct openssl::stack::Stack">Stack</a>&lt;<a class="struct" href="https://docs.rs/openssl/0.10/openssl/x509/struct.X509Name.html" title="struct openssl::x509::X509Name">X509Name</a>&gt;)</h4></section></summary><div class="docblock"><p>Sets the list of CA names sent to the client.</p>
<p>The CA certificates must still be added to the trust root - they are not automatically set
as trusted by this method.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_client_CA_list.html"><code>SSL_CTX_set_client_CA_list</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.add_client_ca" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#953">source</a><h4 class="code-header">pub fn <a href="#method.add_client_ca" class="fn">add_client_ca</a>(&amp;mut self, cacert: &amp;<a class="struct" href="https://docs.rs/openssl/0.10/openssl/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="https://docs.rs/openssl/0.10/openssl/error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Add the provided CA certificate to the list sent by the server to the client when
requesting client-side TLS authentication.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_CTX_add_client_CA.html"><code>SSL_CTX_add_client_CA</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_session_id_context" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#966">source</a><h4 class="code-header">pub fn <a href="#method.set_session_id_context" class="fn">set_session_id_context</a>(
&amp;mut self,
sid_ctx: &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="https://docs.rs/openssl/0.10/openssl/error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Set the context identifier for sessions.</p>
<p>This value identifies the servers session cache to clients, telling them when theyre
able to reuse sessions. It should be set to a unique value per server, unless multiple
servers share a session cache.</p>
<p>This value should be set when using client certificates, or each request will fail its
handshake and need to be restarted.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_session_id_context.html"><code>SSL_CTX_set_session_id_context</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_certificate_file" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#984-988">source</a><h4 class="code-header">pub fn <a href="#method.set_certificate_file" class="fn">set_certificate_file</a>&lt;P&gt;(
&amp;mut self,
file: P,
file_type: <a class="struct" href="https://docs.rs/openssl/0.10/openssl/ssl/struct.SslFiletype.html" title="struct openssl::ssl::SslFiletype">SslFiletype</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="https://docs.rs/openssl/0.10/openssl/error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;<div class="where">where
P: <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;,</div></h4></section></summary><div class="docblock"><p>Loads a leaf certificate from a file.</p>
<p>Only a single certificate will be loaded - use <code>add_extra_chain_cert</code> to add the remainder
of the certificate chain, or <code>set_certificate_chain_file</code> to load the entire chain from a
single file.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_CTX_use_certificate_file.html"><code>SSL_CTX_use_certificate_file</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_certificate_chain_file" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#1006-1009">source</a><h4 class="code-header">pub fn <a href="#method.set_certificate_chain_file" class="fn">set_certificate_chain_file</a>&lt;P&gt;(
&amp;mut self,
file: P,
) -&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="https://docs.rs/openssl/0.10/openssl/error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;<div class="where">where
P: <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;,</div></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_CTX_use_certificate_chain_file.html"><code>SSL_CTX_use_certificate_chain_file</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_certificate" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#1024">source</a><h4 class="code-header">pub fn <a href="#method.set_certificate" class="fn">set_certificate</a>(&amp;mut self, cert: &amp;<a class="struct" href="https://docs.rs/openssl/0.10/openssl/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="https://docs.rs/openssl/0.10/openssl/error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Sets the leaf certificate.</p>
<p>Use <code>add_extra_chain_cert</code> to add the remainder of the certificate chain.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_CTX_use_certificate.html"><code>SSL_CTX_use_certificate</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.add_extra_chain_cert" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#1033">source</a><h4 class="code-header">pub fn <a href="#method.add_extra_chain_cert" class="fn">add_extra_chain_cert</a>(&amp;mut self, cert: <a class="struct" href="https://docs.rs/openssl/0.10/openssl/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="https://docs.rs/openssl/0.10/openssl/error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Appends a certificate to the certificate chain.</p>
<p>This chain should contain all certificates necessary to go from the certificate specified by
<code>set_certificate</code> to a trusted root.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_CTX_add_extra_chain_cert.html"><code>SSL_CTX_add_extra_chain_cert</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_private_key_file" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#1043-1047">source</a><h4 class="code-header">pub fn <a href="#method.set_private_key_file" class="fn">set_private_key_file</a>&lt;P&gt;(
&amp;mut self,
file: P,
file_type: <a class="struct" href="https://docs.rs/openssl/0.10/openssl/ssl/struct.SslFiletype.html" title="struct openssl::ssl::SslFiletype">SslFiletype</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="https://docs.rs/openssl/0.10/openssl/error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;<div class="where">where
P: <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;,</div></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_CTX_use_PrivateKey_file.html"><code>SSL_CTX_use_PrivateKey_file</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_private_key" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#1061-1063">source</a><h4 class="code-header">pub fn <a href="#method.set_private_key" class="fn">set_private_key</a>&lt;T&gt;(&amp;mut self, key: &amp;<a class="struct" href="https://docs.rs/openssl/0.10/openssl/pkey/struct.PKeyRef.html" title="struct openssl::pkey::PKeyRef">PKeyRef</a>&lt;T&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="https://docs.rs/openssl/0.10/openssl/error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;<div class="where">where
T: <a class="trait" href="https://docs.rs/openssl/0.10/openssl/pkey/trait.HasPrivate.html" title="trait openssl::pkey::HasPrivate">HasPrivate</a>,</div></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_CTX_use_PrivateKey.html"><code>SSL_CTX_use_PrivateKey</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_cipher_list" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#1076">source</a><h4 class="code-header">pub fn <a href="#method.set_cipher_list" class="fn">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="https://docs.rs/openssl/0.10/openssl/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_CTX_set_cipher_list.html"><code>SSL_CTX_set_cipher_list</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_ciphersuites" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#1097">source</a><h4 class="code-header">pub fn <a href="#method.set_ciphersuites" class="fn">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="https://docs.rs/openssl/0.10/openssl/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_CTX_set_ciphersuites.html"><code>SSL_CTX_set_ciphersuites</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_options" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#1124">source</a><h4 class="code-header">pub fn <a href="#method.set_options" class="fn">set_options</a>(&amp;mut self, option: <a class="struct" href="https://docs.rs/openssl/0.10/openssl/ssl/struct.SslOptions.html" title="struct openssl::ssl::SslOptions">SslOptions</a>) -&gt; <a class="struct" href="https://docs.rs/openssl/0.10/openssl/ssl/struct.SslOptions.html" title="struct openssl::ssl::SslOptions">SslOptions</a></h4></section></summary><div class="docblock"><p>Sets the options used by the context, returning the old set.</p>
<h5 id="note"><a class="doc-anchor" href="#note">§</a>Note</h5>
<p>This <em>enables</em> the specified options, but does not disable unspecified options. Use
<code>clear_options</code> for that.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_options.html"><code>SSL_CTX_set_options</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.options" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#1132">source</a><h4 class="code-header">pub fn <a href="#method.options" class="fn">options</a>(&amp;self) -&gt; <a class="struct" href="https://docs.rs/openssl/0.10/openssl/ssl/struct.SslOptions.html" title="struct openssl::ssl::SslOptions">SslOptions</a></h4></section></summary><div class="docblock"><p>Returns the options used by the context.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_CTX_get_options.html"><code>SSL_CTX_get_options</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.clear_options" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#1139">source</a><h4 class="code-header">pub fn <a href="#method.clear_options" class="fn">clear_options</a>(&amp;mut self, option: <a class="struct" href="https://docs.rs/openssl/0.10/openssl/ssl/struct.SslOptions.html" title="struct openssl::ssl::SslOptions">SslOptions</a>) -&gt; <a class="struct" href="https://docs.rs/openssl/0.10/openssl/ssl/struct.SslOptions.html" title="struct openssl::ssl::SslOptions">SslOptions</a></h4></section></summary><div class="docblock"><p>Clears the options used by the context, returning the old set.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_CTX_clear_options.html"><code>SSL_CTX_clear_options</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_min_proto_version" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#1153">source</a><h4 class="code-header">pub fn <a href="#method.set_min_proto_version" class="fn">set_min_proto_version</a>(
&amp;mut self,
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="https://docs.rs/openssl/0.10/openssl/ssl/struct.SslVersion.html" title="struct openssl::ssl::SslVersion">SslVersion</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="https://docs.rs/openssl/0.10/openssl/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 BoringSSL or 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_CTX_set_min_proto_version.html"><code>SSL_CTX_set_min_proto_version</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_max_proto_version" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#1171">source</a><h4 class="code-header">pub fn <a href="#method.set_max_proto_version" class="fn">set_max_proto_version</a>(
&amp;mut self,
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="https://docs.rs/openssl/0.10/openssl/ssl/struct.SslVersion.html" title="struct openssl::ssl::SslVersion">SslVersion</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="https://docs.rs/openssl/0.10/openssl/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 BoringSSL or 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_CTX_set_max_proto_version.html"><code>SSL_CTX_set_max_proto_version</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.min_proto_version" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#1189">source</a><h4 class="code-header">pub fn <a href="#method.min_proto_version" class="fn">min_proto_version</a>(&amp;mut 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="https://docs.rs/openssl/0.10/openssl/ssl/struct.SslVersion.html" title="struct openssl::ssl::SslVersion">SslVersion</a>&gt;</h4></section></summary><div class="docblock"><p>Gets the minimum supported protocol version.</p>
<p>A value of <code>None</code> indicates that all versions down to the lowest version supported by
OpenSSL are enabled.</p>
<p>Requires OpenSSL 1.1.0g or LibreSSL 2.7.0 or newer.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_CTX_get_min_proto_version.html"><code>SSL_CTX_get_min_proto_version</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.max_proto_version" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#1208">source</a><h4 class="code-header">pub fn <a href="#method.max_proto_version" class="fn">max_proto_version</a>(&amp;mut 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="https://docs.rs/openssl/0.10/openssl/ssl/struct.SslVersion.html" title="struct openssl::ssl::SslVersion">SslVersion</a>&gt;</h4></section></summary><div class="docblock"><p>Gets the maximum supported protocol version.</p>
<p>A value of <code>None</code> indicates that all versions up to the highest version supported by
OpenSSL are enabled.</p>
<p>Requires OpenSSL 1.1.0g or LibreSSL 2.7.0 or newer.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_CTX_get_max_proto_version.html"><code>SSL_CTX_get_max_proto_version</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_alpn_protos" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#1229">source</a><h4 class="code-header">pub fn <a href="#method.set_alpn_protos" class="fn">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="https://docs.rs/openssl/0.10/openssl/error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Sets the protocols to sent to the server for Application Layer Protocol Negotiation (ALPN).</p>
<p>The input must be in ALPN “wire format”. It consists of a sequence of supported protocol
names prefixed by their byte length. For example, the protocol list consisting of <code>spdy/1</code>
and <code>http/1.1</code> is encoded as <code>b"\x06spdy/1\x08http/1.1"</code>. The protocols are ordered by
preference.</p>
<p>Requires BoringSSL or 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_CTX_set_alpn_protos.html"><code>SSL_CTX_set_alpn_protos</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_tlsext_use_srtp" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#1248">source</a><h4 class="code-header">pub fn <a href="#method.set_tlsext_use_srtp" class="fn">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="https://docs.rs/openssl/0.10/openssl/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/manmaster/man3/SSL_CTX_set_tlsext_use_srtp.html"><code>SSL_CTX_set_tlsext_use_srtp</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_alpn_select_callback" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#1276-1278">source</a><h4 class="code-header">pub fn <a href="#method.set_alpn_select_callback" class="fn">set_alpn_select_callback</a>&lt;F&gt;(&amp;mut self, callback: F)<div class="where">where
F: for&lt;'a&gt; <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="https://docs.rs/openssl/0.10/openssl/ssl/struct.SslRef.html" title="struct openssl::ssl::SslRef">SslRef</a>, &amp;'a [<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;&amp;'a [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>], <a class="struct" href="struct.AlpnError.html" title="struct actix_tls::accept::openssl::reexports::AlpnError">AlpnError</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>,</div></h4></section></summary><div class="docblock"><p>Sets the callback used by a server to select a protocol for Application Layer Protocol
Negotiation (ALPN).</p>
<p>The callback is provided with the clients protocol list in ALPN wire format. See the
documentation for <a href="struct.SslContextBuilder.html#method.set_alpn_protos"><code>SslContextBuilder::set_alpn_protos</code></a> for details. It should return one
of those protocols on success. The <a href="fn.select_next_proto.html"><code>select_next_proto</code></a> function implements the standard
protocol selection algorithm.</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_CTX_set_alpn_select_cb.html"><code>SSL_CTX_set_alpn_select_cb</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.check_private_key" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#1292">source</a><h4 class="code-header">pub fn <a href="#method.check_private_key" class="fn">check_private_key</a>(&amp;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;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="struct" href="https://docs.rs/openssl/0.10/openssl/error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Checks for consistency between the private key and certificate.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_CTX_check_private_key.html"><code>SSL_CTX_check_private_key</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.cert_store" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#1298">source</a><h4 class="code-header">pub fn <a href="#method.cert_store" class="fn">cert_store</a>(&amp;self) -&gt; &amp;<a class="struct" href="https://docs.rs/openssl/0.10/openssl/x509/store/struct.X509StoreBuilderRef.html" title="struct openssl::x509::store::X509StoreBuilderRef">X509StoreBuilderRef</a></h4></section></summary><div class="docblock"><p>Returns a shared reference to the contexts certificate store.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_CTX_get_cert_store.html"><code>SSL_CTX_get_cert_store</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.cert_store_mut" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#1304">source</a><h4 class="code-header">pub fn <a href="#method.cert_store_mut" class="fn">cert_store_mut</a>(&amp;mut self) -&gt; &amp;mut <a class="struct" href="https://docs.rs/openssl/0.10/openssl/x509/store/struct.X509StoreBuilderRef.html" title="struct openssl::x509::store::X509StoreBuilderRef">X509StoreBuilderRef</a></h4></section></summary><div class="docblock"><p>Returns a mutable reference to the contexts certificate store.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_CTX_get_cert_store.html"><code>SSL_CTX_get_cert_store</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.verify_param" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#1313">source</a><h4 class="code-header">pub fn <a href="#method.verify_param" class="fn">verify_param</a>(&amp;self) -&gt; &amp;<a class="struct" href="https://docs.rs/openssl/0.10/openssl/x509/verify/struct.X509VerifyParamRef.html" title="struct openssl::x509::verify::X509VerifyParamRef">X509VerifyParamRef</a></h4></section></summary><div class="docblock"><p>Returns a reference to the X509 verification configuration.</p>
<p>Requires BoringSSL or OpenSSL 1.0.2 or newer.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_CTX_get0_param.html"><code>SSL_CTX_get0_param</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.verify_param_mut" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#1322">source</a><h4 class="code-header">pub fn <a href="#method.verify_param_mut" class="fn">verify_param_mut</a>(&amp;mut self) -&gt; &amp;mut <a class="struct" href="https://docs.rs/openssl/0.10/openssl/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 BoringSSL or OpenSSL 1.0.2 or newer.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_CTX_get0_param.html"><code>SSL_CTX_get0_param</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_status_callback" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#1339-1341">source</a><h4 class="code-header">pub fn <a href="#method.set_status_callback" class="fn">set_status_callback</a>&lt;F&gt;(&amp;mut self, callback: F) -&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="https://docs.rs/openssl/0.10/openssl/error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;<div class="where">where
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="https://docs.rs/openssl/0.10/openssl/ssl/struct.SslRef.html" title="struct openssl::ssl::SslRef">SslRef</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.bool.html">bool</a>, <a class="struct" href="https://docs.rs/openssl/0.10/openssl/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>,</div></h4></section></summary><div class="docblock"><p>Sets the callback dealing with OCSP stapling.</p>
<p>On the client side, this callback is responsible for validating the OCSP status response
returned by the server. The status may be retrieved with the <code>SslRef::ocsp_status</code> method.
A response of <code>Ok(true)</code> indicates that the OCSP status is valid, and a response of
<code>Ok(false)</code> indicates that the OCSP status is invalid and the handshake should be
terminated.</p>
<p>On the server side, this callback is responsible for setting the OCSP status response to be
returned to clients. The status may be set with the <code>SslRef::set_ocsp_status</code> method. A
response of <code>Ok(true)</code> indicates that the OCSP status should be returned to the client, and
<code>Ok(false)</code> indicates that the status should not be returned to the client.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_tlsext_status_cb.html"><code>SSL_CTX_set_tlsext_status_cb</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_psk_client_callback" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#1360-1365">source</a><h4 class="code-header">pub fn <a href="#method.set_psk_client_callback" class="fn">set_psk_client_callback</a>&lt;F&gt;(&amp;mut self, callback: F)<div class="where">where
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="https://docs.rs/openssl/0.10/openssl/ssl/struct.SslRef.html" title="struct openssl::ssl::SslRef">SslRef</a>, <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;, &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>], &amp;mut [<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.usize.html">usize</a>, <a class="struct" href="https://docs.rs/openssl/0.10/openssl/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>,</div></h4></section></summary><div class="docblock"><p>Sets the callback for providing an identity and pre-shared key for a TLS-PSK client.</p>
<p>The callback will be called with the SSL context, an identity hint if one was provided
by the server, a mutable slice for each of the identity and pre-shared key bytes. The
identity must be written as a null-terminated C string.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_psk_client_callback.html"><code>SSL_CTX_set_psk_client_callback</code></a>.</p>
</div></details><section id="method.set_psk_callback" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#1375-1380">source</a><h4 class="code-header">pub fn <a href="#method.set_psk_callback" class="fn">set_psk_callback</a>&lt;F&gt;(&amp;mut self, callback: F)<div class="where">where
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="https://docs.rs/openssl/0.10/openssl/ssl/struct.SslRef.html" title="struct openssl::ssl::SslRef">SslRef</a>, <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;, &amp;mut [<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>], &amp;mut [<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.usize.html">usize</a>, <a class="struct" href="https://docs.rs/openssl/0.10/openssl/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>,</div></h4></section><span class="item-info"><div class="stab deprecated"><span class="emoji">👎</span><span>Deprecated since 0.10.10: renamed to <code>set_psk_client_callback</code></span></div></span><details class="toggle method-toggle" open><summary><section id="method.set_psk_server_callback" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#1392-1397">source</a><h4 class="code-header">pub fn <a href="#method.set_psk_server_callback" class="fn">set_psk_server_callback</a>&lt;F&gt;(&amp;mut self, callback: F)<div class="where">where
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="https://docs.rs/openssl/0.10/openssl/ssl/struct.SslRef.html" title="struct openssl::ssl::SslRef">SslRef</a>, <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;, &amp;mut [<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.usize.html">usize</a>, <a class="struct" href="https://docs.rs/openssl/0.10/openssl/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>,</div></h4></section></summary><div class="docblock"><p>Sets the callback for providing an identity and pre-shared key for a TLS-PSK server.</p>
<p>The callback will be called with the SSL context, an identity provided by the client,
and, a mutable slice for the pre-shared key bytes. The callback returns the number of
bytes in the pre-shared key.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_psk_server_callback.html"><code>SSL_CTX_set_psk_server_callback</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_new_session_callback" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#1419-1421">source</a><h4 class="code-header">pub fn <a href="#method.set_new_session_callback" class="fn">set_new_session_callback</a>&lt;F&gt;(&amp;mut self, callback: F)<div class="where">where
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="https://docs.rs/openssl/0.10/openssl/ssl/struct.SslRef.html" title="struct openssl::ssl::SslRef">SslRef</a>, <a class="struct" href="https://docs.rs/openssl/0.10/openssl/ssl/struct.SslSession.html" title="struct openssl::ssl::SslSession">SslSession</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>,</div></h4></section></summary><div class="docblock"><p>Sets the callback which is called when new sessions are negotiated.</p>
<p>This can be used by clients to implement session caching. While in TLSv1.2 the session is
available to access via <a href="struct.SslRef.html#method.session"><code>SslRef::session</code></a> immediately after the handshake completes, this
is not the case for TLSv1.3. There, a session is not generally available immediately, and
the server may provide multiple session tokens to the client over a single session. The new
session callback is a portable way to deal with both cases.</p>
<p>Note that session caching must be enabled for the callback to be invoked, and it defaults
off for clients. <a href="#method.set_session_cache_mode"><code>set_session_cache_mode</code></a> controls that behavior.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_CTX_sess_set_new_cb.html"><code>SSL_CTX_sess_set_new_cb</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_remove_session_callback" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#1433-1435">source</a><h4 class="code-header">pub fn <a href="#method.set_remove_session_callback" class="fn">set_remove_session_callback</a>&lt;F&gt;(&amp;mut self, callback: F)<div class="where">where
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;<a class="struct" href="https://docs.rs/openssl/0.10/openssl/ssl/struct.SslContextRef.html" title="struct openssl::ssl::SslContextRef">SslContextRef</a>, &amp;<a class="struct" href="https://docs.rs/openssl/0.10/openssl/ssl/struct.SslSessionRef.html" title="struct openssl::ssl::SslSessionRef">SslSessionRef</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>,</div></h4></section></summary><div class="docblock"><p>Sets the callback which is called when sessions are removed from the context.</p>
<p>Sessions can be removed because they have timed out or because they are considered faulty.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_CTX_sess_set_remove_cb.html"><code>SSL_CTX_sess_set_remove_cb</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_get_session_callback" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#1457-1459">source</a><h4 class="code-header">pub unsafe fn <a href="#method.set_get_session_callback" class="fn">set_get_session_callback</a>&lt;F&gt;(&amp;mut self, callback: F)<div class="where">where
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="https://docs.rs/openssl/0.10/openssl/ssl/struct.SslRef.html" title="struct openssl::ssl::SslRef">SslRef</a>, &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/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="https://docs.rs/openssl/0.10/openssl/ssl/struct.SslSession.html" title="struct openssl::ssl::SslSession">SslSession</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>,</div></h4></section></summary><div class="docblock"><p>Sets the callback which is called when a client proposed to resume a session but it was not
found in the internal cache.</p>
<p>The callback is passed a reference to the session ID provided by the client. It should
return the session corresponding to that ID if available. This is only used for servers, not
clients.</p>
<h5 id="safety"><a class="doc-anchor" href="#safety">§</a>Safety</h5>
<p>The returned <code>SslSession</code> must not be associated with a different <code>SslContext</code>.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_CTX_sess_set_get_cb.html"><code>SSL_CTX_sess_set_get_cb</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_keylog_callback" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#1474-1476">source</a><h4 class="code-header">pub fn <a href="#method.set_keylog_callback" class="fn">set_keylog_callback</a>&lt;F&gt;(&amp;mut self, callback: F)<div class="where">where
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;<a class="struct" href="https://docs.rs/openssl/0.10/openssl/ssl/struct.SslRef.html" title="struct openssl::ssl::SslRef">SslRef</a>, &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</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>,</div></h4></section></summary><div class="docblock"><p>Sets the TLS key logging callback.</p>
<p>The callback is invoked whenever TLS key material is generated, and is passed a line of NSS
SSLKEYLOGFILE-formatted text. This can be used by tools like Wireshark to decrypt message
traffic. The line does not contain a trailing newline.</p>
<p>Requires OpenSSL 1.1.1 or newer.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_keylog_callback.html"><code>SSL_CTX_set_keylog_callback</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_session_cache_mode" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#1488">source</a><h4 class="code-header">pub fn <a href="#method.set_session_cache_mode" class="fn">set_session_cache_mode</a>(
&amp;mut self,
mode: <a class="struct" href="https://docs.rs/openssl/0.10/openssl/ssl/struct.SslSessionCacheMode.html" title="struct openssl::ssl::SslSessionCacheMode">SslSessionCacheMode</a>,
) -&gt; <a class="struct" href="https://docs.rs/openssl/0.10/openssl/ssl/struct.SslSessionCacheMode.html" title="struct openssl::ssl::SslSessionCacheMode">SslSessionCacheMode</a></h4></section></summary><div class="docblock"><p>Sets the session caching mode use for connections made with the context.</p>
<p>Returns the previous session caching mode.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_session_cache_mode.html"><code>SSL_CTX_set_session_cache_mode</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_stateless_cookie_generate_cb" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#1502-1504">source</a><h4 class="code-header">pub fn <a href="#method.set_stateless_cookie_generate_cb" class="fn">set_stateless_cookie_generate_cb</a>&lt;F&gt;(&amp;mut self, callback: F)<div class="where">where
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="https://docs.rs/openssl/0.10/openssl/ssl/struct.SslRef.html" title="struct openssl::ssl::SslRef">SslRef</a>, &amp;mut [<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.usize.html">usize</a>, <a class="struct" href="https://docs.rs/openssl/0.10/openssl/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>,</div></h4></section></summary><div class="docblock"><p>Sets the callback for generating an application cookie for TLS1.3
stateless handshakes.</p>
<p>The callback will be called with the SSL context and a slice into which the cookie
should be written. The callback should return the number of bytes written.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_stateless_cookie_generate_cb.html"><code>SSL_CTX_set_stateless_cookie_generate_cb</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_stateless_cookie_verify_cb" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#1525-1527">source</a><h4 class="code-header">pub fn <a href="#method.set_stateless_cookie_verify_cb" class="fn">set_stateless_cookie_verify_cb</a>&lt;F&gt;(&amp;mut self, callback: F)<div class="where">where
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="https://docs.rs/openssl/0.10/openssl/ssl/struct.SslRef.html" title="struct openssl::ssl::SslRef">SslRef</a>, &amp;[<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.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>,</div></h4></section></summary><div class="docblock"><p>Sets the callback for verifying an application cookie for TLS1.3
stateless handshakes.</p>
<p>The callback will be called with the SSL context and the cookie supplied by the
client. It should return true if and only if the cookie is valid.</p>
<p>Note that the OpenSSL implementation independently verifies the integrity of
application cookies using an HMAC before invoking the supplied callback.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_stateless_cookie_verify_cb.html"><code>SSL_CTX_set_stateless_cookie_verify_cb</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_cookie_generate_cb" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#1544-1546">source</a><h4 class="code-header">pub fn <a href="#method.set_cookie_generate_cb" class="fn">set_cookie_generate_cb</a>&lt;F&gt;(&amp;mut self, callback: F)<div class="where">where
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="https://docs.rs/openssl/0.10/openssl/ssl/struct.SslRef.html" title="struct openssl::ssl::SslRef">SslRef</a>, &amp;mut [<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.usize.html">usize</a>, <a class="struct" href="https://docs.rs/openssl/0.10/openssl/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>,</div></h4></section></summary><div class="docblock"><p>Sets the callback for generating a DTLSv1 cookie</p>
<p>The callback will be called with the SSL context and a slice into which the cookie
should be written. The callback should return the number of bytes written.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_cookie_generate_cb.html"><code>SSL_CTX_set_cookie_generate_cb</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_cookie_verify_cb" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#1560-1562">source</a><h4 class="code-header">pub fn <a href="#method.set_cookie_verify_cb" class="fn">set_cookie_verify_cb</a>&lt;F&gt;(&amp;mut self, callback: F)<div class="where">where
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="https://docs.rs/openssl/0.10/openssl/ssl/struct.SslRef.html" title="struct openssl::ssl::SslRef">SslRef</a>, &amp;[<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.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>,</div></h4></section></summary><div class="docblock"><p>Sets the callback for verifying a DTLSv1 cookie</p>
<p>The callback will be called with the SSL context and the cookie supplied by the
client. It should return true if and only if the cookie is valid.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_cookie_verify_cb.html"><code>SSL_CTX_set_cookie_verify_cb</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_ex_data" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#1576">source</a><h4 class="code-header">pub fn <a href="#method.set_ex_data" class="fn">set_ex_data</a>&lt;T&gt;(&amp;mut self, index: <a class="struct" href="https://docs.rs/openssl/0.10/openssl/ex_data/struct.Index.html" title="struct openssl::ex_data::Index">Index</a>&lt;<a class="struct" href="https://docs.rs/openssl/0.10/openssl/ssl/struct.SslContext.html" title="struct openssl::ssl::SslContext">SslContext</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>SslContext::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_CTX_set_ex_data.html"><code>SSL_CTX_set_ex_data</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.add_custom_ext" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#1610-1635">source</a><h4 class="code-header">pub fn <a href="#method.add_custom_ext" class="fn">add_custom_ext</a>&lt;AddFn, ParseFn, T&gt;(
&amp;mut self,
ext_type: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>,
context: <a class="struct" href="https://docs.rs/openssl/0.10/openssl/ssl/struct.ExtensionContext.html" title="struct openssl::ssl::ExtensionContext">ExtensionContext</a>,
add_cb: AddFn,
parse_cb: ParseFn,
) -&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="https://docs.rs/openssl/0.10/openssl/error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;<div class="where">where
AddFn: <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="https://docs.rs/openssl/0.10/openssl/ssl/struct.SslRef.html" title="struct openssl::ssl::SslRef">SslRef</a>, <a class="struct" href="https://docs.rs/openssl/0.10/openssl/ssl/struct.ExtensionContext.html" title="struct openssl::ssl::ExtensionContext">ExtensionContext</a>, <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.usize.html">usize</a>, &amp;<a class="struct" href="https://docs.rs/openssl/0.10/openssl/x509/struct.X509Ref.html" title="struct openssl::x509::X509Ref">X509Ref</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="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;T&gt;, <a class="struct" href="https://docs.rs/openssl/0.10/openssl/ssl/struct.SslAlert.html" title="struct openssl::ssl::SslAlert">SslAlert</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>,
T: <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="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</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>,
ParseFn: <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="https://docs.rs/openssl/0.10/openssl/ssl/struct.SslRef.html" title="struct openssl::ssl::SslRef">SslRef</a>, <a class="struct" href="https://docs.rs/openssl/0.10/openssl/ssl/struct.ExtensionContext.html" title="struct openssl::ssl::ExtensionContext">ExtensionContext</a>, &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>], <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.usize.html">usize</a>, &amp;<a class="struct" href="https://docs.rs/openssl/0.10/openssl/x509/struct.X509Ref.html" title="struct openssl::x509::X509Ref">X509Ref</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="https://docs.rs/openssl/0.10/openssl/ssl/struct.SslAlert.html" title="struct openssl::ssl::SslAlert">SslAlert</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>,</div></h4></section></summary><div class="docblock"><p>Adds a custom extension for a TLS/DTLS client or server for all supported protocol versions.</p>
<p>Requires OpenSSL 1.1.1 or newer.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_CTX_add_custom_ext.html"><code>SSL_CTX_add_custom_ext</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_max_early_data" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#1666">source</a><h4 class="code-header">pub fn <a href="#method.set_max_early_data" class="fn">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="https://docs.rs/openssl/0.10/openssl/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 incoming connections.</p>
<p>Defaults to 0.</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_CTX_set_max_early_data.html"><code>SSL_CTX_set_max_early_data</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_client_hello_callback" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#1679-1684">source</a><h4 class="code-header">pub fn <a href="#method.set_client_hello_callback" class="fn">set_client_hello_callback</a>&lt;F&gt;(&amp;mut self, callback: F)<div class="where">where
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="https://docs.rs/openssl/0.10/openssl/ssl/struct.SslRef.html" title="struct openssl::ssl::SslRef">SslRef</a>, &amp;mut <a class="struct" href="https://docs.rs/openssl/0.10/openssl/ssl/struct.SslAlert.html" title="struct openssl::ssl::SslAlert">SslAlert</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="https://docs.rs/openssl/0.10/openssl/ssl/struct.ClientHelloResponse.html" title="struct openssl::ssl::ClientHelloResponse">ClientHelloResponse</a>, <a class="struct" href="https://docs.rs/openssl/0.10/openssl/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>,</div></h4></section></summary><div class="docblock"><p>Sets a callback which will be invoked just after the clients hello message is received.</p>
<p>Requires OpenSSL 1.1.1 or newer.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_client_hello_cb.html"><code>SSL_CTX_set_client_hello_cb</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_session_cache_size" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#1701">source</a><h4 class="code-header">pub fn <a href="#method.set_session_cache_size" class="fn">set_session_cache_size</a>(&amp;mut self, size: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a></h4></section></summary><div class="docblock"><p>Sets the contexts session cache size limit, returning the previous limit.</p>
<p>A value of 0 means that the cache size is unbounded.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_CTX_sess_set_cache_size.html"><code>SSL_CTX_sess_set_cache_size</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_sigalgs_list" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#1712">source</a><h4 class="code-header">pub fn <a href="#method.set_sigalgs_list" class="fn">set_sigalgs_list</a>(&amp;mut self, sigalgs: &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="https://docs.rs/openssl/0.10/openssl/error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Sets the contexts supported signature algorithms.</p>
<p>Requires OpenSSL 1.0.2 or newer.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set1_sigalgs_list.html"><code>SSL_CTX_set1_sigalgs_list</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_groups_list" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#1725">source</a><h4 class="code-header">pub fn <a href="#method.set_groups_list" class="fn">set_groups_list</a>(&amp;mut self, groups: &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="https://docs.rs/openssl/0.10/openssl/error/struct.ErrorStack.html" title="struct openssl::error::ErrorStack">ErrorStack</a>&gt;</h4></section></summary><div class="docblock"><p>Sets the contexts supported elliptic curve groups.</p>
<p>Requires BoringSSL or OpenSSL 1.1.1 or LibreSSL 2.5.1 or newer.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set1_groups_list.html"><code>SSL_CTX_set1_groups_list</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_num_tickets" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#1738">source</a><h4 class="code-header">pub fn <a href="#method.set_num_tickets" class="fn">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="https://docs.rs/openssl/0.10/openssl/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_CTX_set_num_tickets.html"><code>SSL_CTX_set_num_tickets</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_security_level" class="method"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/mod.rs.html#1748">source</a><h4 class="code-header">pub fn <a href="#method.set_security_level" class="fn">set_security_level</a>(&amp;mut self, level: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>)</h4></section></summary><div class="docblock"><p>Set the contexts security level to a value between 0 and 5, inclusive.
A security value of 0 allows allows all parameters and algorithms.</p>
<p>Requires OpenSSL 1.1.0 or newer.</p>
<p>This corresponds to <a href="https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_security_level.html"><code>SSL_CTX_set_security_level</code></a>.</p>
</div></details></div></details><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Deref-for-SslAcceptorBuilder" class="impl"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/connector.rs.html#352">source</a><a href="#impl-Deref-for-SslAcceptorBuilder" 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.SslAcceptorBuilder.html" title="struct actix_tls::accept::openssl::reexports::SslAcceptorBuilder">SslAcceptorBuilder</a></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Target" class="associatedtype trait-impl"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/connector.rs.html#353">source</a><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="https://docs.rs/openssl/0.10/openssl/ssl/struct.SslContextBuilder.html" title="struct openssl::ssl::SslContextBuilder">SslContextBuilder</a></h4></section></summary><div class='docblock'>The resulting type after dereferencing.</div></details><details class="toggle method-toggle" open><summary><section id="method.deref" class="method trait-impl"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/connector.rs.html#355">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="fn">deref</a>(&amp;self) -&gt; &amp;<a class="struct" href="https://docs.rs/openssl/0.10/openssl/ssl/struct.SslContextBuilder.html" title="struct openssl::ssl::SslContextBuilder">SslContextBuilder</a></h4></section></summary><div class='docblock'>Dereferences the value.</div></details></div></details><details class="toggle implementors-toggle" open><summary><section id="impl-DerefMut-for-SslAcceptorBuilder" class="impl"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/connector.rs.html#360">source</a><a href="#impl-DerefMut-for-SslAcceptorBuilder" 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.SslAcceptorBuilder.html" title="struct actix_tls::accept::openssl::reexports::SslAcceptorBuilder">SslAcceptorBuilder</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.deref_mut" class="method trait-impl"><a class="src rightside" href="https://docs.rs/openssl/0.10/src/openssl/ssl/connector.rs.html#361">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="fn">deref_mut</a>(&amp;mut self) -&gt; &amp;mut <a class="struct" href="https://docs.rs/openssl/0.10/openssl/ssl/struct.SslContextBuilder.html" title="struct openssl::ssl::SslContextBuilder">SslContextBuilder</a></h4></section></summary><div class='docblock'>Mutably dereferences the value.</div></details></div></details></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-Freeze-for-SslAcceptorBuilder" class="impl"><a href="#impl-Freeze-for-SslAcceptorBuilder" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Freeze.html"
T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#139">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="fn">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="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#209">source</a><a href="#impl-Borrow%3CT%3E-for-T" 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<div class="where">where
T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#211">source</a><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="fn">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;T</a></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="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217">source</a><a href="#impl-BorrowMut%3CT%3E-for-T" 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<div class="where">where
T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218">source</a><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="fn">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut T</a></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="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#765">source</a><a href="#impl-From%3CT%3E-for-T" 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="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#768">source</a><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="fn">from</a>(t: T) -&gt; T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p>
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Instrument-for-T" class="impl"><a href="#impl-Instrument-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; Instrument for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.instrument" class="method trait-impl"><a href="#method.instrument" class="anchor">§</a><h4 class="code-header">fn <a class="fn">instrument</a>(self, span: Span) -&gt; Instrumented&lt;Self&gt;</h4></section></summary><div class='docblock'>Instruments this type with the provided [<code>Span</code>], returning an
<code>Instrumented</code> wrapper. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.in_current_span" class="method trait-impl"><a href="#method.in_current_span" class="anchor">§</a><h4 class="code-header">fn <a class="fn">in_current_span</a>(self) -&gt; Instrumented&lt;Self&gt;</h4></section></summary><div class='docblock'>Instruments this type with the <a href="super::Span::current()">current</a> <a href="crate::Span"><code>Span</code></a>, returning an
<code>Instrumented</code> wrapper. <a>Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#748-750">source</a><a href="#impl-Into%3CU%3E-for-T" 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<div class="where">where
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;,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#758">source</a><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="fn">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="trait core::convert::From">From</a>&lt;T&gt; for U</code> chooses to do.</p>
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#805-807">source</a><a href="#impl-TryFrom%3CU%3E-for-T" 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<div class="where">where
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;,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#809">source</a><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="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#812">source</a><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="fn">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="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#790-792">source</a><a href="#impl-TryInto%3CU%3E-for-T" 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<div class="where">where
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;,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#794">source</a><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="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#797">source</a><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="fn">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><details class="toggle implementors-toggle"><summary><section id="impl-WithSubscriber-for-T" class="impl"><a href="#impl-WithSubscriber-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; WithSubscriber for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.with_subscriber" class="method trait-impl"><a href="#method.with_subscriber" class="anchor">§</a><h4 class="code-header">fn <a class="fn">with_subscriber</a>&lt;S&gt;(self, subscriber: S) -&gt; WithDispatch&lt;Self&gt;<div class="where">where
S: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;Dispatch&gt;,</div></h4></section></summary><div class='docblock'>Attaches the provided <a href="super::Subscriber"><code>Subscriber</code></a> to this type, returning a
[<code>WithDispatch</code>] wrapper. <a>Read more</a></div></details><details class="toggle method-toggle" open><summary><section id="method.with_current_subscriber" class="method trait-impl"><a href="#method.with_current_subscriber" class="anchor">§</a><h4 class="code-header">fn <a class="fn">with_current_subscriber</a>(self) -&gt; WithDispatch&lt;Self&gt;</h4></section></summary><div class='docblock'>Attaches the current <a href="crate::dispatcher#setting-the-default-subscriber">default</a> <a href="super::Subscriber"><code>Subscriber</code></a> to this type, returning a
[<code>WithDispatch</code>] wrapper. <a>Read more</a></div></details></div></details></div></section></div></main></body></html>