Closed Bug 233320 Opened 21 years ago Closed 20 years ago

pk11_OpenKeyDB returns SECFailure.

Categories

(NSS :: Libraries, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: wtc, Assigned: rrelyea)

Details

Attachments

(1 file)

In lib/softoken/dbinit.c, the return type of
pk11_OpenKeyDB is CK_RV, but it returns
SECFailure on one error path.
Attached patch Proposed patchSplinter Review
Is CKR_KEYDB_FAILED the right error code?

This patch contains an unrelated change.  In
pk11_DBShutdown, it is not necessary to set
the function arguments certHandle and keyHandle
to NULL because their values will be gone after
we return from this function.  It's okay if you
don't want to take this change.
Attachment #140774 - Flags: review?(rrelyea0264)
Comment on attachment 140774 [details] [diff] [review]
Proposed patch

This review request is very old. I should have gotten to this sooner.

That patch is fine as is.
A better return code would be CKR_HOST_MEMORY since the problem is a memory
allocation problem.

bob
Attachment #140774 - Flags: review?(rrelyea0264) → review+
I checked in the patch on the trunk for NSS 3.10.

In the checkin I use the CKR_HOST_MEMORY return code
instead as Bob suggested.

Checking in dbinit.c;
/cvsroot/mozilla/security/nss/lib/softoken/dbinit.c,v  <--  dbinit.c
new revision: 1.23; previous revision: 1.22
done
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Target Milestone: --- → 3.10
Setting priorities on unprioritized bugs resolved fixed for NSS 3.10.
Priority: -- → P2
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: