Skip to content
New issue

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

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

Already on GitHub? # to your account

adds ManifestStoreReport::cert_chain_from_bytes #286

Merged
merged 1 commit into from
Aug 1, 2023

Conversation

dyro
Copy link
Contributor

@dyro dyro commented Jul 28, 2023

Changes in this pull request

This adds a convenience method for retrieving the certificate chain used to sign the active manifest from the bytes of the file containing the manifest.

Checklist

  • This PR represents a single feature, fix, or change.
  • All applicable changes have been documented.
  • Any TO DO items (or similar) have been entered as GitHub issues and the link to that issue has been included in a comment.

@codecov-commenter
Copy link

codecov-commenter commented Jul 28, 2023

Codecov Report

Merging #286 (9b852aa) into main (44d8692) will increase coverage by 0.01%.
The diff coverage is 100.00%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##             main     #286      +/-   ##
==========================================
+ Coverage   78.41%   78.42%   +0.01%     
==========================================
  Files          76       76              
  Lines       22153    22169      +16     
==========================================
+ Hits        17371    17387      +16     
  Misses       4782     4782              
Files Changed Coverage Δ
sdk/src/manifest_store_report.rs 84.78% <100.00%> (+0.93%) ⬆️

@dyro dyro force-pushed the dyross/cert_chain_from_bytes branch from 476b54f to 4c83c14 Compare July 28, 2023 22:13
@dyro dyro force-pushed the dyross/cert_chain_from_bytes branch from 4c83c14 to 9b852aa Compare July 28, 2023 22:19
@dyro dyro requested a review from gpeacock July 28, 2023 22:25
let bytes = fs::read(fixture_path("no_manifest.jpg")).expect("missing test asset");
assert!(matches!(
ManifestStoreReport::cert_chain_from_bytes("jpg", &bytes),
Err(crate::Error::JumbfNotFound)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice having the negative case!

Copy link
Collaborator

@gpeacock gpeacock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neither of these feel like they belong with ManifestStoreReport, but it makes sense to add this next to the existing one.

@dyro
Copy link
Contributor Author

dyro commented Aug 1, 2023

All tests passed, but the mysterious Rust 1.65 unit tests never finished. Merging anyway!

@dyro dyro merged commit d140959 into main Aug 1, 2023
@dyro dyro deleted the dyross/cert_chain_from_bytes branch August 1, 2023 20:10
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants