Closed Bug 490154 Opened 17 years ago Closed 17 years ago

Cryptokey framework requires module to implement GenerateKey when they support KeyPairGeneration

Categories

(NSS :: Libraries, defect)

3.12.4
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
3.12.4

People

(Reporter: elio.maldonado.batiz, Assigned: elio.maldonado.batiz)

Details

Attachments

(1 file)

In lib/ckfw/mechanism.c the nssCKFWMechanism_GenerateKeyPair function has the following test early on if (!fwMechanism->mdMechanism->GenerateKey) { return CKR_FUNCTION_FAILED; } It is conceivable for a pkcs #11 module to support key pair generation without supporting secret key generation. The PEM module with write support added would be such a module. It seems to me that the test want meant to be (and should be) if (!fwMechanism->mdMechanism->GenerateKeyPair) { return CKR_FUNCTION_FAILED; }
Summary: Cryptoket framework requires module to implement GenerateKey when they support KeyPairGeneration → Cryptokey framework requires module to implement GenerateKey when they support KeyPairGeneration
Assignee: nobody → emaldona
Comment on attachment 374609 [details] [diff] [review] Fix function pointer test in nssCKFWMechanism_GenerateKeyPair r+ Looks like you found a real bug. It should have been generateKeyPair from the beginning. bob
Attachment #374609 - Flags: review?(rrelyea) → review+
Checking in mechanism.c; /cvsroot/mozilla/security/nss/lib/ckfw/mechanism.c,v <-- mechanism.c new revision: 1.7; previous revision: 1.6
Status: NEW → RESOLVED
Closed: 17 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: