Closed
Bug 1033103
Opened 11 years ago
Closed 11 years ago
Add a function to mozilla::pkix::der for retrieving an entire DER-encoded item, instead of just the value
Categories
(Core :: Security: PSM, defect)
Core
Security: PSM
Tracking
()
RESOLVED
FIXED
mozilla33
People
(Reporter: briansmith, Assigned: briansmith)
References
Details
Attachments
(1 file)
5.04 KB,
patch
|
keeler
:
review+
|
Details | Diff | Splinter Review |
There are several places where we need (or will be needing soon) to parse a DER sequence and get a SECItem that contains not only the value, but also the tag and length. This patch adds such a function.
*Concrete* suggestions on improving the name are welcome.
Attachment #8449088 -
Flags: review?(dkeeler)
![]() |
||
Comment 1•11 years ago
|
||
Comment on attachment 8449088 [details] [diff] [review]
add-ExpectTagAndGetTLV.patch
Review of attachment 8449088 [details] [diff] [review]:
-----------------------------------------------------------------
LGTM.
::: security/pkix/lib/pkixder.h
@@ +337,5 @@
> }
> return input.Skip(length, value);
> }
>
> +// Like ExpectTagAndGetTLV, except the output SECItem will contain the encoded
Like ExpectTagAndGetValue?
@@ +340,5 @@
>
> +// Like ExpectTagAndGetTLV, except the output SECItem will contain the encoded
> +// tag and length along with the value.
> +inline Result
> +ExpectTagAndGetTLV(Input& input, uint8_t tag, /*out*/ SECItem& tlv)
I think the name is fine.
Attachment #8449088 -
Flags: review?(dkeeler) → review+
Assignee | ||
Comment 2•11 years ago
|
||
(In reply to David Keeler (:keeler) [use needinfo?] from comment #1)
> > +// Like ExpectTagAndGetTLV, except the output SECItem will contain the encoded
>
> Like ExpectTagAndGetValue?
Fixed. Thanks for the quick review!
https://hg.mozilla.org/integration/mozilla-inbound/rev/cd7a8e681c7a
![]() |
||
Comment 3•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•