Closed Bug 1154399 Opened 6 years ago Closed 6 years ago

Clean up pkixder.h

Categories

(Core :: Security: PSM, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla40
Tracking Status
firefox40 --- fixed

People

(Reporter: briansmith, Assigned: briansmith)

Details

Attachments

(4 files)

1. Remove unnecessary templates.
2. Replace old code patterns with new ones.
3. Move code that doesn't need to be inline to pkixder.cpp where practical.
https://treeherder.mozilla.org/#/jobs?repo=try&revision=1f783e1d81dd

I've noticed that OS X builds are often timing out on tryserver lately, so I'm just ignoring those.
Comment on attachment 8592370 [details] [diff] [review]
Part 3: Simplify OptionalExtensions

Review of attachment 8592370 [details] [diff] [review]:
-----------------------------------------------------------------

This looks great.
Attachment #8592370 - Flags: review?(dkeeler) → review+
Comment on attachment 8592372 [details] [diff] [review]
Part 4: Simplify certificate parsing in OCSP responses

Review of attachment 8592372 [details] [diff] [review]:
-----------------------------------------------------------------

LGTM.

::: security/pkix/lib/pkixocsp.cpp
@@ +410,3 @@
>    NonOwningDERArray certs;
>    if (!input.AtEnd()) {
> +    rv = der::Nested(input, der::CONTEXT_SPECIFIC | der::CONSTRUCTED | 0,

If I'm reading this correctly, we now don't check that we've consumed all of input (whereas I believe ExpectTagAndGetValueAtEnd did). (Ah, but I see that BasicResponse is called from within a call to Nested, which does check that we consume all of this input by the time we return, so I think this is ok.)
Attachment #8592372 - Flags: review?(dkeeler) → review+
(In reply to David Keeler [:keeler] (use needinfo?) from comment #7)
> If I'm reading this correctly, we now don't check that we've consumed all of
> input (whereas I believe ExpectTagAndGetValueAtEnd did). (Ah, but I see that
> BasicResponse is called from within a call to Nested, which does check that
> we consume all of this input by the time we return, so I think this is ok.)

Yes, exactly. I admit this isn't as clear as I'd like but this is a move towards making things more consistent which should ultimately provide that clarity.

Thanks for the super-fast reviews!
Keywords: checkin-needed
You need to log in before you can comment on or make changes to this bug.