diff options
| author | Steven Fackler <[email protected]> | 2018-04-26 22:45:09 -0700 |
|---|---|---|
| committer | Steven Fackler <[email protected]> | 2018-04-26 22:45:09 -0700 |
| commit | 03a4c6bd26f70f37c79e594a86a0388b880ca998 (patch) | |
| tree | d77e44a614052e7a2665dfc0105a8f4d483433f6 /openssl-sys/src | |
| parent | Remove Rsa::build (diff) | |
| download | rust-openssl-03a4c6bd26f70f37c79e594a86a0388b880ca998.tar.xz rust-openssl-03a4c6bd26f70f37c79e594a86a0388b880ca998.zip | |
Reform version checking logic
Rather than having an infinitely growing set of things to look for, just
grab the literal version out. We also provide that to downstream crates,
and it should be used rather than the random assortment of other stuff
that's also passed down.
Diffstat (limited to 'openssl-sys/src')
| -rw-r--r-- | openssl-sys/src/lib.rs | 10 | ||||
| -rw-r--r-- | openssl-sys/src/libressl/mod.rs | 12 |
2 files changed, 11 insertions, 11 deletions
diff --git a/openssl-sys/src/lib.rs b/openssl-sys/src/lib.rs index 03ab60f4..8ebcb187 100644 --- a/openssl-sys/src/lib.rs +++ b/openssl-sys/src/lib.rs @@ -5,8 +5,8 @@ extern crate libc; use libc::{c_char, c_int, c_long, c_uchar, c_uint, c_ulong, c_void, size_t, FILE}; -use std::ptr; use std::mem; +use std::ptr; #[cfg(any(ossl101, ossl102))] mod ossl10x; @@ -1277,14 +1277,14 @@ pub const SSL_VERIFY_NONE: c_int = 0; pub const SSL_VERIFY_PEER: c_int = 1; pub const SSL_VERIFY_FAIL_IF_NO_PEER_CERT: c_int = 2; -#[cfg(not(any(libressl261, libressl262, libressl26x, libressl27, ossl101)))] +#[cfg(not(any(libressl261, libressl262, libressl26x, libressl27x, ossl101)))] pub const SSL_OP_TLSEXT_PADDING: c_ulong = 0x00000010; -#[cfg(any(libressl261, libressl262, libressl26x, libressl27))] +#[cfg(any(libressl261, libressl262, libressl26x, libressl27x))] pub const SSL_OP_TLSEXT_PADDING: c_ulong = 0x0; pub const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: c_ulong = 0x00000800; -#[cfg(not(any(libressl261, libressl262, libressl26x, libressl27)))] +#[cfg(not(any(libressl261, libressl262, libressl26x, libressl27x)))] pub const SSL_OP_CRYPTOPRO_TLSEXT_BUG: c_ulong = 0x80000000; -#[cfg(any(libressl261, libressl262, libressl26x, libressl27))] +#[cfg(any(libressl261, libressl262, libressl26x, libressl27x))] pub const SSL_OP_CRYPTOPRO_TLSEXT_BUG: c_ulong = 0x0; pub const SSL_OP_LEGACY_SERVER_CONNECT: c_ulong = 0x00000004; #[cfg(not(libressl))] diff --git a/openssl-sys/src/libressl/mod.rs b/openssl-sys/src/libressl/mod.rs index 0bcf83e1..366d9502 100644 --- a/openssl-sys/src/libressl/mod.rs +++ b/openssl-sys/src/libressl/mod.rs @@ -1,7 +1,7 @@ -use std::sync::{Mutex, MutexGuard}; -use std::sync::{Once, ONCE_INIT}; use std::mem; use std::ptr; +use std::sync::{Mutex, MutexGuard}; +use std::sync::{Once, ONCE_INIT}; #[cfg(libressl250)] pub use libressl::v250::*; @@ -337,9 +337,9 @@ pub const SSL_CTRL_OPTIONS: c_int = 32; pub const SSL_CTRL_CLEAR_OPTIONS: c_int = 77; pub const SSL_CTRL_SET_ECDH_AUTO: c_int = 94; -#[cfg(any(libressl261, libressl262, libressl26x, libressl27))] +#[cfg(any(libressl261, libressl262, libressl26x, libressl27x))] pub const SSL_OP_ALL: c_ulong = 0x4; -#[cfg(not(any(libressl261, libressl262, libressl26x, libressl27)))] +#[cfg(not(any(libressl261, libressl262, libressl26x, libressl27x)))] pub const SSL_OP_ALL: c_ulong = 0x80000014; pub const SSL_OP_CISCO_ANYCONNECT: c_ulong = 0x0; pub const SSL_OP_NO_COMPRESSION: c_ulong = 0x0; @@ -352,9 +352,9 @@ pub const SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER: c_ulong = 0x0; pub const SSL_OP_SSLEAY_080_CLIENT_DH_BUG: c_ulong = 0x0; pub const SSL_OP_TLS_D5_BUG: c_ulong = 0x0; pub const SSL_OP_TLS_BLOCK_PADDING_BUG: c_ulong = 0x0; -#[cfg(any(libressl261, libressl262, libressl26x, libressl27))] +#[cfg(any(libressl261, libressl262, libressl26x, libressl27x))] pub const SSL_OP_SINGLE_ECDH_USE: c_ulong = 0x0; -#[cfg(not(any(libressl261, libressl262, libressl26x, libressl27)))] +#[cfg(not(any(libressl261, libressl262, libressl26x, libressl27x)))] pub const SSL_OP_SINGLE_ECDH_USE: c_ulong = 0x00080000; pub const SSL_OP_SINGLE_DH_USE: c_ulong = 0x00100000; pub const SSL_OP_NO_SSLv2: c_ulong = 0x0; |