From cc811f5fd17ee808cbde4ff30cb84762e52fa371 Mon Sep 17 00:00:00 2001 From: Charlie Li Date: Fri, 16 Dec 2022 21:20:46 -0500 Subject: [PATCH 1/3] Add to CI/unblock LibreSSL 3.7.0 --- .github/workflows/ci.yml | 10 ++++++++++ openssl-sys/build/main.rs | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e4aeee0c9b..57728778f7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -187,6 +187,11 @@ jobs: library: name: libressl version: 3.6.1 + - target: x86_64-unknown-linux-gnu + bindgen: true + library: + name: libressl + version: 3.7.0 - target: x86_64-unknown-linux-gnu bindgen: false library: @@ -202,6 +207,11 @@ jobs: library: name: libressl version: 3.6.1 + - target: x86_64-unknown-linux-gnu + bindgen: false + library: + name: libressl + version: 3.7.0 exclude: - library: name: boringssl diff --git a/openssl-sys/build/main.rs b/openssl-sys/build/main.rs index 71b36c2309..cdea3eb447 100644 --- a/openssl-sys/build/main.rs +++ b/openssl-sys/build/main.rs @@ -282,6 +282,7 @@ See rust-openssl documentation for more information: (3, 5, _) => ('3', '5', 'x'), (3, 6, 0) => ('3', '6', '0'), (3, 6, _) => ('3', '6', 'x'), + (3, 7, 0) => ('3', '7', '0'), _ => version_error(), }; @@ -324,7 +325,7 @@ fn version_error() -> ! { " This crate is only compatible with OpenSSL (version 1.0.1 through 1.1.1, or 3.0.0), or LibreSSL 2.5 -through 3.6.x, but a different version of OpenSSL was found. The build is now aborting +through 3.7.0, but a different version of OpenSSL was found. The build is now aborting due to this version mismatch. " From 8178f3b38ab098e989846a01a560e26207f870b8 Mon Sep 17 00:00:00 2001 From: Charlie Li Date: Fri, 16 Dec 2022 21:42:52 -0500 Subject: [PATCH 2/3] Add LibreSSL 3.7.0 build cfg --- openssl-sys/build/cfgs.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/openssl-sys/build/cfgs.rs b/openssl-sys/build/cfgs.rs index 9ae7748cc6..6e1e5286a1 100644 --- a/openssl-sys/build/cfgs.rs +++ b/openssl-sys/build/cfgs.rs @@ -43,6 +43,9 @@ pub fn get(openssl_version: Option, libressl_version: Option) -> Vec<& if libressl_version >= 0x3_05_00_00_0 { cfgs.push("libressl350"); } + if libressl_version >= 0x3_07_00_00_0 { + cfgs.push("libressl370"); + } } else { let openssl_version = openssl_version.unwrap(); From fda7d92f033d5bcbba69850c27148869f01e5745 Mon Sep 17 00:00:00 2001 From: Charlie Li Date: Fri, 16 Dec 2022 21:43:31 -0500 Subject: [PATCH 3/3] X509_V_FLAG_CB_ISSUER_CHECK deprecated in LibreSSL 3.7.0 --- openssl-sys/src/x509_vfy.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openssl-sys/src/x509_vfy.rs b/openssl-sys/src/x509_vfy.rs index 8deaeeaaf3..455a748b52 100644 --- a/openssl-sys/src/x509_vfy.rs +++ b/openssl-sys/src/x509_vfy.rs @@ -100,9 +100,9 @@ cfg_if! { #[cfg(ossl300)] pub const X509_V_ERR_INVALID_CA: c_int = 79; -#[cfg(not(ossl110))] +#[cfg(not(any(ossl110, libressl370)))] pub const X509_V_FLAG_CB_ISSUER_CHECK: c_ulong = 0x1; -#[cfg(ossl110)] +#[cfg(any(ossl110, libressl370))] pub const X509_V_FLAG_CB_ISSUER_CHECK: c_ulong = 0x0; pub const X509_V_FLAG_USE_CHECK_TIME: c_ulong = 0x2; pub const X509_V_FLAG_CRL_CHECK: c_ulong = 0x4;