aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Vittal <[email protected]>2017-10-03 23:53:50 -0400
committerChristopher Vittal <[email protected]>2017-10-03 23:59:33 -0400
commite0efd1d438fbf426a7e1006e4983b0f352c630f6 (patch)
tree626c6643d3b39e115cc5f43b330c688daf86e18a
parentMerge pull request #743 from AndyGauge/doc-asn1 (diff)
downloadrust-openssl-e0efd1d438fbf426a7e1006e4983b0f352c630f6.tar.xz
rust-openssl-e0efd1d438fbf426a7e1006e4983b0f352c630f6.zip
Add support for LibreSSL 2.6.2
-rw-r--r--openssl-sys/build.rs11
-rw-r--r--openssl/src/ssl/tests/mod.rs2
-rw-r--r--systest/build.rs2
3 files changed, 12 insertions, 3 deletions
diff --git a/openssl-sys/build.rs b/openssl-sys/build.rs
index 4848f236..34b74f82 100644
--- a/openssl-sys/build.rs
+++ b/openssl-sys/build.rs
@@ -316,8 +316,10 @@ fn validate_headers(include_dirs: &[PathBuf]) -> Version {
#include <openssl/opensslv.h>
#include <openssl/opensslconf.h>
-#if LIBRESSL_VERSION_NUMBER >= 0x20602000
+#if LIBRESSL_VERSION_NUMBER >= 0x20603000
RUST_LIBRESSL_NEW
+#elif LIBRESSL_VERSION_NUMBER >= 0x20602000
+RUST_LIBRESSL_262
#elif LIBRESSL_VERSION_NUMBER >= 0x20601000
RUST_LIBRESSL_261
#elif LIBRESSL_VERSION_NUMBER >= 0x20600000
@@ -466,6 +468,13 @@ See rust-openssl README for more information:
println!("cargo:libressl_version=261");
println!("cargo:version=101");
Version::Libressl
+ } else if expanded.contains("RUST_LIBRESSL_262") {
+ println!("cargo:rustc-cfg=libressl");
+ println!("cargo:rustc-cfg=libressl262");
+ println!("cargo:libressl=true");
+ println!("cargo:libressl_version=262");
+ println!("cargo:version=101");
+ Version::Libressl
} else if expanded.contains("RUST_OPENSSL_110F") {
println!("cargo:rustc-cfg=ossl110");
println!("cargo:rustc-cfg=ossl110f");
diff --git a/openssl/src/ssl/tests/mod.rs b/openssl/src/ssl/tests/mod.rs
index a3ac6832..38c553e7 100644
--- a/openssl/src/ssl/tests/mod.rs
+++ b/openssl/src/ssl/tests/mod.rs
@@ -616,7 +616,7 @@ fn test_connect_with_npn_successful_single_match() {
/// Tests that when the `SslStream` is created as a server stream, the protocols
/// are correctly advertised to the client.
#[test]
-#[cfg(not(libressl261))]
+#[cfg(all(not(libressl261),not(libressl262)))]
fn test_npn_server_advertise_multiple() {
let listener = TcpListener::bind("127.0.0.1:0").unwrap();
let localhost = listener.local_addr().unwrap();
diff --git a/systest/build.rs b/systest/build.rs
index 45e335c0..7418cca0 100644
--- a/systest/build.rs
+++ b/systest/build.rs
@@ -42,7 +42,7 @@ fn main() {
}
let has_cms_h = if let Ok(version) = env::var("DEP_OPENSSL_LIBRESSL_VERSION") {
- version != "261"
+ version != "261" && version != "262"
} else {
true
};