aboutsummaryrefslogtreecommitdiff
path: root/openssl-sys/src/libressl
diff options
context:
space:
mode:
authorSteven Fackler <[email protected]>2018-05-20 11:27:45 -0700
committerSteven Fackler <[email protected]>2018-05-20 12:33:02 -0700
commita6fcef01c0aa71359f583342c813b8db5835178d (patch)
tree33c47b59618e5fe286904462f2d4a540804dd7ef /openssl-sys/src/libressl
parentExpose X509_VERIFY_PARAM on libressl (diff)
downloadrust-openssl-a6fcef01c0aa71359f583342c813b8db5835178d.tar.xz
rust-openssl-a6fcef01c0aa71359f583342c813b8db5835178d.zip
Overhaul openssl cfgs
Also expose hostname verification on libressl
Diffstat (limited to 'openssl-sys/src/libressl')
-rw-r--r--openssl-sys/src/libressl/mod.rs22
1 files changed, 22 insertions, 0 deletions
diff --git a/openssl-sys/src/libressl/mod.rs b/openssl-sys/src/libressl/mod.rs
index 5ae205bc..0080fc7d 100644
--- a/openssl-sys/src/libressl/mod.rs
+++ b/openssl-sys/src/libressl/mod.rs
@@ -447,6 +447,28 @@ pub unsafe fn SSL_session_reused(ssl: *mut ::SSL) -> c_int {
::SSL_ctrl(ssl, SSL_CTRL_GET_SESSION_REUSED, 0, ptr::null_mut()) as c_int
}
+pub unsafe fn SSL_CTX_get_options(ctx: *const ::SSL_CTX) -> c_ulong {
+ ::SSL_CTX_ctrl(ctx as *mut _, ::SSL_CTRL_OPTIONS, 0, ptr::null_mut()) as c_ulong
+}
+
+pub unsafe fn SSL_CTX_set_options(ctx: *const ::SSL_CTX, op: c_ulong) -> c_ulong {
+ ::SSL_CTX_ctrl(
+ ctx as *mut _,
+ ::SSL_CTRL_OPTIONS,
+ op as c_long,
+ ptr::null_mut(),
+ ) as c_ulong
+}
+
+pub unsafe fn SSL_CTX_clear_options(ctx: *const ::SSL_CTX, op: c_ulong) -> c_ulong {
+ ::SSL_CTX_ctrl(
+ ctx as *mut _,
+ ::SSL_CTRL_CLEAR_OPTIONS,
+ op as c_long,
+ ptr::null_mut(),
+ ) as c_ulong
+}
+
extern "C" {
pub fn BIO_new(type_: *mut BIO_METHOD) -> *mut BIO;
pub fn BIO_s_file() -> *mut BIO_METHOD;