Closed Bug 1018061 Opened 6 years ago Closed 6 years ago

Use mozilla::pkix::der::Input::EnsureLength more consistently

Categories

(Core :: Security: PSM, defect, trivial)

defect
Not set
trivial

Tracking

()

RESOLVED FIXED
mozilla32

People

(Reporter: briansmith, Assigned: briansmith)

References

Details

Attachments

(1 file)

1. Switch Input::Read() to use EnsureLength() instead of its own checks.
2. Replace the redundant and unconventional pattern of:

   if (EnsureLength(x) != Success) {
     return Fail(SEC_ERROR_BAD_DER);
   }

   with:

   if (EnsureLength(x) != Success) {
     return Failure;
   }
Attachment #8431400 - Flags: review?(mmc)
Attachment #8431400 - Flags: review?(mmc) → review+
https://hg.mozilla.org/mozilla-central/rev/8a49fdbf8041
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.