diff options
| author | Paul Kehrer <[email protected]> | 2015-02-23 19:39:23 -0600 |
|---|---|---|
| committer | Paul Kehrer <[email protected]> | 2015-02-23 19:39:23 -0600 |
| commit | 8940bd767b908e886dc8ef83ca59e5e5f844a06e (patch) | |
| tree | 38c42f141900033fabcc2d3988010cbccf8e6860 /openssl-sys/src/lib.rs | |
| parent | add support for SSL_CTX_set_options and SSL_CTX_get_options (diff) | |
| download | rust-openssl-8940bd767b908e886dc8ef83ca59e5e5f844a06e.tar.xz rust-openssl-8940bd767b908e886dc8ef83ca59e5e5f844a06e.zip | |
add support for SSL_CTX_clear_options and use bitflags
Diffstat (limited to 'openssl-sys/src/lib.rs')
| -rw-r--r-- | openssl-sys/src/lib.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/openssl-sys/src/lib.rs b/openssl-sys/src/lib.rs index e575b8be..eec4b71d 100644 --- a/openssl-sys/src/lib.rs +++ b/openssl-sys/src/lib.rs @@ -118,6 +118,7 @@ pub const NID_ext_key_usage: c_int = 126; pub const NID_key_usage: c_int = 83; pub const SSL_CTRL_OPTIONS: c_int = 32; +pub const SSL_CTRL_CLEAR_OPTIONS: c_int = 77; pub const SSL_CTRL_SET_TLSEXT_HOSTNAME: c_int = 55; pub const SSL_ERROR_NONE: c_int = 0; @@ -247,6 +248,10 @@ pub unsafe fn SSL_CTX_get_options(ssl: *mut SSL_CTX) -> c_long { SSL_CTX_ctrl(ssl, SSL_CTRL_OPTIONS, 0, ptr::null_mut()) } +pub unsafe fn SSL_CTX_clear_options(ssl: *mut SSL_CTX, op: c_long) -> c_long { + SSL_CTX_ctrl(ssl, SSL_CTRL_CLEAR_OPTIONS, (op), ptr::null_mut()) +} + // True functions extern "C" { pub fn ASN1_INTEGER_set(dest: *mut ASN1_INTEGER, value: c_long) -> c_int; |