Closed Bug 482795 Opened 15 years ago Closed 15 years ago

Avoid time encoding and decoding inside of pkix_pl_date object

Categories

(NSS :: Libraries, defect, P2)

3.12.3
defect

Tracking

(Not tracked)

RESOLVED FIXED
3.12.3

People

(Reporter: alvolkov.bgs, Assigned: alvolkov.bgs)

Details

(Whiteboard: PKIX)

Attachments

(1 file)

Most function of the pkix date object have PRTime arguments. Yet, the time inside the object is kept as an encoded SECItem. The patch has appropriate changes to keep time as PRTime.
Attachment #366894 - Flags: review?(nelson)
Whiteboard: PKIX
Attachment #366894 - Flags: review?(nelson) → review+
Comment on attachment 366894 [details] [diff] [review]
Patch v1 - store time as prtime

r+ = nelson, after you make two changes:

1) 

>+        PKIX_CHECK(pkix_hash
>+                ((const unsigned char *)&date->nssTime,
>+                sizeof(PRTime),

Please use 
                  sizeof date->nssTime,
instead.

>                 &dateHash,
>                 plContext),
>                 PKIX_HASHFAILED);

2) Change += to = below

>         PRTime time;

>+        time += PR_Now() + PR_SecondsToInterval(secondsOffset);
Alexei, Don't forget to commit this after making the changes suggested above.
landed.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Priority: -- → P2
Target Milestone: --- → 3.12.3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: