Unverified Commit faa86ae8 authored by Steven Fackler's avatar Steven Fackler Committed by GitHub
Browse files

Merge pull request #1333 from vishwin/master

Support LibreSSL 3.3.1
parents 3f724f16 d71a757a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -290,10 +290,10 @@ workflows:
          library: libressl
          version: 2.5.5
      - linux:
          name: x86_64-libressl-3.2.0
          name: x86_64-libressl-3.3.1
          target: x86_64-unknown-linux-gnu
          library: libressl
          version: 3.2.0
          version: 3.3.1
      - macos:
          name: macos
      - macos:
+3 −0
Original line number Diff line number Diff line
@@ -29,6 +29,9 @@ pub fn get(openssl_version: Option<u64>, libressl_version: Option<u64>) -> Vec<&
        if libressl_version >= 0x2_09_01_00_0 {
            cfgs.push("libressl291");
        }
        if libressl_version >= 0x3_02_01_00_0 {
            cfgs.push("libressl321");
        }
    } else {
        let openssl_version = openssl_version.unwrap();

+5 −1
Original line number Diff line number Diff line
@@ -222,6 +222,10 @@ See rust-openssl README for more information:
            (3, 1, 0) => ('3', '1', '0'),
            (3, 1, _) => ('3', '1', 'x'),
            (3, 2, 0) => ('3', '2', '0'),
            (3, 2, 1) => ('3', '2', '1'),
            (3, 2, _) => ('3', '2', 'x'),
            (3, 3, 0) => ('3', '3', '0'),
            (3, 3, 1) => ('3', '3', '1'),
            _ => version_error(),
        };

@@ -262,7 +266,7 @@ fn version_error() -> ! {
        "

This crate is only compatible with OpenSSL 1.0.1 through 1.1.1, or LibreSSL 2.5
through 3.2.0, but a different version of OpenSSL was found. The build is now aborting
through 3.3.1, but a different version of OpenSSL was found. The build is now aborting
due to this version mismatch.

"
+4 −0
Original line number Diff line number Diff line
@@ -63,5 +63,9 @@ fn main() {
        if version >= 0x2_09_01_00_0 {
            println!("cargo:rustc-cfg=libressl291");
        }

        if version >= 0x3_02_01_00_0 {
            println!("cargo:rustc-cfg=libressl321");
        }
    }
}
+6 −0
Original line number Diff line number Diff line
@@ -554,6 +554,7 @@ fn read_panic() {
}

#[test]
#[cfg_attr(libressl321, ignore)]
#[should_panic(expected = "blammo")]
fn flush_panic() {
    struct ExplodingStream(TcpStream);
@@ -841,6 +842,7 @@ fn cert_store() {
}

#[test]
#[cfg_attr(libressl321, ignore)]
fn tmp_dh_callback() {
    static CALLED_BACK: AtomicBool = AtomicBool::new(false);

@@ -887,6 +889,7 @@ fn tmp_ecdh_callback() {
}

#[test]
#[cfg_attr(libressl321, ignore)]
fn tmp_dh_callback_ssl() {
    static CALLED_BACK: AtomicBool = AtomicBool::new(false);

@@ -944,6 +947,7 @@ fn idle_session() {
}

#[test]
#[cfg_attr(libressl321, ignore)]
fn active_session() {
    let server = Server::builder().build();

@@ -999,6 +1003,7 @@ fn status_callbacks() {
}

#[test]
#[cfg_attr(libressl321, ignore)]
fn new_session_callback() {
    static CALLED_BACK: AtomicBool = AtomicBool::new(false);

@@ -1022,6 +1027,7 @@ fn new_session_callback() {
}

#[test]
#[cfg_attr(libressl321, ignore)]
fn new_session_callback_swapped_ctx() {
    static CALLED_BACK: AtomicBool = AtomicBool::new(false);