Closed Bug 537795 Opened 15 years ago Closed 15 years ago

NSS_InitContext does not work with NSS_RegisterShutdown

Categories

(NSS :: Libraries, defect)

3.12.5
x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
3.12.6

People

(Reporter: richm, Assigned: rrelyea)

Details

Attachments

(1 file)

If an application calls NSS_InitContext but not NSS_Initialize, a call to NSS_RegisterShutdown will fail with an error.
Assignee: nobody → rrelyea
Attachment #420205 - Flags: review?(wtc)
Looks good to me
targetting NSS 3.12.6.

bob
Target Milestone: --- → 3.12.6
Status: NEW → ASSIGNED
Comment on attachment 420205 [details] [diff] [review]
Allow NSS_RegisterShutdown and NSS_UnregisterShutdown to be called even when only init'ed by NSS_InitContext()

r=wtc.

We should set SEC_ERROR_NOT_INITIALIZED instead of
SEC_ERROR_LIBRARY_FAILURE in these cases.
Attachment #420205 - Flags: review?(wtc) → review+
Bob, should we also fix NSS_Shutdown?
No, NSS_Shutdown should only be called after a regular NSS_Initialize.

RE error code, good catch, I'll include that fix as well when I check it in.

bob
bobs-laptop(72) cvs commit nssinit.c
Checking in nssinit.c;
/cvsroot/mozilla/security/nss/lib/nss/nssinit.c,v  <--  nssinit.c
new revision: 1.104; previous revision: 1.103
done
bobs-laptop(73)
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: