diff options
| author | Steven Fackler <[email protected]> | 2018-04-30 21:27:23 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2018-04-30 21:27:23 -0700 |
| commit | 5b0a0e56921d94090d594cc75ca3792720f74b37 (patch) | |
| tree | 1ccf5847abb3f77411f0aad392945380bc147edc | |
| parent | Release openssl v0.10.7 (diff) | |
| parent | Fix changelog typo (diff) | |
| download | rust-openssl-5b0a0e56921d94090d594cc75ca3792720f74b37.tar.xz rust-openssl-5b0a0e56921d94090d594cc75ca3792720f74b37.zip | |
Merge pull request #908 from sfackler/102g-fix
Flag off constants added in 1.0.2h
| -rw-r--r-- | CHANGELOG.md | 7 | ||||
| -rw-r--r-- | openssl-sys/build.rs | 4 | ||||
| -rw-r--r-- | openssl-sys/src/ossl10x.rs | 15 |
3 files changed, 17 insertions, 9 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 02297dfa..c0734265 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,9 +10,10 @@ * Added `RsaPrivateKeyBuilder` to allow control over initialization of optional components of an RSA private key. * Added DER encode/decode support to `SslSession`. -* openssl-sys now provides the `OPENSSL_VERSION_NUMBER` and `OPENSSL_LIBRESSL_VERSION_NUMBER` - environment variables to downstream build scripts which contains the hex-encoded version number - of the OpenSSL or LibreSSL distribution being built against. The other variables are deprecated. +* openssl-sys now provides the `DEP_OPENSSL_VERSION_NUMBER` and + `DEP_OPENSSL_LIBRESSL_VERSION_NUMBER` environment variables to downstream build scripts which + contains the hex-encoded version number of the OpenSSL or LibreSSL distribution being built + against. The other variables are deprecated. ## [v0.10.6] - 2018-03-05 diff --git a/openssl-sys/build.rs b/openssl-sys/build.rs index 786609cc..285357b8 100644 --- a/openssl-sys/build.rs +++ b/openssl-sys/build.rs @@ -437,6 +437,10 @@ See rust-openssl README for more information: let openssl_version = openssl_version.unwrap(); println!("cargo:version_number={:x}", openssl_version); + if openssl_version >= 0x1_00_02_08_0 { + println!("cargo:rustc-cfg=ossl102h"); + } + if openssl_version >= 0x1_01_02_00_0 { version_error() } else if openssl_version >= 0x1_01_01_00_0 { diff --git a/openssl-sys/src/ossl10x.rs b/openssl-sys/src/ossl10x.rs index 9b79fb57..6a4d4346 100644 --- a/openssl-sys/src/ossl10x.rs +++ b/openssl-sys/src/ossl10x.rs @@ -1,13 +1,13 @@ -use std::sync::{Mutex, MutexGuard}; -use std::sync::{Once, ONCE_INIT}; +use std::io::{self, Write}; use std::mem; -use std::ptr; use std::process; -use std::io::{self, Write}; +use std::ptr; +use std::sync::{Mutex, MutexGuard}; +use std::sync::{Once, ONCE_INIT}; -use libc::{c_char, c_int, c_long, c_uchar, c_uint, c_ulong, c_void, size_t}; #[cfg(not(ossl101))] use libc::time_t; +use libc::{c_char, c_int, c_long, c_uchar, c_uint, c_ulong, c_void, size_t}; #[repr(C)] pub struct stack_st_ASN1_OBJECT { @@ -131,7 +131,7 @@ pub struct DSA { #[repr(C)] pub struct ECDSA_SIG { pub r: *mut BIGNUM, - pub s: *mut BIGNUM + pub s: *mut BIGNUM, } #[repr(C)] @@ -719,8 +719,11 @@ pub const CRYPTO_LOCK_X509: c_int = 3; pub const CRYPTO_LOCK_SSL_CTX: c_int = 12; pub const CRYPTO_LOCK_SSL_SESSION: c_int = 14; +#[cfg(ossl102h)] pub const X509_V_ERR_INVALID_CALL: c_int = 65; +#[cfg(ossl102h)] pub const X509_V_ERR_STORE_LOOKUP: c_int = 66; +#[cfg(ossl102h)] pub const X509_V_ERR_PROXY_SUBJECT_NAME_VIOLATION: c_int = 67; static mut MUTEXES: *mut Vec<Mutex<()>> = 0 as *mut Vec<Mutex<()>>; |