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

Refactor DER parsing #142

Merged
merged 6 commits into from
Aug 2, 2023
Merged

Refactor DER parsing #142

merged 6 commits into from
Aug 2, 2023

Conversation

djc
Copy link
Member

@djc djc commented Jul 31, 2023

Now that we no longer depend on generic ring things, there is a bunch of stuff we can do to simplify DER handling.

@djc djc requested review from cpu and ctz July 31, 2023 15:53
@codecov
Copy link

codecov bot commented Jul 31, 2023

Codecov Report

Merging #142 (69441d6) into main (aa818ab) will increase coverage by 0.22%.
Report is 3 commits behind head on main.
The diff coverage is 98.97%.

@@            Coverage Diff             @@
##             main     #142      +/-   ##
==========================================
+ Coverage   96.01%   96.24%   +0.22%     
==========================================
  Files          15       15              
  Lines        4065     4259     +194     
==========================================
+ Hits         3903     4099     +196     
+ Misses        162      160       -2     
Files Changed Coverage Δ
src/error.rs 50.00% <50.00%> (+1.06%) ⬆️
src/time.rs 96.15% <96.29%> (+0.09%) ⬆️
src/cert.rs 96.91% <98.82%> (+0.12%) ⬆️
src/crl.rs 100.00% <100.00%> (+0.34%) ⬆️
src/der.rs 99.57% <100.00%> (+0.20%) ⬆️
src/end_entity.rs 100.00% <100.00%> (ø)
src/ring_algs.rs 100.00% <100.00%> (ø)
src/signed_data.rs 98.72% <100.00%> (-0.46%) ⬇️
src/subject_name/verify.rs 92.39% <100.00%> (+0.30%) ⬆️
src/trust_anchor.rs 96.82% <100.00%> (+0.59%) ⬆️
... and 2 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

src/der.rs Outdated Show resolved Hide resolved
Copy link
Member

@cpu cpu left a comment

Choose a reason for hiding this comment

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

Thanks, this looks good to me. I have some suggestions for the error variant names but I don't feel strongly if you disagree with the suggestions I've made.

src/cert.rs Outdated Show resolved Hide resolved
src/crl.rs Outdated Show resolved Hide resolved
src/crl.rs Outdated Show resolved Hide resolved
src/trust_anchor.rs Outdated Show resolved Hide resolved
@djc djc force-pushed the typed-der branch 2 times, most recently from 838cf36 to d30aa65 Compare August 1, 2023 11:39
@djc
Copy link
Member Author

djc commented Aug 1, 2023

Okay, Error::TrailingData now contains a DerTypeId, and FromDer has a TYPE_ID associated const.

@djc djc added this pull request to the merge queue Aug 2, 2023
Merged via the queue into main with commit 97f841d Aug 2, 2023
44 checks passed
@djc djc deleted the typed-der branch August 2, 2023 10:50
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.

3 participants