Closed Bug 1000544 Opened 10 years ago Closed 10 years ago

mozilla::pkix doesn't use mozilla::pkix::Fail and mozilla::der::Fail consistently

Categories

(Core :: Security: PSM, defect)

defect
Not set
minor

Tracking

()

RESOLVED FIXED
mozilla32

People

(Reporter: briansmith, Assigned: briansmith)

References

Details

Attachments

(1 file)

If we use Fail() consistently then it is easier to do some debugging because breakpoints set within the Fail() functions will be triggered on the first error detected.
Attachment #8411371 - Flags: review?(mmc)
Comment on attachment 8411371 [details] [diff] [review]
use-Fail-more-consistently.patch

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

Seems kind of uncool to me that mozilla::pkix::Fail and mozilla::der::Fail have different signatures, but it's better than before.
Attachment #8411371 - Flags: review?(mmc) → review+
(In reply to Monica Chew [:mmc] (please use needinfo) from comment #1)
> Comment on attachment 8411371 [details] [diff] [review]
> Seems kind of uncool to me that mozilla::pkix::Fail and mozilla::der::Fail
> have different signatures, but it's better than before.

mozilla::der::Result is a two-valued type (Success vs. Failure) whereas mozilla::pkix::Result is a three-valued type (Success vs. RecoverableError vs. FatalError). I would like to get rid of the RecoverableError vs. FatalError distinction and then merge mozilla::der::Result with mozilla::pkix::result. Then everything would be nice and clean. This is a baby step towards that.

Thanks for the review.
https://hg.mozilla.org/mozilla-central/rev/146e4f4e985c
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: mozilla31 → mozilla32
You need to log in before you can comment on or make changes to this bug.