diff options
Diffstat (limited to 'openssl-sys')
| -rw-r--r-- | openssl-sys/Cargo.toml | 8 | ||||
| -rw-r--r-- | openssl-sys/build.rs | 18 | ||||
| -rw-r--r-- | openssl-sys/src/lib.rs | 17 |
3 files changed, 34 insertions, 9 deletions
diff --git a/openssl-sys/Cargo.toml b/openssl-sys/Cargo.toml index 3c9d98f3..41d5f255 100644 --- a/openssl-sys/Cargo.toml +++ b/openssl-sys/Cargo.toml @@ -1,12 +1,12 @@ [package] name = "openssl-sys" -version = "0.9.12" +version = "0.9.14" authors = ["Alex Crichton <[email protected]>", "Steven Fackler <[email protected]>"] license = "MIT" description = "FFI bindings to OpenSSL" repository = "https://github.com/sfackler/rust-openssl" -documentation = "https://docs.rs/openssl-sys/0.9.12/openssl_sys" +documentation = "https://docs.rs/openssl-sys/0.9.13/openssl_sys" categories = ["cryptography", "external-ffi-bindings"] links = "openssl" build = "build.rs" @@ -18,10 +18,6 @@ libc = "0.2" pkg-config = "0.3.9" gcc = "0.3.42" -[target.'cfg(windows)'.dependencies] -user32-sys = "0.2" -gdi32-sys = "0.2" - # We don't actually use metadeps for annoying reasons but this is still here for tooling [package.metadata.pkg-config] openssl = "1.0.1" diff --git a/openssl-sys/build.rs b/openssl-sys/build.rs index 983c5899..348c2f82 100644 --- a/openssl-sys/build.rs +++ b/openssl-sys/build.rs @@ -237,8 +237,10 @@ fn validate_headers(include_dirs: &[PathBuf]) -> Version { #include <openssl/opensslv.h> #include <openssl/opensslconf.h> -#if LIBRESSL_VERSION_NUMBER >= 0x20505000 +#if LIBRESSL_VERSION_NUMBER >= 0x20601000 RUST_LIBRESSL_NEW +#elif LIBRESSL_VERSION_NUMBER >= 0x20600000 +RUST_LIBRESSL_260 #elif LIBRESSL_VERSION_NUMBER >= 0x20504000 RUST_LIBRESSL_254 #elif LIBRESSL_VERSION_NUMBER >= 0x20503000 @@ -253,6 +255,8 @@ RUST_LIBRESSL_250 RUST_LIBRESSL_OLD #elif OPENSSL_VERSION_NUMBER >= 0x10101000 RUST_OPENSSL_NEW +#elif OPENSSL_VERSION_NUMBER >= 0x10100060 +RUST_OPENSSL_110F #elif OPENSSL_VERSION_NUMBER >= 0x10100000 RUST_OPENSSL_110 #elif OPENSSL_VERSION_NUMBER >= 0x10002000 @@ -348,6 +352,18 @@ See rust-openssl README for more information: println!("cargo:libressl=true"); println!("cargo:version=101"); Version::Libressl + } else if expanded.contains("RUST_LIBRESSL_260") { + println!("cargo:rustc-cfg=libressl"); + println!("cargo:rustc-cfg=libressl260"); + println!("cargo:libressl=true"); + println!("cargo:version=101"); + Version::Libressl + } else if expanded.contains("RUST_OPENSSL_110F") { + println!("cargo:rustc-cfg=ossl110"); + println!("cargo:rustc-cfg=ossl110f"); + println!("cargo:version=110"); + println!("cargo:patch=f"); + Version::Openssl110 } else if expanded.contains("RUST_OPENSSL_110") { println!("cargo:rustc-cfg=ossl110"); println!("cargo:version=110"); diff --git a/openssl-sys/src/lib.rs b/openssl-sys/src/lib.rs index 06d37dab..00e1208b 100644 --- a/openssl-sys/src/lib.rs +++ b/openssl-sys/src/lib.rs @@ -1,6 +1,6 @@ #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] #![allow(dead_code, overflowing_literals)] -#![doc(html_root_url="https://docs.rs/openssl-sys/0.9.12")] +#![doc(html_root_url="https://docs.rs/openssl-sys/0.9.14")] extern crate libc; @@ -1205,8 +1205,18 @@ pub const SSL_VERIFY_FAIL_IF_NO_PEER_CERT: c_int = 2; #[cfg(not(ossl101))] pub const SSL_OP_TLSEXT_PADDING: c_ulong = 0x00000010; pub const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS: c_ulong = 0x00000800; +pub const SSL_OP_CRYPTOPRO_TLSEXT_BUG: c_ulong = 0x80000000; +pub const SSL_OP_LEGACY_SERVER_CONNECT: c_ulong = 0x00000004; #[cfg(not(libressl))] +pub const SSL_OP_SAFARI_ECDHE_ECDSA_BUG: c_ulong = 0x00000040; +#[cfg(not(any(libressl, ossl110f)))] pub const SSL_OP_ALL: c_ulong = 0x80000BFF; +#[cfg(ossl110f)] +pub const SSL_OP_ALL: c_ulong = SSL_OP_CRYPTOPRO_TLSEXT_BUG | + SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS | + SSL_OP_LEGACY_SERVER_CONNECT | + SSL_OP_TLSEXT_PADDING | + SSL_OP_SAFARI_ECDHE_ECDSA_BUG; pub const SSL_OP_NO_QUERY_MTU: c_ulong = 0x00001000; pub const SSL_OP_COOKIE_EXCHANGE: c_ulong = 0x00002000; pub const SSL_OP_NO_TICKET: c_ulong = 0x00004000; @@ -2273,8 +2283,10 @@ extern "C" { len: *mut c_uint); pub fn SSL_get_session(s: *const SSL) -> *mut SSL_SESSION; pub fn SSL_set_session(ssl: *mut SSL, session: *mut SSL_SESSION) -> c_int; - #[cfg(not(any(ossl101, libressl)))] + #[cfg(not(any(ossl101, libressl, ossl110f)))] pub fn SSL_is_server(s: *mut SSL) -> c_int; + #[cfg(ossl110f)] + pub fn SSL_is_server(s: *const SSL) -> c_int; pub fn SSL_SESSION_free(s: *mut SSL_SESSION); pub fn SSL_SESSION_get_id(s: *const SSL_SESSION, len: *mut c_uint) -> *const c_uchar; @@ -2409,6 +2421,7 @@ extern "C" { pub fn i2d_X509_REQ_bio(b: *mut BIO, x: *mut X509_REQ) -> c_int; pub fn i2d_X509_REQ(x: *mut X509_REQ, buf: *mut *mut u8) -> c_int; + pub fn d2i_AutoPrivateKey(a: *mut *mut EVP_PKEY, pp: *mut *const c_uchar, length: c_long) -> *mut EVP_PKEY; pub fn d2i_PUBKEY(k: *mut *mut EVP_PKEY, buf: *mut *const u8, len: c_long) -> *mut EVP_PKEY; pub fn i2d_PUBKEY_bio(b: *mut BIO, x: *mut EVP_PKEY) -> c_int; pub fn i2d_PrivateKey_bio(b: *mut BIO, x: *mut EVP_PKEY) -> c_int; |