Mvoe SSL_CTX_add_extra_chain_cert to -sys
This commit is contained in:
parent
378b86326c
commit
ee67ea8ea0
|
|
@ -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)
|
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,
|
pub unsafe fn SSL_CTX_set_tlsext_servername_callback(ctx: *mut SSL_CTX,
|
||||||
cb: Option<extern "C" fn()>)
|
cb: Option<extern "C" fn()>)
|
||||||
-> c_long {
|
-> c_long {
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,6 @@ use std::slice;
|
||||||
use std::marker::PhantomData;
|
use std::marker::PhantomData;
|
||||||
|
|
||||||
use ffi;
|
use ffi;
|
||||||
use ffi_extras;
|
|
||||||
use dh::DH;
|
use dh::DH;
|
||||||
use x509::{X509StoreContext, X509FileType, X509};
|
use x509::{X509StoreContext, X509FileType, X509};
|
||||||
use crypto::pkey::PKey;
|
use crypto::pkey::PKey;
|
||||||
|
|
@ -586,7 +585,7 @@ impl SslContext {
|
||||||
/// certificate specified using set_certificate()
|
/// certificate specified using set_certificate()
|
||||||
pub fn add_extra_chain_cert(&mut self, cert: &X509) -> Result<(), ErrorStack> {
|
pub fn add_extra_chain_cert(&mut self, cert: &X509) -> Result<(), ErrorStack> {
|
||||||
wrap_ssl_result(unsafe {
|
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
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -626,7 +625,7 @@ impl SslContext {
|
||||||
/// This method requires OpenSSL >= 1.0.2 or LibreSSL and the `ecdh_auto` feature.
|
/// This method requires OpenSSL >= 1.0.2 or LibreSSL and the `ecdh_auto` feature.
|
||||||
#[cfg(feature = "ecdh_auto")]
|
#[cfg(feature = "ecdh_auto")]
|
||||||
pub fn set_ecdh_auto(&mut self, onoff: bool) -> Result<(), ErrorStack> {
|
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 {
|
pub fn set_options(&mut self, option: SslContextOptions) -> SslContextOptions {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue