Last Comment Bug 196360 - Export the function that lets an app add OIDs dynamically.
: Export the function that lets an app add OIDs dynamically.
Status: RESOLVED DUPLICATE of bug 124923
:
Product: NSS
Classification: Components
Component: Libraries (show other bugs)
: 3.8
: x86 Windows 2000
: P2 enhancement (vote)
: 3.10
Assigned To: Nelson Bolyard (seldom reads bugmail)
: Bishakha Banerjee
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2003-03-07 11:51 PST by Javier Delgadillo
Modified: 2004-01-28 23:38 PST (History)
0 users
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Export AddOid. Fix AddOid to be useful. (4.10 KB, patch)
2003-03-07 15:02 PST, Robert Relyea
no flags Details | Diff | Splinter Review
SEC_AddOidEntry should return SECOidTag, not SECStatus. (4.19 KB, patch)
2003-03-13 08:53 PST, Robert Relyea
no flags Details | Diff | Splinter Review

Description Javier Delgadillo 2003-03-07 11:51:30 PST
There is a funciton in NSS, SECOID_AddEntry which was designed to allow
applications to add OID's to NSS table of OID's.  The function is not exported.

Exporting the function would make it possible for applications to add OID's that
NSS doesn't know about.
Comment 1 Robert Relyea 2003-03-07 15:02:45 PST
Created attachment 116588 [details] [diff] [review]
Export AddOid. Fix AddOid to be useful.

This patch is for NSS 3.8
Comment 2 Robert Relyea 2003-03-13 08:53:07 PST
Created attachment 117087 [details] [diff] [review]
SEC_AddOidEntry should return SECOidTag, not SECStatus.

Nelson caught this, not the Windows compiler. Note the function was returning a
SECOidTag even though it was declared to return a SECStatus. SECStatus is an
enum, not an int, so the compiler is getting to agressive in it's implicit
casting...
Comment 3 Robert Relyea 2003-03-13 10:07:28 PST
Setting target to NSS 3.8
Comment 4 Nelson Bolyard (seldom reads bugmail) 2003-03-17 21:59:20 PST
This code appears to do exactly what it says it does.  But I have misgivings
about exposing a method that is known not to be thread safe, yet has the 
potential to be used after initialization is done.  

NSS has reader/writer locks. Would performance be degraded unacceptably to 
use them to protect the OID hash tables? 
Comment 5 Wan-Teh Chang 2003-03-24 17:14:37 PST
If we expose this function, it needs to be thread safe.

We should measure the performance degradation from the
use of reader/writer locks to see if it is worthwhile
to expose this function.
Comment 6 Nelson Bolyard (seldom reads bugmail) 2003-07-07 20:58:54 PDT
The current method for encoding cert names can only encode known OIDs. 
So before we can encode a name with an OID that's not compiled into secoid.c, 
we must add the OID it to the dynamic OID table.  IOW, we must be able to 
add OIDs to the OID table on the fly, after initialization is done. 
IMO, this means the patch that doesn't make it thread safe isn't good enough.

This bug blocks 211655, which blocks 210709.
Comment 7 Nelson Bolyard (seldom reads bugmail) 2003-10-14 10:26:10 PDT
Correct the dependency.  
This bug now blocks bug 210584, which blocks bug 210709.
Comment 8 Robert Relyea 2003-10-14 17:08:58 PDT
Comment on attachment 117087 [details] [diff] [review]
SEC_AddOidEntry should return SECOidTag, not SECStatus.

Obsoleting patch as we decided that this function should be implemented in a
thread-safe manner
Comment 9 Nelson Bolyard (seldom reads bugmail) 2004-01-28 12:31:53 PST
I am fixing this bug as part of my work on bug 124923
Comment 10 Nelson Bolyard (seldom reads bugmail) 2004-01-28 23:38:56 PST
I am making this bug be a dup of 124923 instead of merely depending on that bug.

*** This bug has been marked as a duplicate of 124923 ***

Note You need to log in before you can comment on or make changes to this bug.