Closed Bug 230303 Opened 21 years ago Closed 21 years ago

The years in certificate validity encoded in GeneralizedTime are displayed in two-digit format

Categories

(Core Graveyard :: Security: UI, defect)

Other Branch
x86
Windows 2000
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: wtc, Assigned: jgmyers)

Details

Attachments

(4 files)

This bug was first mentioned in bug 229565 comment 3.

NSS 3.9 or newer supports GeneralizedTime.  However,
PSM displays the years in certificate validity
encoded in GeneralizedTime with only two digits.

Obviously the year in a GeneralizedTime should be
displayed with four digits.  I propose that we also
display the year in a UTCTime with four digits.
Made the bug's summary clearer.
Summary: PSM displays the years in certificate validity encoded in GeneralizedTime with only two digits → The years in certificate validity encoded in GeneralizedTime are displayed in two-digit format
Could someone please attach a test case?
John,  such a cert is attached to bug 212945.  
Question for c++@vip.at (who submitted bug 229565, from which this bug derived):

WHERE does the date display with a 2-digit year?
Please attach a screen shot.

I imported the cert attached to bug 212945, and examined it with the cert viewer.
The date was always shown with 4 digits, in both the General and Details tabs.
I couldn't find a cert date display that showed fewer than 4 digits.  

I tested on Win2k.  I have set my Win2K preference for date display in the 
Win2k "Regional Options" control panel (date tab) to yyyy-MM-dd and I see 
that format everywhere.   What date format have you selected?  
Perhaps this is a Windows issue rather than a moz issue??
screenshot while trying to examine the cert under linux
this is the root-cert i used for testing.
this is the info you'll see when you open the cert under windows
Attached file output from openssl
and finally the result from an
[bash] openssl x509 -inform DER -in bp-root.cer -text -out erg.txt
The date format is entirely controlled by the OS-level locale settings.  In Mac
OS X, changing the os-level locale preferences to include centuries in years
caused Mozilla to start displaying 4-digit years in the cert viewer.

The only alternative is to use an ISO8601-style date format (YYYY-MM-DD),
regardless of locale.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → INVALID
i believe that showing the full year-format is the best option. the 
locale-settings should only drive the ordering and decoration of the date-format 
(YYYY-MM-DD or MM/DD/YYYY etc.)
The choices are for the locale to completely handle the date format like it does
now or for the locale to have absolutely no effect on the date format.  There is
no middle ground.

Didn't mean to close this bug.
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
John, Agree with with your action in comment 9.  
Honor the user's locale choice.  Resolve invalid.
Kai, it's your call.
Assignee: kaie → jgmyers
Status: REOPENED → NEW
I fully agree.
On my Linux system with default locale setting I do see the full century.

Resolving invalid.
Status: NEW → RESOLVED
Closed: 21 years ago21 years ago
Resolution: --- → INVALID
Product: PSM → Core
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: