juniper/openssl/ssl/struct.Ssl.html
Juniper Documentation Builder 95d942c9d4 Update documentation for Juniper
2016-09-11 18:41:24 +00:00

171 lines
No EOL
17 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="rustdoc">
<meta name="description" content="API documentation for the Rust `Ssl` struct in crate `openssl`.">
<meta name="keywords" content="rust, rustlang, rust-lang, Ssl">
<title>openssl::ssl::Ssl - Rust</title>
<link rel="stylesheet" type="text/css" href="../../rustdoc.css">
<link rel="stylesheet" type="text/css" href="../../main.css">
</head>
<body class="rustdoc">
<!--[if lte IE 8]>
<div class="warning">
This old browser is unsupported and will most likely display funky
things.
</div>
<![endif]-->
<nav class="sidebar">
<p class='location'><a href='../index.html'>openssl</a>::<wbr><a href='index.html'>ssl</a></p><script>window.sidebarCurrent = {name: 'Ssl', ty: 'struct', relpath: ''};</script><script defer src="sidebar-items.js"></script>
</nav>
<nav class="sub">
<form class="search-form js-only">
<div class="search-container">
<input class="search-input" name="search"
autocomplete="off"
placeholder="Click or press S to search, ? for more options…"
type="search">
</div>
</form>
</nav>
<section id='main' class="content struct">
<h1 class='fqn'><span class='in-band'>Struct <a href='../index.html'>openssl</a>::<wbr><a href='index.html'>ssl</a>::<wbr><a class='struct' href=''>Ssl</a></span><span class='out-of-band'><span id='render-detail'>
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
[<span class='inner'>&#x2212;</span>]
</a>
</span><a id='src-2719' class='srclink' href='../../src/openssl/ssl/mod.rs.html#917-919' title='goto source code'>[src]</a></span></h1>
<pre class='rust struct'>pub struct Ssl {
// some fields omitted
}</pre><h2 id='methods'>Methods</h2><h3 class='impl'><span class='in-band'><code>impl <a class='struct' href='../../openssl/ssl/struct.Ssl.html' title='openssl::ssl::Ssl'>Ssl</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-2733' class='srclink' href='../../src/openssl/ssl/mod.rs.html#947-1191' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.new' class='method'><code>fn <a href='#method.new' class='fnname'>new</a>(ctx: &amp;<a class='struct' href='../../openssl/ssl/struct.SslContext.html' title='openssl::ssl::SslContext'>SslContext</a>) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/result/enum.Result.html' title='core::result::Result'>Result</a>&lt;<a class='struct' href='../../openssl/ssl/struct.Ssl.html' title='openssl::ssl::Ssl'>Ssl</a>,&nbsp;<a class='enum' href='../../openssl/ssl/error/enum.SslError.html' title='openssl::ssl::error::SslError'>SslError</a>&gt;</code></h4>
<h4 id='method.set_verify' class='method'><code>fn <a href='#method.set_verify' class='fnname'>set_verify</a>(&amp;mut self, mode: <a class='struct' href='../../openssl/ssl/struct.SslVerifyMode.html' title='openssl::ssl::SslVerifyMode'>SslVerifyMode</a>)</code></h4>
<div class='docblock'><p>Sets the verification mode to be used during the handshake process.</p>
<p>Use <code>set_verify_callback</code> to additionally add a callback.</p>
</div><h4 id='method.set_verify_callback' class='method'><code>fn <a href='#method.set_verify_callback' class='fnname'>set_verify_callback</a>&lt;F&gt;(&amp;mut self, mode: <a class='struct' href='../../openssl/ssl/struct.SslVerifyMode.html' title='openssl::ssl::SslVerifyMode'>SslVerifyMode</a>, verify: F) <span class='where'>where F: <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Fn.html' title='core::ops::Fn'>Fn</a>(<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a>, &amp;<a class='struct' href='../../openssl/x509/struct.X509StoreContext.html' title='openssl::x509::X509StoreContext'>X509StoreContext</a>) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.bool.html'>bool</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/any/trait.Any.html' title='core::any::Any'>Any</a> + 'static + <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html' title='core::marker::Sync'>Sync</a> + <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Send.html' title='core::marker::Send'>Send</a></span></code></h4>
<div class='docblock'><p>Sets the certificate verification callback to be used during the
handshake process.</p>
<p>The callback is provided with a boolean indicating if the
preveification process was successful, and an object providing access
to the certificate chain. It should return <code>true</code> if the certificate
chain is valid and <code>false</code> otherwise.</p>
</div><h4 id='method.get_current_cipher' class='method'><code>fn <a href='#method.get_current_cipher' class='fnname'>get_current_cipher</a>&lt;'a&gt;(&amp;'a self) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a class='struct' href='../../openssl/ssl/struct.SslCipher.html' title='openssl::ssl::SslCipher'>SslCipher</a>&lt;'a&gt;&gt;</code></h4>
<h4 id='method.state_string' class='method'><code>fn <a href='#method.state_string' class='fnname'>state_string</a>(&amp;self) -&gt; &amp;'static <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a></code></h4>
<h4 id='method.state_string_long' class='method'><code>fn <a href='#method.state_string_long' class='fnname'>state_string_long</a>(&amp;self) -&gt; &amp;'static <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a></code></h4>
<h4 id='method.set_hostname' class='method'><code>fn <a href='#method.set_hostname' class='fnname'>set_hostname</a>(&amp;self, hostname: &amp;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a>) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/result/enum.Result.html' title='core::result::Result'>Result</a>&lt;<a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.tuple.html'>()</a>,&nbsp;<a class='enum' href='../../openssl/ssl/error/enum.SslError.html' title='openssl::ssl::error::SslError'>SslError</a>&gt;</code></h4>
<div class='docblock'><p>Sets the host name to be used with SNI (Server Name Indication).</p>
</div><h4 id='method.peer_certificate' class='method'><code>fn <a href='#method.peer_certificate' class='fnname'>peer_certificate</a>(&amp;self) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a class='struct' href='../../openssl/x509/struct.X509.html' title='openssl::x509::X509'>X509</a>&gt;</code></h4>
<div class='docblock'><p>Returns the certificate of the peer, if present.</p>
</div><h4 id='method.version' class='method'><code>fn <a href='#method.version' class='fnname'>version</a>(&amp;self) -&gt; &amp;'static <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.str.html'>str</a></code></h4>
<div class='docblock'><p>Returns the name of the protocol used for the connection, e.g. &quot;TLSv1.2&quot;, &quot;SSLv3&quot;, etc.</p>
</div><h4 id='method.pending' class='method'><code>fn <a href='#method.pending' class='fnname'>pending</a>(&amp;self) -&gt; <a class='primitive' href='https://doc.rust-lang.org/nightly/std/primitive.usize.html'>usize</a></code></h4>
<div class='docblock'><p>Returns the number of bytes remaining in the currently processed TLS
record.</p>
</div><h4 id='method.compression' class='method'><code>fn <a href='#method.compression' class='fnname'>compression</a>(&amp;self) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a>&gt;</code></h4>
<div class='docblock'><p>Returns the compression currently in use.</p>
<p>The result will be either None, indicating no compression is in use, or
a string with the compression name.</p>
</div><h4 id='method.get_ssl_method' class='method'><code>fn <a href='#method.get_ssl_method' class='fnname'>get_ssl_method</a>(&amp;self) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a class='enum' href='../../openssl/ssl/enum.SslMethod.html' title='openssl::ssl::SslMethod'>SslMethod</a>&gt;</code></h4>
<h4 id='method.get_servername' class='method'><code>fn <a href='#method.get_servername' class='fnname'>get_servername</a>(&amp;self) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/option/enum.Option.html' title='core::option::Option'>Option</a>&lt;<a class='struct' href='https://doc.rust-lang.org/nightly/collections/string/struct.String.html' title='collections::string::String'>String</a>&gt;</code></h4>
<div class='docblock'><p>Returns the server&#39;s name for the current connection</p>
</div><h4 id='method.set_ssl_context' class='method'><code>fn <a href='#method.set_ssl_context' class='fnname'>set_ssl_context</a>(&amp;self, ctx: &amp;<a class='struct' href='../../openssl/ssl/struct.SslContext.html' title='openssl::ssl::SslContext'>SslContext</a>) -&gt; <a class='struct' href='../../openssl/ssl/struct.SslContext.html' title='openssl::ssl::SslContext'>SslContext</a></code></h4>
<div class='docblock'><p>change the context corresponding to the current connection</p>
<p>Returns a clone of the SslContext @ctx (ie: the new context). The old context is freed.</p>
</div><h4 id='method.get_ssl_context' class='method'><code>fn <a href='#method.get_ssl_context' class='fnname'>get_ssl_context</a>(&amp;self) -&gt; <a class='struct' href='../../openssl/ssl/struct.SslContext.html' title='openssl::ssl::SslContext'>SslContext</a></code></h4>
<div class='docblock'><p>obtain the context corresponding to the current connection</p>
</div></div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Send.html' title='core::marker::Send'>Send</a> for <a class='struct' href='../../openssl/ssl/struct.Ssl.html' title='openssl::ssl::Ssl'>Ssl</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-2721' class='srclink' href='../../src/openssl/ssl/mod.rs.html#921' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html' title='core::marker::Sync'>Sync</a> for <a class='struct' href='../../openssl/ssl/struct.Ssl.html' title='openssl::ssl::Ssl'>Ssl</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-2722' class='srclink' href='../../src/openssl/ssl/mod.rs.html#922' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html' title='core::fmt::Debug'>Debug</a> for <a class='struct' href='../../openssl/ssl/struct.Ssl.html' title='openssl::ssl::Ssl'>Ssl</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-2723' class='srclink' href='../../src/openssl/ssl/mod.rs.html#924-930' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.fmt' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&amp;self, fmt: &amp;mut <a class='struct' href='https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html' title='core::fmt::Formatter'>Formatter</a>) -&gt; <a class='type' href='https://doc.rust-lang.org/nightly/core/fmt/type.Result.html' title='core::fmt::Result'>Result</a></code></h4>
<div class='docblock'><p>Formats the value using the given formatter.</p>
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/ops/trait.Drop.html' title='core::ops::Drop'>Drop</a> for <a class='struct' href='../../openssl/ssl/struct.Ssl.html' title='openssl::ssl::Ssl'>Ssl</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-2727' class='srclink' href='../../src/openssl/ssl/mod.rs.html#932-936' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.drop' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/ops/trait.Drop.html#tymethod.drop' class='fnname'>drop</a>(&amp;mut self)</code></h4>
<div class='docblock'><p>A method called when the value goes out of scope. <a href="https://doc.rust-lang.org/nightly/core/ops/trait.Drop.html#tymethod.drop">Read more</a></p>
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html' title='core::clone::Clone'>Clone</a> for <a class='struct' href='../../openssl/ssl/struct.Ssl.html' title='openssl::ssl::Ssl'>Ssl</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-2730' class='srclink' href='../../src/openssl/ssl/mod.rs.html#938-945' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.clone' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#tymethod.clone' class='fnname'>clone</a>(&amp;self) -&gt; <a class='struct' href='../../openssl/ssl/struct.Ssl.html' title='openssl::ssl::Ssl'>Ssl</a></code></h4>
<div class='docblock'>
<h1 id='deprecated' class='section-header'><a href='#deprecated'>Deprecated</a></h1></div><h4 id='method.clone_from' class='method'><code>fn <a href='https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from' class='fnname'>clone_from</a>(&amp;mut self, source: &amp;Self)</code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></h4>
<div class='docblock'><p>Performs copy-assignment from <code>source</code>. <a href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html#method.clone_from">Read more</a></p>
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class='trait' href='../../openssl/ssl/trait.IntoSsl.html' title='openssl::ssl::IntoSsl'>IntoSsl</a> for <a class='struct' href='../../openssl/ssl/struct.Ssl.html' title='openssl::ssl::Ssl'>Ssl</a></code></span><span class='out-of-band'><div class='ghost'></div><a id='src-2974' class='srclink' href='../../src/openssl/ssl/mod.rs.html#1512-1516' title='goto source code'>[src]</a></span></h3>
<div class='impl-items'><h4 id='method.into_ssl' class='method'><code>fn <a href='../../openssl/ssl/trait.IntoSsl.html#tymethod.into_ssl' class='fnname'>into_ssl</a>(self) -&gt; <a class='enum' href='https://doc.rust-lang.org/nightly/core/result/enum.Result.html' title='core::result::Result'>Result</a>&lt;<a class='struct' href='../../openssl/ssl/struct.Ssl.html' title='openssl::ssl::Ssl'>Ssl</a>,&nbsp;<a class='enum' href='../../openssl/ssl/error/enum.SslError.html' title='openssl::ssl::error::SslError'>SslError</a>&gt;</code></h4>
</div></section>
<section id='search' class="content hidden"></section>
<section class="footer"></section>
<aside id="help" class="hidden">
<div>
<h1 class="hidden">Help</h1>
<div class="shortcuts">
<h2>Keyboard Shortcuts</h2>
<dl>
<dt>?</dt>
<dd>Show this help dialog</dd>
<dt>S</dt>
<dd>Focus the search field</dd>
<dt>&larrb;</dt>
<dd>Move up in search results</dd>
<dt>&rarrb;</dt>
<dd>Move down in search results</dd>
<dt>&#9166;</dt>
<dd>Go to active search result</dd>
<dt>+</dt>
<dd>Collapse/expand all sections</dd>
</dl>
</div>
<div class="infos">
<h2>Search Tricks</h2>
<p>
Prefix searches with a type followed by a colon (e.g.
<code>fn:</code>) to restrict the search to a given type.
</p>
<p>
Accepted types are: <code>fn</code>, <code>mod</code>,
<code>struct</code>, <code>enum</code>,
<code>trait</code>, <code>type</code>, <code>macro</code>,
and <code>const</code>.
</p>
<p>
Search functions by type signature (e.g.
<code>vec -> usize</code> or <code>* -> vec</code>)
</p>
</div>
</div>
</aside>
<script>
window.rootPath = "../../";
window.currentCrate = "openssl";
window.playgroundUrl = "";
</script>
<script src="../../jquery.js"></script>
<script src="../../main.js"></script>
<script defer src="../../search-index.js"></script>
</body>
</html>