diff options
| author | Steven Fackler <[email protected]> | 2018-05-09 20:13:27 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2018-05-09 20:13:27 +0100 |
| commit | 436afb8f57bdd2da61d50fcd670ab2c431816c10 (patch) | |
| tree | f17245f01e512c83f8fbff4770468534793bdc55 /openssl-sys/src | |
| parent | Merge pull request #908 from sfackler/102g-fix (diff) | |
| parent | Fix base version for min/max proto accessors (diff) | |
| download | rust-openssl-436afb8f57bdd2da61d50fcd670ab2c431816c10.tar.xz rust-openssl-436afb8f57bdd2da61d50fcd670ab2c431816c10.zip | |
Merge pull request #913 from sfackler/fix-get-version
Fix base version for min/max proto accessors
Diffstat (limited to 'openssl-sys/src')
| -rw-r--r-- | openssl-sys/src/ossl110.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/openssl-sys/src/ossl110.rs b/openssl-sys/src/ossl110.rs index 96e9b1e3..d1d7a34b 100644 --- a/openssl-sys/src/ossl110.rs +++ b/openssl-sys/src/ossl110.rs @@ -1,6 +1,6 @@ use libc::{c_char, c_int, c_long, c_uchar, c_uint, c_ulong, c_void, size_t}; -use std::sync::{Once, ONCE_INIT}; use std::ptr; +use std::sync::{Once, ONCE_INIT}; pub enum BIGNUM {} pub enum BIO {} @@ -36,7 +36,9 @@ pub enum X509_REQ {} pub const SSL_CTRL_SET_MIN_PROTO_VERSION: c_int = 123; pub const SSL_CTRL_SET_MAX_PROTO_VERSION: c_int = 124; +#[cfg(ossl110g)] pub const SSL_CTRL_GET_MIN_PROTO_VERSION: c_int = 130; +#[cfg(ossl110g)] pub const SSL_CTRL_GET_MAX_PROTO_VERSION: c_int = 131; pub const SSL_OP_MICROSOFT_SESS_ID_BUG: c_ulong = 0x00000000; @@ -98,10 +100,12 @@ pub unsafe fn SSL_CTX_set_max_proto_version(ctx: *mut ::SSL_CTX, version: c_int) ) as c_int } +#[cfg(ossl110g)] pub unsafe fn SSL_CTX_get_min_proto_version(ctx: *mut ::SSL_CTX) -> c_int { ::SSL_CTX_ctrl(ctx, SSL_CTRL_GET_MIN_PROTO_VERSION, 0, ptr::null_mut()) as c_int } +#[cfg(ossl110g)] pub unsafe fn SSL_CTX_get_max_proto_version(ctx: *mut ::SSL_CTX) -> c_int { ::SSL_CTX_ctrl(ctx, SSL_CTRL_GET_MAX_PROTO_VERSION, 0, ptr::null_mut()) as c_int } @@ -124,10 +128,12 @@ pub unsafe fn SSL_set_max_proto_version(s: *mut ::SSL, version: c_int) -> c_int ) as c_int } +#[cfg(ossl110g)] pub unsafe fn SSL_get_min_proto_version(s: *mut ::SSL) -> c_int { ::SSL_ctrl(s, SSL_CTRL_GET_MIN_PROTO_VERSION, 0, ptr::null_mut()) as c_int } +#[cfg(ossl110g)] pub unsafe fn SSL_get_max_proto_version(s: *mut ::SSL) -> c_int { ::SSL_ctrl(s, SSL_CTRL_GET_MAX_PROTO_VERSION, 0, ptr::null_mut()) as c_int } |