Closed Bug 786531 Opened 12 years ago Closed 12 years ago

DER_EncodeTimeChoice fails if time is January 1st 2050 00:00:00, or time is before January 1st 1950

Categories

(NSS :: Libraries, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mattm, Assigned: mattm)

Details

Attachments

(1 file, 1 obsolete file)

      No description provided.
Attached patch fix the condition (obsolete) — Splinter Review
OS: Linux → All
Hardware: x86_64 → All
(Hit enter too soon when submitting.  Here's the description:)
To decide whether to use a UTCTime or GeneralizedTime, DER_EncodeTimeChoice only has a check for input > January1st2050.  However, UTCTime only covers [January1st1950, January1st2050).  So if the input time is before 1950 or exactly equal to January1st2050, it will call DER_TimeToUTCTimeArena, which will fail with SEC_ERROR_INVALID_ARGS.
Attachment #656301 - Attachment is obsolete: true
Comment on attachment 657380 [details] [diff] [review]
updated version of fix

r=wtc.

Patch checked in on the NSS trunk (NSS 3.14).

Checking in sectime.c;
/cvsroot/mozilla/security/nss/lib/util/sectime.c,v  <--  sectime.c
new revision: 1.12; previous revision: 1.11
done
Attachment #657380 - Flags: review+
Assignee: nobody → mattm
Status: NEW → RESOLVED
Closed: 12 years ago
Priority: -- → P2
Resolution: --- → FIXED
Target Milestone: --- → 3.14
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: