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

Merge pull request #1459 from vishwin/master

Support LibreSSL 3.3.2
parents 127413a8 ad3995dc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -167,7 +167,7 @@ jobs:
            - target: x86_64-unknown-linux-gnu
              library:
                name: libressl
                version: 3.3.1
                version: 3.3.2
      name: ${{ matrix.target }}-${{ matrix.library.name }}-${{ matrix.library.version }}
      runs-on: ubuntu-latest
      env:
+3 −0
Original line number Diff line number Diff line
@@ -31,6 +31,9 @@ pub fn get(openssl_version: Option<u64>, libressl_version: Option<u64>) -> Vec<&
        if libressl_version >= 0x3_02_01_00_0 {
            cfgs.push("libressl321");
        }
        if libressl_version >= 0x3_03_02_00_0 {
            cfgs.push("libressl332");
        }
    } else {
        let openssl_version = openssl_version.unwrap();

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

@@ -272,7 +273,7 @@ fn version_error() -> ! {
        "

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

"
+9 −4
Original line number Diff line number Diff line
@@ -311,10 +311,15 @@ pub const SSL_OP_NO_TLSv1_1: c_ulong = 0x10000000;
pub const SSL_OP_NO_TLSv1_2: c_ulong = 0x08000000;

pub const SSL_OP_NO_TLSv1: c_ulong = 0x04000000;
#[cfg(ossl102)]
cfg_if! {
    if #[cfg(ossl102)] {
        pub const SSL_OP_NO_DTLSv1: c_ulong = 0x04000000;
#[cfg(ossl102)]
        pub const SSL_OP_NO_DTLSv1_2: c_ulong = 0x08000000;
    } else if #[cfg(libressl332)] {
        pub const SSL_OP_NO_DTLSv1: c_ulong = 0x40000000;
        pub const SSL_OP_NO_DTLSv1_2: c_ulong = 0x80000000;
    }
}
#[cfg(ossl111)]
pub const SSL_OP_NO_TLSv1_3: c_ulong = 0x20000000;

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

        if version >= 0x3_03_02_00_0 {
            println!("cargo:rustc-cfg=libressl332");
        }
    }
}
Loading