Commit e0efd1d4 authored by Christopher Vittal's avatar Christopher Vittal
Browse files

Add support for LibreSSL 2.6.2

parent 7159215e
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -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");
+1 −1
Original line number Diff line number Diff line
@@ -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();
+1 −1
Original line number Diff line number Diff line
@@ -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
    };