From 2c68560944f29123ade4d1e6fa6da5ecaeb35ff1 Mon Sep 17 00:00:00 2001 From: Tony Arcieri Date: Mon, 2 Oct 2023 09:40:17 -0600 Subject: [PATCH] elliptic-curve: fix `hkdf` version requirement and test in CI (#1353) The minimal supported version of `hkdf` is v0.12.1, which added a generic parameter with a default which selects the backend. This also (mostly) re-enables a `minimal-versions` check in CI, although it still doesn't quite test all features. --- .github/workflows/elliptic-curve.yml | 24 +++++++++++------------- elliptic-curve/Cargo.toml | 2 +- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/.github/workflows/elliptic-curve.yml b/.github/workflows/elliptic-curve.yml index f1179b204..f318c244b 100644 --- a/.github/workflows/elliptic-curve.yml +++ b/.github/workflows/elliptic-curve.yml @@ -57,19 +57,17 @@ jobs: - run: cargo build --target ${{ matrix.target }} --release --no-default-features --features arithmetic,serde - run: cargo build --target ${{ matrix.target }} --release --no-default-features --features alloc,digest,ecdh,hazmat,hash2curve,jwk,pem,pkcs8,sec1,serde,voprf - # TODO: use the reusable workflow after this crate is re-added to the - # toplevel workspace - # minimal-versions: - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v4 - # - uses: RustCrypto/actions/cargo-cache@master - # - uses: dtolnay/rust-toolchain@master - # with: - # toolchain: nightly - # - uses: RustCrypto/actions/cargo-hack-install@master - # - run: cargo update -Z minimal-versions - # - run: cargo hack test --release --feature-powerset + minimal-versions: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: RustCrypto/actions/cargo-cache@master + - uses: dtolnay/rust-toolchain@master + with: + toolchain: nightly + - uses: RustCrypto/actions/cargo-hack-install@master + - run: cargo update -Z minimal-versions + - run: cargo build --release --features ecdh,hash2curve,pem,std,voprf # TODO(tarcieri): test all features test: runs-on: ubuntu-latest diff --git a/elliptic-curve/Cargo.toml b/elliptic-curve/Cargo.toml index 825ad51b9..25e816aa7 100644 --- a/elliptic-curve/Cargo.toml +++ b/elliptic-curve/Cargo.toml @@ -28,7 +28,7 @@ base64ct = { version = "1", optional = true, default-features = false, features digest = { version = "0.10", optional = true } ff = { version = "0.13", optional = true, default-features = false } group = { version = "0.13", optional = true, default-features = false } -hkdf = { version = "0.12", optional = true, default-features = false } +hkdf = { version = "0.12.1", optional = true, default-features = false } hex-literal = { version = "0.4", optional = true } pem-rfc7468 = { version = "0.7", optional = true, features = ["alloc"] } pkcs8 = { version = "0.10.2", optional = true, default-features = false }