Open Bug 511576 Opened 16 years ago Updated 3 years ago

pkix_getDecodeFunction may fail to load libsmime3

Categories

(NSS :: Libraries, defect, P2)

3.12.4

Tracking

(Not tracked)

People

(Reporter: julien.pierre, Unassigned)

References

Details

Attachments

(1 file)

The following code is not complete. It should try to load libsmime3 by absolute path, not simple filename. Otherwise, there may be failures on systems where PATH or LD_LIBRARY_PATH is not set, and if the application itself hasn't already loaded libsmime3. See lib/freebl/genload.c for the way to load with the absolute path. static PRStatus PR_CALLBACK pkix_getDecodeFunction(void) { pkix_decodeFunc.smimeLib = PR_LoadLibrary(SHLIB_PREFIX"smime3."SHLIB_SUFFIX); if (pkix_decodeFunc.smimeLib == NULL) { return PR_FAILURE; }
Alexei, Julien and I should discuss this together. I think our advice on this subject is changing over time, and we should be careful to have and use a consistent answer throughout NSS, as much as we can (as FIPS will allow)
Nelson, Re: comment 1, The code in question is in libpkix. What's the relevance of FIPS here ?
Our ability to change the way that NSS loads shared libraries consistently in all parts of NSS at this time is limited by our self-imposed freeze on the FIPS code. That's all.
Bob and I are in agreement that the code from genload.c should be moved out of freebl and to nssutil3. All code in NSS should be using that copy from now on, including this libpkix code. softoken/freebl probably won't change over to using the new copy until 3.13 .
Adding dependency on bug 511312 since we should use the new copy of genload.c in nssutil.
Depends on: 511312
Assignee: alexei.volkov.bugs → julien.pierre.boogz
OS: Windows Server 2003 → All
Priority: -- → P2
Hardware: x86 → All
Target Milestone: --- → 3.12.5
This patch will use the new shared loader function from bug 511312 .
Attachment #397405 - Flags: review?(wtc)
Comment on attachment 397405 [details] [diff] [review] Use PORT_LoadLibraryFromOrigin r=wtc. >- PR_LoadLibrary(SHLIB_PREFIX"smime3."SHLIB_SUFFIX); >+ PORT_LoadLibraryFromOrigin(SHLIB_PREFIX"nss3."SHLIB_SUFFIX, >+ (PRFuncPtr)&pkix_getDecodeFunction, >+ SHLIB_PREFIX"smime3."SHLIB_SUFFIX); It seems to look nicer to have the library we want to load (libsmime3) as the first argument...
Attachment #397405 - Flags: review?(wtc) → review+
Target Milestone: 3.12.5 → ---
Bugs that are currently assigned to Julien => assigning to nobody. Search for 20100628-kaie-jp
Assignee: bugzilla+nospam → nobody
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: