Closed Bug 97406 Opened 23 years ago Closed 20 years ago

extend object ID to text mapping in GetOIDText

Categories

(Core Graveyard :: Security: UI, enhancement, P3)

1.0 Branch
enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: inactive-mailbox, Assigned: jgmyers)

References

Details

Attachments

(1 file, 1 obsolete file)

Function GetOIDText in nsNSSCertificate.cpp should be extended to include more
object identifiers. For example, no mapping for signature algorithm
SEC_OID_ANSIX9_DSA_SIGNATURE_WITH_SHA1_DIGEST is currently available.
Target Milestone: --- → Future
-> over to kai
Assignee: ssaux → kai.engert
Priority: -- → P3
Version: unspecified → 2.1
QA Contact: bsharma → junruh
Changing my prefered e-mail address.
Assignee: kai.engert → kaie
*** Bug 136753 has been marked as a duplicate of this bug. ***
Add more OID value please like OID value: 2.5.29.19 whom is in almost all CA
certificate
*** Bug 185177 has been marked as a duplicate of this bug. ***
from bug 185177:

2 16 840 1 113730 1 8 is the Netscape cert policy URL extension.
NSS has a very complete list of OIDs and strings for them, and has functions
ot access those.  Rather than duplicating that list, as GetOIDText does now,
only partially, I'd suggest using NSS's list.  Some will argue that the list will
not be localized that way.  But I think having the names in English is better
than having the names only in dotted decimal.  Agree?  Disagree?
PSM uses a separate list in order for the names to be localizable.  I'd say
keeping the current set of names localizable is important, as is extending the
list of localizable names to include at least those names mentioned in this bug.

I could see having the fallback code query NSS for an English name, which it
could use in preference to the OID.  That would be a separate bug.
Assignee: kaie → jgmyers
Attached patch Extend set of recognized OIDs (obsolete) — Splinter Review
I would have also added 1.3.6.1.5.5.7.1.3 (used in one of the Danish test
certificates) but that OID isn't in the NSS secoid table.
Attachment #139009 - Flags: review?(kaie)
I'm fine with adding the handling of additional OIDs.

However, I feel unsure whether your string code is safe.
I fear the NS_LITERAL_STRING code is producing a temporary string object, with
.get() returning a reference to the temporary.
I fear at the time you are using the bundlekey variable, the temporary object
might have already been destroyed, and the bundlekey variable might point to
modified memory.

If I'm right, the solution for more elegant code is to make use of
NS_NAMED_LITERAL_STRING, which defines local variables that will remain alive
for the scope of the function.
Attached patch Second trySplinter Review
Attachment #139009 - Attachment is obsolete: true
Attachment #139998 - Flags: review?(kaie)
Attachment #139009 - Flags: review?(kaie)
Comment on attachment 139998 [details] [diff] [review]
Second try

thanks, looks good
r=kaie
Attachment #139998 - Flags: review?(kaie) → review+
Attachment #139998 - Flags: superreview?(sspitzer)
Comment on attachment 139998 [details] [diff] [review]
Second try

sr=sspitzer
Attachment #139998 - Flags: superreview?(sspitzer) → superreview+
Fix checked in.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Target Milestone: Future → ---
Product: PSM → Core
Version: psm2.1 → 1.0 Branch
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: