From b6971883bea0ba9701e47570418f3289d64a65f0 Mon Sep 17 00:00:00 2001 From: Charlie Li Date: Thu, 27 Sep 2018 01:19:39 -0400 Subject: [PATCH 1/4] Support the rest of LibreSSL 2.8.x LibreSSL 2.8.1 released, so update the check for all versions in the series, not just 2.8.0. --- openssl-sys/build/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openssl-sys/build/main.rs b/openssl-sys/build/main.rs index 4c615401..a5b713ae 100644 --- a/openssl-sys/build/main.rs +++ b/openssl-sys/build/main.rs @@ -497,7 +497,7 @@ See rust-openssl README for more information: (6, 2) => ('6', '2'), (6, _) => ('6', 'x'), (7, _) => ('7', 'x'), - (8, 0) => ('8', 'x'), + (8, _) => ('8', 'x'), _ => version_error(), }; @@ -538,7 +538,7 @@ fn version_error() -> ! { " This crate is only compatible with OpenSSL 1.0.1 through 1.1.1, or LibreSSL 2.5 -through 2.7, but a different version of OpenSSL was found. The build is now aborting +through 2.8, but a different version of OpenSSL was found. The build is now aborting due to this version mismatch. " From 72a60af5039a902da6cb634d345c61f7fafe2b0b Mon Sep 17 00:00:00 2001 From: Charlie Li Date: Thu, 27 Sep 2018 01:46:10 -0400 Subject: [PATCH 2/4] Only whitelist LibreSSL 2.8.0 and 2.8.1 ABI is not declared stable for anything past 2.8.1 yet. --- openssl-sys/build/main.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openssl-sys/build/main.rs b/openssl-sys/build/main.rs index a5b713ae..062ba21e 100644 --- a/openssl-sys/build/main.rs +++ b/openssl-sys/build/main.rs @@ -497,7 +497,8 @@ See rust-openssl README for more information: (6, 2) => ('6', '2'), (6, _) => ('6', 'x'), (7, _) => ('7', 'x'), - (8, _) => ('8', 'x'), + (8, 0) => ('8', '0'), + (8, 1) => ('8', '1'), _ => version_error(), }; @@ -538,7 +539,7 @@ fn version_error() -> ! { " This crate is only compatible with OpenSSL 1.0.1 through 1.1.1, or LibreSSL 2.5 -through 2.8, but a different version of OpenSSL was found. The build is now aborting +through 2.8.1, but a different version of OpenSSL was found. The build is now aborting due to this version mismatch. " From e6da0fa4a10da994ee6ff675117684c74f022be0 Mon Sep 17 00:00:00 2001 From: Charlie Li Date: Sat, 29 Sep 2018 14:59:50 -0400 Subject: [PATCH 3/4] Bump LibreSSL 2.8 version in CircleCI --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a7fd91b4..e325ea78 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -108,7 +108,7 @@ libressl_250: &LIBRESSL_250 VERSION: 2.5.0 libressl_270: &LIBRESSL_280 LIBRARY: libressl - VERSION: 2.8.0 + VERSION: 2.8.1 x86_64: &X86_64 TARGET: x86_64-unknown-linux-gnu From b86f547dbf274dbbad0433d5d5731596f45ea3c6 Mon Sep 17 00:00:00 2001 From: Charlie Li Date: Mon, 1 Oct 2018 00:44:37 -0400 Subject: [PATCH 4/4] Update the OCSP_cert_to_id() signature for LibreSSL 2.8.1 While here, restore CI for LibreSSL 2.8.0 alongside 2.8.1 to account for the function signature change. --- .circleci/config.yml | 8 ++++++++ openssl-sys/build/cfgs.rs | 3 +++ openssl-sys/src/ocsp.rs | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e325ea78..58509952 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -107,6 +107,9 @@ libressl_250: &LIBRESSL_250 LIBRARY: libressl VERSION: 2.5.0 libressl_270: &LIBRESSL_280 + LIBRARY: libressl + VERSION: 2.8.0 +libressl_281: &LIBRESSL_281 LIBRARY: libressl VERSION: 2.8.1 @@ -197,6 +200,10 @@ jobs: <<: *JOB environment: <<: [*LIBRESSL_280, *X86_64, *BASE] + x86_64-libressl-2.8.1: + <<: *JOB + environment: + <<: [*LIBRESSL_281, *X86_64, *BASE] macos: <<: *MACOS_JOB environment: @@ -225,5 +232,6 @@ workflows: - armhf-openssl-1.0.2 - x86_64-libressl-2.5.0 - x86_64-libressl-2.8.0 + - x86_64-libressl-2.8.1 - macos - macos-vendored diff --git a/openssl-sys/build/cfgs.rs b/openssl-sys/build/cfgs.rs index cfd85cbb..e07be8cf 100644 --- a/openssl-sys/build/cfgs.rs +++ b/openssl-sys/build/cfgs.rs @@ -19,6 +19,9 @@ pub fn get(openssl_version: Option, libressl_version: Option) -> Vec<& if libressl_version >= 0x2_08_00_00_0 { cfgs.push("libressl280"); } + if libressl_version >= 0x2_08_01_00_0 { + cfgs.push("libressl281"); + } } else { let openssl_version = openssl_version.unwrap(); diff --git a/openssl-sys/src/ocsp.rs b/openssl-sys/src/ocsp.rs index 19247ce2..82157f32 100644 --- a/openssl-sys/src/ocsp.rs +++ b/openssl-sys/src/ocsp.rs @@ -45,7 +45,7 @@ pub const V_OCSP_CERTSTATUS_UNKNOWN: c_int = 2; pub enum OCSP_BASICRESP {} cfg_if! { - if #[cfg(ossl110)] { + if #[cfg(any(ossl110, libressl281))] { extern "C" { pub fn OCSP_cert_to_id( dgst: *const EVP_MD,