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 | The |
Methods
impl Openssl
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.