Closed Bug 219080 Opened 21 years ago Closed 20 years ago

Support for GeneralizedTime in CRMF libraries

Categories

(NSS :: Libraries, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: julien.pierre, Assigned: nelson)

Details

Attachments

(1 file, 1 obsolete file)

Currently, the CRMF library only supports UTCTime in the optional validity fields.
GeneralizedTime is also allowed.

The coding fixes are fairly straightforward (change to templates).

Most of the work to do is testing. We need to set up a CA and a CRMF client
(Mozilla) in the year 2050 and check that they work.
Julien,  are you willing to split this work with me?  
You code the fixes, and I test and debug them?
Sure !
Thanks Julien.  Taking this bug to test.
Assignee: wchang0222 → MisterSSL
Putting on my NSS 3.10 radar screen.
Priority: -- → P2
Target Milestone: --- → 3.10
Status: NEW → ASSIGNED
Whiteboard: needs testing
Comment on attachment 150315 [details] [diff] [review]
encode / decode GeneralizedTime in CRMF

Julien, This patch calls DER_TimeChoiceToTime, which doesn't seem to exist.
I did some grepping trying to find something with a similar name, and did not
find an obvious substitute.  so, r-  for this problem.

>Index: respcmn.c
>-    return DER_UTCTimeToTime(*dest, src);
>+    return DER_TimeChoiceToTime(*dest, src);
Attachment #150315 - Flags: review-
Reassigning to Julien for another patch revision.
Assignee: nelson → julien.pierre.bugs
Status: ASSIGNED → NEW
Whiteboard: needs testing → patch needs revision
Sorry, Nelson. The function was supposed to be DER_DecodeTimeChoice .
Attached patch patch v2Splinter Review
taking bug again.  
The previous patch encoded time into a temporary SECItem, and then
left it there, so it never got encoded into the cert request.
This patch replaces calls to the old function crmf_encode_utctime with 
calls to DER_EncodeTimeChoice.	This works.  
The crmftest program failed to discover the missing validity period,
so this patch adds a check for it.
Assignee: julien.pierre.bugs → nelson
Attachment #150315 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Whiteboard: patch needs revision → awaiting review
Comment on attachment 153366 [details] [diff] [review]
patch v2

Julien, please review this patch.
Attachment #153366 - Flags: review?(julien.pierre.bugs)
Comment on attachment 153366 [details] [diff] [review]
patch v2

Looks good.
Attachment #153366 - Flags: review?(julien.pierre.bugs) → review+
nss/lib/crmf/crmfreq.c;      new revision: 1.4;  previous revision: 1.3
nss/lib/crmf/crmftmpl.c;     new revision: 1.6;  previous revision: 1.5
nss/lib/crmf/respcmn.c;      new revision: 1.10; previous revision: 1.9
nss/cmd/crmftest/testcrmf.c; new revision: 1.6;  previous revision: 1.5
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Whiteboard: awaiting review
Version: unspecified → 3.8
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: