From 254defe48c07937abca199d3e92903932d085757 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 9da7d21432..6a1f5ae0ca 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -115,10 +115,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 wasm_test: name: test wasm32-unknown-unknown @@ -264,7 +264,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 41ff136705..b2ed59e50d 100644 --- a/quinn/Cargo.toml +++ b/quinn/Cargo.toml @@ -38,6 +38,11 @@ log = ["tracing/log", "proto/log", "udp/log"] # Enable rustls logging rustls-log = ["rustls?/logging"] +# 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 } @@ -48,6 +53,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 } @@ -63,7 +69,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 } @@ -92,7 +97,7 @@ required-features = ["rustls-ring"] [[test]] name = "post_quantum" -required-features = ["rustls-aws-lc-rs"] +required-features = ["__rustls-post-quantum-test"] [[bench]] name = "bench"