Loading openssl-sys/src/lib.rs +4 −0 Original line number Diff line number Diff line Loading @@ -540,6 +540,10 @@ pub unsafe fn SSL_CTX_set_tmp_dh(ctx: *mut SSL_CTX, dh: *mut DH) -> c_long { SSL_CTX_ctrl(ctx, SSL_CTRL_SET_TMP_DH, 0, dh as *mut c_void) } pub unsafe fn SSL_CTX_add_extra_chain_cert(ctx: *mut SSL_CTX, x509: *mut X509) -> c_long { SSL_CTX_ctrl(ctx, SSL_CTRL_EXTRA_CHAIN_CERT, 0, x509 as *mut c_void) } pub unsafe fn SSL_CTX_set_tlsext_servername_callback(ctx: *mut SSL_CTX, cb: Option<extern "C" fn()>) -> c_long { Loading openssl/src/ssl/mod.rs +2 −3 Original line number Diff line number Diff line Loading @@ -20,7 +20,6 @@ use std::slice; use std::marker::PhantomData; use ffi; use ffi_extras; use dh::DH; use x509::{X509StoreContext, X509FileType, X509}; use crypto::pkey::PKey; Loading Loading @@ -586,7 +585,7 @@ impl SslContext { /// certificate specified using set_certificate() pub fn add_extra_chain_cert(&mut self, cert: &X509) -> Result<(), ErrorStack> { wrap_ssl_result(unsafe { ffi_extras::SSL_CTX_add_extra_chain_cert(self.ctx, cert.get_handle()) as c_int ffi::SSL_CTX_add_extra_chain_cert(self.ctx, cert.get_handle()) as c_int }) } Loading Loading @@ -626,7 +625,7 @@ impl SslContext { /// This method requires OpenSSL >= 1.0.2 or LibreSSL and the `ecdh_auto` feature. #[cfg(feature = "ecdh_auto")] pub fn set_ecdh_auto(&mut self, onoff: bool) -> Result<(), ErrorStack> { wrap_ssl_result(unsafe { ffi_extras::SSL_CTX_set_ecdh_auto(self.ctx, onoff as c_int) }) wrap_ssl_result(unsafe { ::ffi_extras::SSL_CTX_set_ecdh_auto(self.ctx, onoff as c_int) }) } pub fn set_options(&mut self, option: SslContextOptions) -> SslContextOptions { Loading Loading
openssl-sys/src/lib.rs +4 −0 Original line number Diff line number Diff line Loading @@ -540,6 +540,10 @@ pub unsafe fn SSL_CTX_set_tmp_dh(ctx: *mut SSL_CTX, dh: *mut DH) -> c_long { SSL_CTX_ctrl(ctx, SSL_CTRL_SET_TMP_DH, 0, dh as *mut c_void) } pub unsafe fn SSL_CTX_add_extra_chain_cert(ctx: *mut SSL_CTX, x509: *mut X509) -> c_long { SSL_CTX_ctrl(ctx, SSL_CTRL_EXTRA_CHAIN_CERT, 0, x509 as *mut c_void) } pub unsafe fn SSL_CTX_set_tlsext_servername_callback(ctx: *mut SSL_CTX, cb: Option<extern "C" fn()>) -> c_long { Loading
openssl/src/ssl/mod.rs +2 −3 Original line number Diff line number Diff line Loading @@ -20,7 +20,6 @@ use std::slice; use std::marker::PhantomData; use ffi; use ffi_extras; use dh::DH; use x509::{X509StoreContext, X509FileType, X509}; use crypto::pkey::PKey; Loading Loading @@ -586,7 +585,7 @@ impl SslContext { /// certificate specified using set_certificate() pub fn add_extra_chain_cert(&mut self, cert: &X509) -> Result<(), ErrorStack> { wrap_ssl_result(unsafe { ffi_extras::SSL_CTX_add_extra_chain_cert(self.ctx, cert.get_handle()) as c_int ffi::SSL_CTX_add_extra_chain_cert(self.ctx, cert.get_handle()) as c_int }) } Loading Loading @@ -626,7 +625,7 @@ impl SslContext { /// This method requires OpenSSL >= 1.0.2 or LibreSSL and the `ecdh_auto` feature. #[cfg(feature = "ecdh_auto")] pub fn set_ecdh_auto(&mut self, onoff: bool) -> Result<(), ErrorStack> { wrap_ssl_result(unsafe { ffi_extras::SSL_CTX_set_ecdh_auto(self.ctx, onoff as c_int) }) wrap_ssl_result(unsafe { ::ffi_extras::SSL_CTX_set_ecdh_auto(self.ctx, onoff as c_int) }) } pub fn set_options(&mut self, option: SslContextOptions) -> SslContextOptions { Loading