Struct openssl::ssl::SslContext
[-] [+]
[src]
pub struct SslContext { // some fields omitted }
An SSL context object
Methods
impl SslContext
fn new(method: SslMethod) -> Result<SslContext, SslError>
Creates a new SSL context.
fn set_verify(&mut self, mode: SslVerifyMode, verify: Option<VerifyCallback>)
Configures the certificate verification method for new connections.
fn set_verify_with_data<T>(&mut self, mode: SslVerifyMode, verify: VerifyCallbackData<T>, data: T)
Configures the certificate verification method for new connections also carrying supplied data.
fn set_verify_depth(&mut self, depth: u32)
Sets verification depth
fn set_CA_file(&mut self, file: &Path) -> Option<SslError>
Specifies the file that contains trusted CA certificates.
fn set_certificate_file(&mut self, file: &Path, file_type: X509FileType) -> Option<SslError>
Specifies the file that contains certificate
fn set_private_key_file(&mut self, file: &Path, file_type: X509FileType) -> Option<SslError>
Specifies the file that contains private key