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

Merge pull request #991 from sfackler/libressl-28

Support libressl 2.8.0
parents a29c789e 9e1a6f28
Loading
Loading
Loading
Loading
+5 −7
Original line number Diff line number Diff line
@@ -76,9 +76,7 @@ macos_job: &MACOS_JOB
  - run: sudo chown -R $USER /usr/local /opt
  - run: curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain 1.20.0
  - run: sudo ln -s $CARGO_HOME/bin/* /usr/local/bin
  - *RESTORE_REGISTRY
  - run: cargo generate-lockfile --verbose
  - *SAVE_REGISTRY
  - run: echo "homebrew-x86_64-apple-darwin" > ~/lib_key
  - *RESTORE_DEPS
  - run: cargo run --manifest-path=systest/Cargo.toml --features "$FEATURES"
@@ -108,9 +106,9 @@ openssl_101: &OPENSSL_101
libressl_250: &LIBRESSL_250
  LIBRARY: libressl
  VERSION: 2.5.0
libressl_270: &LIBRESSL_272
libressl_270: &LIBRESSL_280
  LIBRARY: libressl
  VERSION: 2.7.2
  VERSION: 2.8.0

x86_64: &X86_64
  TARGET: x86_64-unknown-linux-gnu
@@ -195,10 +193,10 @@ jobs:
    <<: *JOB
    environment:
      <<: [*LIBRESSL_250, *X86_64, *BASE]
  x86_64-libressl-2.7.2:
  x86_64-libressl-2.8.0:
    <<: *JOB
    environment:
      <<: [*LIBRESSL_272, *X86_64, *BASE]
      <<: [*LIBRESSL_280, *X86_64, *BASE]
  macos:
    <<: *MACOS_JOB
    environment:
@@ -226,6 +224,6 @@ workflows:
    - armhf-openssl-1.1.0
    - armhf-openssl-1.0.2
    - x86_64-libressl-2.5.0
    - x86_64-libressl-2.7.2
    - x86_64-libressl-2.8.0
    - macos
    - macos-vendored
+3 −0
Original line number Diff line number Diff line
@@ -16,6 +16,9 @@ pub fn get(openssl_version: Option<u64>, libressl_version: Option<u64>) -> Vec<&
        if libressl_version >= 0x2_07_03_00_0 {
            cfgs.push("libressl273");
        }
        if libressl_version >= 0x2_08_00_00_0 {
            cfgs.push("libressl280");
        }
    } else {
        let openssl_version = openssl_version.unwrap();

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

+1 −1
Original line number Diff line number Diff line
@@ -49,7 +49,7 @@ extern "C" {
}

cfg_if! {
    if #[cfg(ossl110)] {
    if #[cfg(any(ossl110, libressl280))] {
        extern "C" {
            pub fn ASN1_STRING_to_UTF8(out: *mut *mut c_uchar, s: *const ASN1_STRING) -> c_int;
        }
+5 −14
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@ pub type bio_info_cb =
    Option<unsafe extern "C" fn(*mut BIO, c_int, *const c_char, c_int, c_long, c_long)>;

cfg_if! {
    if #[cfg(ossl110)] {
    if #[cfg(any(ossl110, libressl280))] {
        pub enum BIO_METHOD {}
    } else {
        #[repr(C)]
@@ -60,23 +60,14 @@ pub unsafe fn BIO_get_mem_data(b: *mut BIO, pp: *mut *mut c_char) -> c_long {
}

cfg_if! {
    if #[cfg(ossl110)] {
    if #[cfg(any(ossl110, libressl280))] {
        extern "C" {
            pub fn BIO_s_file() -> *const BIO_METHOD;
        }
    } else {
        extern "C" {
            pub fn BIO_s_file() -> *mut BIO_METHOD;
        }
    }
}
cfg_if! {
    if #[cfg(ossl110)] {
        extern "C" {
            pub fn BIO_new(type_: *const BIO_METHOD) -> *mut BIO;
        }
    } else {
        extern "C" {
            pub fn BIO_s_file() -> *mut BIO_METHOD;
            pub fn BIO_new(type_: *mut BIO_METHOD) -> *mut BIO;
        }
    }
@@ -96,7 +87,7 @@ extern "C" {
}

cfg_if! {
    if #[cfg(ossl110)] {
    if #[cfg(any(ossl110, libressl280))] {
        extern "C" {
            pub fn BIO_s_mem() -> *const BIO_METHOD;
        }
@@ -107,7 +98,7 @@ cfg_if! {
    }
}
cfg_if! {
    if #[cfg(ossl102)] {
    if #[cfg(any(ossl102, libressl280))] {
        extern "C" {
            pub fn BIO_new_mem_buf(buf: *const c_void, len: c_int) -> *mut BIO;
        }
Loading