Struct hyper::net::Openssl [−][src]
pub struct Openssl {
pub context: Arc<SslContext>,
}An implementation of Ssl for OpenSSL.
Example
use hyper::Server; use hyper::net::Openssl; let ssl = Openssl::with_cert_and_key("/home/foo/cert", "/home/foo/key").unwrap(); Server::https("0.0.0.0:443", ssl).unwrap();
For complete control, create a SslContext with the options you desire
and then create `Openssl { context: ctx }
Fields
context: Arc<SslContext>
The SslContext from openssl crate.
Methods
impl Openssl[src]
impl Opensslpub fn with_cert_and_key<C, K>(cert: C, key: K) -> Result<Openssl, SslError> where
C: AsRef<Path>,
K: AsRef<Path>, [src]
pub fn with_cert_and_key<C, K>(cert: C, key: K) -> Result<Openssl, SslError> where
C: AsRef<Path>,
K: AsRef<Path>, Ease creating an Openssl with a certificate and key.
Trait Implementations
impl Debug for Openssl[src]
impl Debug for Opensslfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Clone for Openssl[src]
impl Clone for Opensslfn clone(&self) -> Openssl[src]
fn clone(&self) -> OpensslReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0
[src]Performs copy-assignment from source. Read more
impl Default for Openssl[src]
impl Default for Opensslimpl Ssl for Openssl[src]
impl Ssl for Openssltype Stream = SslStream<HttpStream>
The protected stream.
fn wrap_client(&self, stream: HttpStream, host: &str) -> Result<Self::Stream>[src]
fn wrap_client(&self, stream: HttpStream, host: &str) -> Result<Self::Stream>Wrap a client stream with SSL.
fn wrap_server(&self, stream: HttpStream) -> Result<Self::Stream>[src]
fn wrap_server(&self, stream: HttpStream) -> Result<Self::Stream>Wrap a server stream with SSL.