Remove ossl110f config gate

This commit is contained in:
Ivan Nikulin 2020-11-11 13:15:02 +00:00
parent 0da810d4d5
commit a4c8a21997
8 changed files with 11 additions and 27 deletions

View File

@ -192,7 +192,6 @@ fn main() {
cfgs.push("ossl102f"); cfgs.push("ossl102f");
cfgs.push("ossl102h"); cfgs.push("ossl102h");
cfgs.push("ossl110"); cfgs.push("ossl110");
cfgs.push("ossl110f");
for cfg in cfgs { for cfg in cfgs {
println!("cargo:rustc-cfg={}", cfg); println!("cargo:rustc-cfg={}", cfg);

View File

@ -148,15 +148,7 @@ pub const SSL_OP_NO_TLSv1_3: c_uint = 0x20000000;
#[cfg(ossl110h)] #[cfg(ossl110h)]
pub const SSL_OP_NO_RENEGOTIATION: c_uint = 0x40000000; pub const SSL_OP_NO_RENEGOTIATION: c_uint = 0x40000000;
cfg_if! { pub const SSL_OP_ALL: c_uint = SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS | SSL_OP_LEGACY_SERVER_CONNECT;
if #[cfg(ossl110f)] {
pub const SSL_OP_ALL: c_uint =
SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS
| SSL_OP_LEGACY_SERVER_CONNECT;
} else {
pub const SSL_OP_ALL: c_uint = 0x80000BFF;
}
}
cfg_if! { cfg_if! {
if #[cfg(ossl110)] { if #[cfg(ossl110)] {
@ -352,7 +344,10 @@ extern "C" {
} }
extern "C" { extern "C" {
pub fn SSL_CTX_set_keylog_callback(ctx: *mut SSL_CTX, cb: Option<unsafe extern "C" fn(ssl: *const SSL, line: *const c_char)>); pub fn SSL_CTX_set_keylog_callback(
ctx: *mut SSL_CTX,
cb: Option<unsafe extern "C" fn(ssl: *const SSL, line: *const c_char)>,
);
pub fn SSL_get_finished(s: *const SSL, buf: *mut c_void, count: size_t) -> size_t; pub fn SSL_get_finished(s: *const SSL, buf: *mut c_void, count: size_t) -> size_t;
pub fn SSL_get_peer_finished(s: *const SSL, buf: *mut c_void, count: size_t) -> size_t; pub fn SSL_get_peer_finished(s: *const SSL, buf: *mut c_void, count: size_t) -> size_t;
@ -720,16 +715,8 @@ extern "C" {
pub fn SSL_session_reused(ssl: *const SSL) -> c_int; pub fn SSL_session_reused(ssl: *const SSL) -> c_int;
} }
cfg_if! { extern "C" {
if #[cfg(any(ossl110f, libressl273))] { pub fn SSL_is_server(s: *const SSL) -> c_int;
extern "C" {
pub fn SSL_is_server(s: *const SSL) -> c_int;
}
} else if #[cfg(ossl102)] {
extern "C" {
pub fn SSL_is_server(s: *mut SSL) -> c_int;
}
}
} }
#[cfg(ossl110)] #[cfg(ossl110)]

View File

@ -6,7 +6,6 @@ fn main() {
cfgs.push("ossl102f"); cfgs.push("ossl102f");
cfgs.push("ossl102h"); cfgs.push("ossl102h");
cfgs.push("ossl110"); cfgs.push("ossl110");
cfgs.push("ossl110f");
for cfg in cfgs { for cfg in cfgs {
println!("cargo:rustc-cfg={}", cfg); println!("cargo:rustc-cfg={}", cfg);

View File

@ -19,7 +19,7 @@
//! [`Cipher`]: ../symm/struct.Cipher.html //! [`Cipher`]: ../symm/struct.Cipher.html
//! //!
//! # Examples //! # Examples
//! //!
//! ## Key wrapping //! ## Key wrapping
//! ```rust //! ```rust
//! use openssl::aes::{AesKey, unwrap_key, wrap_key}; //! use openssl::aes::{AesKey, unwrap_key, wrap_key};

View File

@ -170,4 +170,4 @@ cfg_if! {
} }
} }
} }
} }

View File

@ -367,4 +367,4 @@ where
let line = str::from_utf8_unchecked(line); let line = str::from_utf8_unchecked(line);
callback(ssl, line); callback(ssl, line);
} }

View File

@ -36,7 +36,7 @@ fn test_debug() {
let cert = include_bytes!("../../test/cert.pem"); let cert = include_bytes!("../../test/cert.pem");
let cert = X509::from_pem(cert).unwrap(); let cert = X509::from_pem(cert).unwrap();
let debugged = format!("{:#?}", cert); let debugged = format!("{:#?}", cert);
assert!(debugged.contains(r#"serial_number: "8771f7bdee982fa5""#)); assert!(debugged.contains(r#"serial_number: "8771f7bdee982fa5""#));
assert!(debugged.contains(r#"signature_algorithm: sha256WithRSAEncryption"#)); assert!(debugged.contains(r#"signature_algorithm: sha256WithRSAEncryption"#));
assert!(debugged.contains(r#"countryName = "AU""#)); assert!(debugged.contains(r#"countryName = "AU""#));

View File

@ -30,7 +30,6 @@ fn main() {
cfgs.push("ossl102f"); cfgs.push("ossl102f");
cfgs.push("ossl102h"); cfgs.push("ossl102h");
cfgs.push("ossl110"); cfgs.push("ossl110");
cfgs.push("ossl110f");
for c in cfgs { for c in cfgs {
cfg.cfg(c, None); cfg.cfg(c, None);