Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

elliptic-curve: fix hkdf version requirement and test in CI #1353

Merged
merged 1 commit into from
Oct 2, 2023

Conversation

tarcieri
Copy link
Member

@tarcieri tarcieri commented Oct 2, 2023

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.

@tarcieri tarcieri force-pushed the elliptic-curve/fix-minimal-versions branch 2 times, most recently from 499fd58 to 16501aa Compare October 2, 2023 15:24
@tarcieri
Copy link
Member Author

tarcieri commented Oct 2, 2023

This is now catching the hkdf version requirement error:

https://github.com/RustCrypto/traits/actions/runs/6382152698/job/17320137326?pr=1353

   Compiling elliptic-curve v0.13.5 (/home/runner/work/traits/traits/elliptic-curve)
error[E0432]: unresolved import `hkdf::hmac`
  --> src/ecdh.rs:36:12
   |
36 | use hkdf::{hmac::SimpleHmac, Hkdf};
   |            ^^^^ could not find `hmac` in `hkdf`

error[E0107]: struct takes 1 generic argument but 2 generic arguments were supplied
   --> src/ecdh.rs:192:54
    |
192 |     pub fn extract<D>(&self, salt: Option<&[u8]>) -> Hkdf<D, SimpleHmac<D>>
    |                                                      ^^^^    ------------- help: remove this generic argument
    |                                                      |
    |                                                      expected 1 generic argument
    |
note: struct defined here, with 1 generic parameter: `D`
   --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hkdf-0.12.0/src/lib.rs:199:12
    |
199 | pub struct Hkdf<D>
    |            ^^^^ -

Note that there are some others which I'll try to address separately, namely with the bits feature (wyz) the jwk feature (serde_json).

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.
@tarcieri tarcieri force-pushed the elliptic-curve/fix-minimal-versions branch from 16501aa to 3e81ab7 Compare October 2, 2023 15:29
@tarcieri tarcieri changed the title [WIP] elliptic-curve: re-enable CI minimal-versions check elliptic-curve: re-enable CI minimal-versions check Oct 2, 2023
@tarcieri tarcieri changed the title elliptic-curve: re-enable CI minimal-versions check elliptic-curve: fix hkdf version requirement and test in CI Oct 2, 2023
@tarcieri tarcieri marked this pull request as ready for review October 2, 2023 15:40
@tarcieri tarcieri merged commit 2c68560 into master Oct 2, 2023
11 checks passed
@tarcieri tarcieri deleted the elliptic-curve/fix-minimal-versions branch October 2, 2023 15:40
@tarcieri tarcieri mentioned this pull request Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant