[−][src]Struct hyper::net::Openssl
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 Openssl
pub 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 Ssl for Openssl
[src]
impl Ssl for Openssl
type 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.
impl Clone for Openssl
[src]
impl Clone for Openssl
fn clone(&self) -> Openssl
[src]
fn clone(&self) -> Openssl
Returns 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)
Performs copy-assignment from source
. Read more
impl Default for Openssl
[src]
impl Default for Openssl
impl Debug for Openssl
[src]
impl Debug for Openssl
Auto Trait Implementations
Blanket Implementations
impl<S> SslClient for S where
S: Ssl,
[src]
impl<S> SslClient for S where
S: Ssl,
type Stream = <S as Ssl>::Stream
The protected stream.
fn wrap_client(
&Self,
HttpStream,
&str
) -> Result<<S as SslClient<HttpStream>>::Stream, Error>
[src]
fn wrap_client(
&Self,
HttpStream,
&str
) -> Result<<S as SslClient<HttpStream>>::Stream, Error>
Wrap a client stream with SSL.
impl<S> SslServer for S where
S: Ssl,
[src]
impl<S> SslServer for S where
S: Ssl,
type Stream = <S as Ssl>::Stream
The protected stream.
fn wrap_server(
&Self,
HttpStream
) -> Result<<S as SslServer<HttpStream>>::Stream, Error>
[src]
fn wrap_server(
&Self,
HttpStream
) -> Result<<S as SslServer<HttpStream>>::Stream, Error>
Wrap a server stream with SSL.
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
type Owned = T
fn to_owned(&self) -> T
[src]
fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
fn clone_into(&self, target: &mut T)
[src]
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
try_from
)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
try_from
)Performs the conversion.
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Gets the TypeId
of self
. Read more
impl<T> Typeable for T where
T: Any,
[src]
impl<T> Typeable for T where
T: Any,