Commit ea03bc02 authored by Alex Gaynor's avatar Alex Gaynor
Browse files

Yet Another Attempt to LibreSSL 3.5.x

parent c30d4fdf
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -179,6 +179,11 @@ jobs:
              library:
                name: libressl
                version: 3.4.2
            - target: x86_64-unknown-linux-gnu
              bindgen: true
              library:
                name: libressl
                version: 3.5.2
            - target: x86_64-unknown-linux-gnu
              bindgen: false
              library:
@@ -189,6 +194,11 @@ jobs:
              library:
                name: libressl
                version: 3.4.2
            - target: x86_64-unknown-linux-gnu
              bindgen: false
              library:
                name: libressl
                version: 3.5.2
      name: ${{ matrix.target }}-${{ matrix.library.name }}-${{ matrix.library.version }}-${{ matrix.bindgen }}
      runs-on: ubuntu-latest
      env:
+3 −0
Original line number Diff line number Diff line
@@ -34,6 +34,9 @@ pub fn get(openssl_version: Option<u64>, libressl_version: Option<u64>) -> Vec<&
        if libressl_version >= 0x3_03_02_00_0 {
            cfgs.push("libressl332");
        }
        if libressl_version >= 0x3_05_00_00_0 {
            cfgs.push("libressl350");
        }
    } else {
        let openssl_version = openssl_version.unwrap();

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

@@ -309,7 +310,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.4.1, but a different version of OpenSSL was found. The build is now aborting
through 3.5, but a different version of OpenSSL was found. The build is now aborting
due to this version mismatch.

"
+2 −2
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@ extern "C" {
    pub fn BN_mul(r: *mut BIGNUM, a: *const BIGNUM, b: *const BIGNUM, ctx: *mut BN_CTX) -> c_int;
    pub fn BN_sqr(r: *mut BIGNUM, a: *const BIGNUM, ctx: *mut BN_CTX) -> c_int;
    pub fn BN_set_negative(bn: *mut BIGNUM, n: c_int);
    #[cfg(ossl110)]
    #[cfg(any(ossl110, libressl350))]
    pub fn BN_is_negative(b: *const ::BIGNUM) -> c_int;

    pub fn BN_div(
@@ -138,7 +138,7 @@ extern "C" {
}

cfg_if! {
    if #[cfg(ossl110)] {
    if #[cfg(any(ossl110, libressl350))] {
        extern "C" {
            pub fn BN_get_rfc2409_prime_768(bn: *mut BIGNUM) -> *mut BIGNUM;
            pub fn BN_get_rfc2409_prime_1024(bn: *mut BIGNUM) -> *mut BIGNUM;
+1 −1
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@ use libc::*;
use *;

cfg_if! {
    if #[cfg(ossl110)] {
    if #[cfg(any(ossl110, libressl350))] {
        extern "C" {
            pub fn HMAC_CTX_new() -> *mut HMAC_CTX;
            pub fn HMAC_CTX_free(ctx: *mut HMAC_CTX);
Loading