aboutsummaryrefslogtreecommitdiff
path: root/openssl/src/ssl/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'openssl/src/ssl/mod.rs')
-rw-r--r--openssl/src/ssl/mod.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/openssl/src/ssl/mod.rs b/openssl/src/ssl/mod.rs
index f73c263a..736e6b4c 100644
--- a/openssl/src/ssl/mod.rs
+++ b/openssl/src/ssl/mod.rs
@@ -982,6 +982,14 @@ impl Ssl {
}
}
+ pub fn set_ssl_context(&self, ctx: &SslContext) -> SslContext {
+ SslContext { ctx: unsafe { ffi::SSL_set_SSL_CTX(self.ssl, ctx.ctx) } }
+ }
+
+ pub fn get_ssl_context(&self) -> SslContext {
+ let ssl_ctx = unsafe { ffi::SSL_get_SSL_CTX(self.ssl) };
+ SslContext { ctx: ssl_ctx }
+ }
}
macro_rules! make_LibSslError {