diff options
| author | Geoffroy Couprie <[email protected]> | 2015-12-03 12:26:55 +0100 |
|---|---|---|
| committer | Geoffroy Couprie <[email protected]> | 2015-12-03 12:26:55 +0100 |
| commit | 6850c810d32a11330c9b1dd4889b447fa8434c36 (patch) | |
| tree | 71cba316629d2b8ba9c22a9be10acc2d4a99a9e2 /openssl-sys-extras/src/lib.rs | |
| parent | Make shims for SSL_CTX_ctrl and SSL_CTX_callback_ctrl macro wrappers (diff) | |
| download | rust-openssl-6850c810d32a11330c9b1dd4889b447fa8434c36.tar.xz rust-openssl-6850c810d32a11330c9b1dd4889b447fa8434c36.zip | |
Increment SSL_CTX's reference count in Ssl::get_ssl_context()
Without this, whenever the returned SslContext is released,
the refcount of the underlying SSL_CTX will decrease and it
will be freed too soon
Diffstat (limited to 'openssl-sys-extras/src/lib.rs')
| -rw-r--r-- | openssl-sys-extras/src/lib.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/openssl-sys-extras/src/lib.rs b/openssl-sys-extras/src/lib.rs index f17c7fd5..69a1fee9 100644 --- a/openssl-sys-extras/src/lib.rs +++ b/openssl-sys-extras/src/lib.rs @@ -69,4 +69,6 @@ extern { pub fn SSL_CTX_set_tlsext_servername_callback(ssl: *mut SSL_CTX, callback: Option<extern fn()>); #[link_name = "SSL_CTX_set_tlsext_servername_arg_shim"] pub fn SSL_CTX_set_tlsext_servername_arg(ssl: *mut SSL_CTX, arg: *const c_void); + #[link_name = "SSL_CTX_increment_refcount_shim"] + pub fn SSL_CTX_increment_refcount(ssl: *mut SSL_CTX) -> c_long; } |