Toolchain and dependent crate update#14
Merged
sameo merged 4 commits intorivosinc:mainfrom Apr 8, 2025
Merged
Conversation
0771fd3 to
da896b8
Compare
There was a problem hiding this comment.
Copilot reviewed 16 out of 17 changed files in this pull request and generated 1 comment.
Files not reviewed (1)
- deps.bzl: Language not supported
Comments suppressed due to low confidence (2)
src/x509/extensions/pkix/name/other.rs:23
- The removal of the test for OtherName may reduce test coverage. Consider retaining or migrating the test to ensure that encoding and decoding functionality continues to work as expected.
-#[test]
src/x509/certificate.rs:199
- The API for Certificate::from_layer was changed from returning a DER slice to returning an empty Result. However, the caller in src/layer.rs expects a DER slice to convert into an ArrayVec. This mismatch may lead to unexpected behavior; update the caller code to properly handle the new return type and determine the valid certificate length.
pub fn from_layer<const N: usize, S: SignatureEncoding, C: CompoundDeviceIdentifier<N, S>>(..., certificate_buf: &mut [u8]) -> Result<()> {
src/local_cdi.rs
Outdated
| /// Public key for the current CDI. | ||
| fn public_key(&self) -> [u8; PUBLIC_KEY_LENGTH] { | ||
| self.key_pair.public.to_bytes() | ||
| self.key_pair.to_bytes() |
There was a problem hiding this comment.
Switching from Keypair to SigningKey requires retrieving the public key correctly. Instead of calling to_bytes() on the SigningKey (which returns secret key bytes), use self.key_pair.verify_key().to_bytes() to obtain the public key.
Suggested change
| self.key_pair.to_bytes() | |
| self.key_pair.verify_key().to_bytes() |
Contributor
There was a problem hiding this comment.
@dgreid That seems to be right, we only want the verifying part of the key.
Contributor
Author
There was a problem hiding this comment.
it is right, fixed.
I'm impressed, that was a legit good catch
After two years, many crates are out of date and need updating. Doing them all at once as many have second level dependencies on each other. This gets everything back to a state that can build with a recent rust toolchain. This includes many breaking API changes that required minor reworks. The transition from `KeyPair` to `SigningKey` caused much of the churn. Signed-off-by: Dylan Reid <dgreid@rivosinc.com>
The test in other was disabled without the alloc feature, which doesn't exist. It also depends on hex_literal, which has no way of being included. Remove it so test runs stop warning about the disabled test. Signed-off-by: Dylan Reid <dgreid@rivosinc.com>
Remove a clippy lint for converting to an interator for a function that takes `IntoIterator`. Signed-off-by: Dylan Reid <dgreid@rivosinc.com>
A recent cargo clippy doesn't like named, but elide-able lifetimes. Signed-off-by: Dylan Reid <dgreid@rivosinc.com>
da896b8 to
edf0877
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
update to work with a more recent nightly and use current versions of the crates it depends on.