Closed Bug 65122 Opened 25 years ago Closed 25 years ago

dsa_NewKey requires parameter be NULL

Categories

(NSS :: Libraries, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jamie-bugzilla, Assigned: bugz)

Details

Attachments

(1 file)

This is in NSS_3_1_1_RTM, but it doesn't look like it's changed on the tip. NSC_GenerateKeyPair calls DSA_NewKey, passing in the address of a DSAPrivateKey*. This pointer is not initialized to NULL. DSA_NewKey passes the pointer's address to dsa_NewKey, which verifies that the pointer is in fact NULL. It's not NULL, so the keygen fails with SEC_ERROR_INVALID_ARGS. The requirement that the pointer be NULL is not documented, so I think it should be removed. This line 82 or 83 of dsa.c, depending on which version you check out. I propose this if (!params || !privKey || *privKey) { be changed to this if (!params || !privKey) {
This breaks under JSS so we do need to fix it in 3.2.
Target Milestone: --- → 3.2
Ian, you can check in the fix for this bug.
patch has been checked in.
Status: NEW → RESOLVED
Closed: 25 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: