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

Build error: in compatibility with hmac change #263

Closed
stevenhorsman opened this issue Jan 4, 2022 · 0 comments · Fixed by confidential-containers/ocicrypt-rs#17
Closed

Comments

@stevenhorsman
Copy link
Member

The Cargo.toml states that it supports hmac ">=0.11", but it is using the NewMac trait that has been removed in v0.12.0.

This results in the error:

error[E0432]: unresolved import `hmac::NewMac`
 --> src/blockcipher/aes_ctr.rs:8:23
  |
8 | use hmac::{Hmac, Mac, NewMac};
  |                       ^^^^^^ no `NewMac` in the root

error[E0308]: mismatched types
  --> src/blockcipher/aes_ctr.rs:54:41
   |
54 |                     hmac.clone().verify(&self.exp_hmac).map_err(|_| {
   |                                         ^^^^^^^^^^^^^^ expected struct `GenericArray`, found struct `Vec`
   |
   = note: expected reference `&GenericArray<u8, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>`
              found reference `&Vec<u8>`

Some errors have detailed explanations: E0308, E0432.
For more information about an error, try `rustc --explain E0308`.
error: could not compile `ocicrypt-rs` due to 2 previous errors

when running cargo build --all-features

Whether the trait should have been removed from a version change 0.11 to 0.12 is another issue, but in the mean time it would be good to fix up the build here.

stevenhorsman referenced this issue in stevenhorsman/ocicrypt-rs Jan 4, 2022
Updates the hmac version requirements and code to fix the build errors

Fixes: #16
Signed-off-by: stevenhorsman <[email protected]>
sameo referenced this issue in confidential-containers/ocicrypt-rs Jan 27, 2022
Updates the hmac version requirements and code to fix the build errors

Fixes: #16
Signed-off-by: stevenhorsman <[email protected]>
stevenhorsman referenced this issue in stevenhorsman/kata-containers Jan 27, 2022
- Update the ocicrypt-rs package after
https:/containers/ocicrypt-rs/issues/16
was fixed

Signed-off-by: stevenhorsman <[email protected]>
stevenhorsman referenced this issue in stevenhorsman/kata-containers Feb 15, 2022
- Update the ocicrypt-rs package after
https:/containers/ocicrypt-rs/issues/16
was fixed

Signed-off-by: stevenhorsman <[email protected]>
@dcmiddle dcmiddle transferred this issue from confidential-containers/ocicrypt-rs Jul 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 a pull request may close this issue.

1 participant