Revive CI
This commit is contained in:
parent
fc07d7dfbb
commit
ec45baa6d8
|
|
@ -57,4 +57,93 @@ jobs:
|
||||||
path: target
|
path: target
|
||||||
key: clippy-target-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }}
|
key: clippy-target-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }}
|
||||||
- name: Run clippy
|
- name: Run clippy
|
||||||
run: cargo clippy --all --all-targets
|
run: cargo clippy --all --all-targets
|
||||||
|
test:
|
||||||
|
name: Test
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
thing:
|
||||||
|
- stable
|
||||||
|
- macos-x86_64
|
||||||
|
- arm-android
|
||||||
|
- arm64-android
|
||||||
|
- i686-android
|
||||||
|
- x86_64-android
|
||||||
|
- i686-linux
|
||||||
|
- arm-linux
|
||||||
|
- aarch64-linux
|
||||||
|
- x86_64-musl
|
||||||
|
- x86_64-mingw
|
||||||
|
- i686-msvc
|
||||||
|
- x86_64-msvc
|
||||||
|
include:
|
||||||
|
- thing: stable
|
||||||
|
target: x86_64-unknown-linux-gnu
|
||||||
|
rust: stable
|
||||||
|
os: ubuntu-latest
|
||||||
|
- thing: macos-x86_64
|
||||||
|
target: x86_64-apple-darwin
|
||||||
|
rust: stable
|
||||||
|
os: macos-latest
|
||||||
|
- thing: arm-android
|
||||||
|
target: arm-linux-androideabi
|
||||||
|
rust: stable
|
||||||
|
os: ubuntu-latest
|
||||||
|
- thing: arm64-android
|
||||||
|
target: aarch64-linux-android
|
||||||
|
rust: stable
|
||||||
|
os: ubuntu-latest
|
||||||
|
- thing: i686-android
|
||||||
|
target: i686-linux-android
|
||||||
|
rust: stable
|
||||||
|
os: ubuntu-latest
|
||||||
|
- thing: x86_64-android
|
||||||
|
target: x86_64-linux-android
|
||||||
|
rust: stable
|
||||||
|
os: ubuntu-latest
|
||||||
|
- thing: i686-linux
|
||||||
|
target: i686-unknown-linux-gnu
|
||||||
|
rust: stable
|
||||||
|
os: ubuntu-latest
|
||||||
|
- thing: arm-linux
|
||||||
|
target: arm-unknown-linux-gnueabi
|
||||||
|
rust: stable
|
||||||
|
os: ubuntu-latest
|
||||||
|
- thing: aarch64-linux
|
||||||
|
target: aarch64-unknown-linux-gnu
|
||||||
|
rust: stable
|
||||||
|
os: ubuntu-latest
|
||||||
|
- thing: x86_64-musl
|
||||||
|
target: x86_64-unknown-linux-musl
|
||||||
|
rust: stable
|
||||||
|
os: ubuntu-latest
|
||||||
|
- thing: x86_64-mingw
|
||||||
|
target: x86_64-pc-windows-gnu
|
||||||
|
rust: stable
|
||||||
|
os: ubuntu-latest
|
||||||
|
- thing: i686-msvc
|
||||||
|
target: i686-pc-windows-msvc
|
||||||
|
rust: stable-i686-msvc
|
||||||
|
os: windows-latest
|
||||||
|
- thing: x86_64-msvc
|
||||||
|
target: x86_64-pc-windows-msvc
|
||||||
|
rust: stable-x86_64-msvc
|
||||||
|
os: windows-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: 'recursive'
|
||||||
|
- name: Install Rust (rustup)
|
||||||
|
run: rustup update ${{ matrix.rust }} --no-self-update && rustup default ${{ matrix.rust }}
|
||||||
|
shell: bash
|
||||||
|
- run: rustup target add ${{ matrix.target }}
|
||||||
|
- name: Install nasm
|
||||||
|
if: startsWith(matrix.os, 'windows')
|
||||||
|
run: choco install nasm
|
||||||
|
shell: cmd
|
||||||
|
- run: cargo test
|
||||||
|
if: startsWith(matrix.os, 'windows')
|
||||||
|
name: Run tests (Windows)
|
||||||
|
shell: cmd
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
[submodule "boring-sys/deps/boringssl"]
|
[submodule "boring-sys/deps/boringssl"]
|
||||||
path = boring-sys/deps/boringssl
|
path = boring-sys/deps/boringssl
|
||||||
url = https://github.com/google/boringssl.git
|
url = https://github.com/google/boringssl.git
|
||||||
ignore = dirty
|
ignore = dirty
|
||||||
|
|
@ -5,11 +5,20 @@ pub const SHA_CBLOCK: c_uint = 64;
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub struct SHA_CTX {
|
pub struct SHA_CTX {
|
||||||
|
#[cfg(windows)]
|
||||||
|
pub h: [c_uint; 5],
|
||||||
|
|
||||||
|
#[cfg(not(windows))]
|
||||||
pub h0: c_uint,
|
pub h0: c_uint,
|
||||||
|
#[cfg(not(windows))]
|
||||||
pub h1: c_uint,
|
pub h1: c_uint,
|
||||||
|
#[cfg(not(windows))]
|
||||||
pub h2: c_uint,
|
pub h2: c_uint,
|
||||||
|
#[cfg(not(windows))]
|
||||||
pub h3: c_uint,
|
pub h3: c_uint,
|
||||||
|
#[cfg(not(windows))]
|
||||||
pub h4: c_uint,
|
pub h4: c_uint,
|
||||||
|
|
||||||
pub Nl: c_uint,
|
pub Nl: c_uint,
|
||||||
pub Nh: c_uint,
|
pub Nh: c_uint,
|
||||||
pub data: [c_uchar; SHA_CBLOCK as usize],
|
pub data: [c_uchar; SHA_CBLOCK as usize],
|
||||||
|
|
|
||||||
|
|
@ -116,17 +116,6 @@ pub const EXFLAG_PROXY: u32 = 0x400;
|
||||||
pub const EXFLAG_INVALID_POLICY: u32 = 0x800;
|
pub const EXFLAG_INVALID_POLICY: u32 = 0x800;
|
||||||
pub const EXFLAG_FRESHEST: u32 = 0x1000;
|
pub const EXFLAG_FRESHEST: u32 = 0x1000;
|
||||||
pub const EXFLAG_SS: u32 = 0x2000;
|
pub const EXFLAG_SS: u32 = 0x2000;
|
||||||
/*
|
|
||||||
cfg_if! {
|
|
||||||
// probably gonna be in openssl-3.0.0-alpha7
|
|
||||||
if #[cfg(any(ossl300))] {
|
|
||||||
pub const EXFLAG_BCONS_CRITICAL: u32 = 0x10000;
|
|
||||||
pub const EXFLAG_AKID_CRITICAL: u32 = 0x20000;
|
|
||||||
pub const EXFLAG_SKID_CRITICAL: u32 = 0x40000;
|
|
||||||
pub const EXFLAG_SAN_CRITICAL: u32 = 0x80000;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
// X509_get_key_usage
|
// X509_get_key_usage
|
||||||
pub const X509v3_KU_DIGITAL_SIGNATURE: u32 = 0x0080;
|
pub const X509v3_KU_DIGITAL_SIGNATURE: u32 = 0x0080;
|
||||||
|
|
|
||||||
|
|
@ -1329,7 +1329,7 @@ impl SslContextBuilder {
|
||||||
///
|
///
|
||||||
/// [`SSL_CTX_sess_get_cache_size`]: https://www.openssl.org/docs/man1.0.2/man3/SSL_CTX_sess_set_cache_size.html
|
/// [`SSL_CTX_sess_get_cache_size`]: https://www.openssl.org/docs/man1.0.2/man3/SSL_CTX_sess_set_cache_size.html
|
||||||
#[allow(clippy::useless_conversion)]
|
#[allow(clippy::useless_conversion)]
|
||||||
pub fn set_session_cache_size(&mut self, size: u64) -> u64 {
|
pub fn set_session_cache_size(&mut self, size: u32) -> u64 {
|
||||||
unsafe { ffi::SSL_CTX_sess_set_cache_size(self.as_ptr(), size.into()).into() }
|
unsafe { ffi::SSL_CTX_sess_set_cache_size(self.as_ptr(), size.into()).into() }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue