Skip to content

Commit

Permalink
Merge pull request #2035 from alex/libressl-381
Browse files Browse the repository at this point in the history
LibreSSL 3.8.1 support
  • Loading branch information
alex committed Sep 1, 2023
2 parents 00dacb9 + fc1ca1f commit 2d7c86c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ jobs:
bindgen: false
library:
name: libressl
version: 3.8.0
version: 3.8.1
name: ${{ matrix.target }}-${{ matrix.library.name }}-${{ matrix.library.version }}-${{ matrix.bindgen }}
runs-on: ubuntu-latest
env:
Expand Down
3 changes: 3 additions & 0 deletions openssl-sys/build/cfgs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ pub fn get(openssl_version: Option<u64>, libressl_version: Option<u64>) -> Vec<&
if libressl_version >= 0x3_07_00_00_0 {
cfgs.push("libressl370");
}
if libressl_version >= 0x3_08_01_00_0 {
cfgs.push("libressl381");
}
} else {
let openssl_version = openssl_version.unwrap();

Expand Down
5 changes: 3 additions & 2 deletions openssl-sys/build/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ See rust-openssl documentation for more information:
(3, 7, 1) => ('3', '7', '1'),
(3, 7, _) => ('3', '7', 'x'),
(3, 8, 0) => ('3', '8', '0'),
(3, 8, 1) => ('3', '8', '1'),
_ => version_error(),
};

Expand Down Expand Up @@ -314,8 +315,8 @@ fn version_error() -> ! {
panic!(
"
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.8.0, but a different version of OpenSSL was found. The build is now aborting
This crate is only compatible with OpenSSL (version 1.0.1 through 1.1.1, or 3), or LibreSSL 2.5
through 3.8.1, but a different version of OpenSSL was found. The build is now aborting
due to this version mismatch.
"
Expand Down
2 changes: 1 addition & 1 deletion openssl-sys/src/crypto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ pub const CRYPTO_LOCK_SSL_CTX: c_int = 12;
pub const CRYPTO_LOCK_SSL_SESSION: c_int = 14;

cfg_if! {
if #[cfg(ossl110)] {
if #[cfg(any(ossl110, libressl381))] {
pub const CRYPTO_EX_INDEX_SSL: c_int = 0;
pub const CRYPTO_EX_INDEX_SSL_CTX: c_int = 1;
} else if #[cfg(libressl)] {
Expand Down

0 comments on commit 2d7c86c

Please sign in to comment.