-
Notifications
You must be signed in to change notification settings - Fork 56
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
Allow decoding empty sequences #336
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #336 +/- ##
=======================================
Coverage 97.76% 97.77%
=======================================
Files 20 20
Lines 4343 4351 +8
=======================================
+ Hits 4246 4254 +8
Misses 97 97 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
I think we should try and avoid relaxing CRL extension parsing at the same time. Therefore I suggest leaving |
9458d55
to
3562e37
Compare
use pki_types::CertificateDer; | ||
|
||
#[test] | ||
fn cert_without_extensions_test() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should go in an existing test file IMO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was just trying to be consistent with cert_without_extensions.rs
. I'm happy to move it, just let me know where.
&Extension::from_der(extension)?, | ||
) | ||
|outer| { | ||
while !outer.at_end() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think just inlining this is a good solution either given the duplication and lack of clarity. Instead, maybe we can pass an extra bool
argument to remember_cert_extension()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remember_cert_extension()
is not even called though? The inner nested
fails when trying to parse a sequence from an empty slice.
Proposed fix for #335.