aboutsummaryrefslogtreecommitdiff
path: root/openssl/src/ssl/tests
diff options
context:
space:
mode:
Diffstat (limited to 'openssl/src/ssl/tests')
-rw-r--r--openssl/src/ssl/tests/mod.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/openssl/src/ssl/tests/mod.rs b/openssl/src/ssl/tests/mod.rs
index a763f496..f5a42536 100644
--- a/openssl/src/ssl/tests/mod.rs
+++ b/openssl/src/ssl/tests/mod.rs
@@ -1045,3 +1045,16 @@ fn flush_panic() {
let mut stream = SslStream::connect(&ctx, stream).unwrap();
let _ = stream.flush();
}
+
+#[test]
+fn refcount_ssl_context() {
+ let ssl = {
+ let ctx = SslContext::new(SslMethod::Sslv23).unwrap();
+ ssl::Ssl::new(&ctx).unwrap()
+ };
+
+ {
+ let new_ctx_a = SslContext::new(SslMethod::Sslv23).unwrap();
+ let _new_ctx_b = ssl.set_ssl_context(&new_ctx_a);
+ }
+}