From 0bbb08a0e83281c3d8ccfd5d9edb50cd8eaea9c8 Mon Sep 17 00:00:00 2001 From: stormshield-gt <143998166+stormshield-gt@users.noreply.github.com.> Date: Wed, 6 Nov 2024 17:35:53 +0100 Subject: [PATCH] do not compile aws-lc-rs by default --- .github/workflows/rust.yml | 6 +++--- quinn/Cargo.toml | 9 +++++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 96cf37f6a..5526d2e74 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -64,10 +64,10 @@ jobs: - uses: Swatinem/rust-cache@v2 # Prevent feature unification from selecting *ring* as the crypto provider - run: RUST_BACKTRACE=1 cargo test --manifest-path quinn-proto/Cargo.toml --no-default-features --features rustls-aws-lc-rs - - run: RUST_BACKTRACE=1 cargo test --manifest-path quinn/Cargo.toml --no-default-features --features rustls-aws-lc-rs,runtime-tokio + - run: RUST_BACKTRACE=1 cargo test --manifest-path quinn/Cargo.toml --no-default-features --features rustls-aws-lc-rs,runtime-tokio,__rustls-post-quantum-test # FIPS - run: RUST_BACKTRACE=1 cargo test --manifest-path quinn-proto/Cargo.toml --no-default-features --features rustls-aws-lc-rs-fips - - run: RUST_BACKTRACE=1 cargo test --manifest-path quinn/Cargo.toml --no-default-features --features rustls-aws-lc-rs-fips,runtime-tokio + - run: RUST_BACKTRACE=1 cargo test --manifest-path quinn/Cargo.toml --no-default-features --features rustls-aws-lc-rs-fips,__rustls-post-quantum-test,runtime-tokio msrv: runs-on: ubuntu-latest @@ -174,7 +174,7 @@ jobs: env: RUSTFLAGS: -Dwarnings # skip FIPS features outside of Linux - SKIP_FEATURES: ${{ matrix.os != 'ubuntu-latest' && 'rustls-aws-lc-rs-fips,aws-lc-rs-fips' || '' }} + SKIP_FEATURES: ${{ matrix.os != 'ubuntu-latest' && 'rustls-aws-lc-rs-fips,aws-lc-rs-fips,__rustls-post-quantum-test' || '' }} steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable diff --git a/quinn/Cargo.toml b/quinn/Cargo.toml index fb05280f9..f34c07e2b 100644 --- a/quinn/Cargo.toml +++ b/quinn/Cargo.toml @@ -39,6 +39,11 @@ runtime-smol = ["async-io", "smol"] # Configure `tracing` to log events via `log` if no `tracing` subscriber exists. log = ["tracing/log", "proto/log", "udp/log"] +# Internal (PRIVATE!) features used to aid testing. +# Don't rely on these whatsoever. They may disappear at any time. + +__rustls-post-quantum-test = ["dep:rustls-post-quantum", "rustls-aws-lc-rs"] + [dependencies] async-io = { workspace = true, optional = true } async-std = { workspace = true, optional = true } @@ -49,6 +54,7 @@ rustc-hash = { workspace = true } pin-project-lite = { workspace = true } proto = { package = "quinn-proto", path = "../quinn-proto", version = "0.11.7", default-features = false } rustls = { workspace = true, optional = true } +rustls-post-quantum = { workspace = true, optional = true } smol = { workspace = true, optional = true } socket2 = { workspace = true } thiserror = { workspace = true } @@ -64,7 +70,6 @@ directories-next = { workspace = true } rand = { workspace = true } rcgen = { workspace = true } rustls-pemfile = { workspace = true } -rustls-post-quantum = { workspace = true } clap = { workspace = true } tokio = { workspace = true, features = ["rt", "rt-multi-thread", "time", "macros"] } tracing-subscriber = { workspace = true } @@ -93,7 +98,7 @@ required-features = ["rustls-ring"] [[test]] name = "post_quantum" -required-features = ["rustls-aws-lc-rs"] +required-features = ["__rustls-post-quantum-test"] [[bench]] name = "bench"