-
Notifications
You must be signed in to change notification settings - Fork 131
Make ASN1_get_object a direct call #2332
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
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 #2332 +/- ##
==========================================
- Coverage 78.77% 78.76% -0.01%
==========================================
Files 620 620
Lines 107874 107872 -2
Branches 15323 15322 -1
==========================================
- Hits 84977 84965 -12
- Misses 22239 22252 +13
+ Partials 658 655 -3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
int indefinite_ok) { | ||
// |ASN1_get_object| parses an ASN.1 header, including tag, class, and length | ||
// information. The tag number is written to |*out_tag|. The class is written to | ||
// |*out_class|. If the tag is not indefinite, the content length is written to |
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.
nit: might want to document that this gets set to 0 if tag is indefinite.
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.
Yeah, this would align with what's documented for the BSDs:
... If the length octet indicates the indefinite form, *plength is set to 0.
int indefinite_ok) { | ||
// |ASN1_get_object| parses an ASN.1 header, including tag, class, and length | ||
// information. The tag number is written to |*out_tag|. The class is written to | ||
// |*out_class|. If the tag is not indefinite, the content length is written to |
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.
Yeah, this would align with what's documented for the BSDs:
... If the length octet indicates the indefinite form, *plength is set to 0.
Description of changes:
eafd940 made all calls to ASN1 parsers able to parse indefinite length BER. This work to do this was easier thanks to cfe86a3, but this also removes the need for the divergent logic in
asn1_get_object_maybe_indefinite
.Call-outs:
N/A
Testing:
N/A
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.