pkcs11c.c: pk11_DeriveSensitiveCheck does something weird.

RESOLVED FIXED in 3.4

Status

NSS
Libraries
P1
normal
RESOLVED FIXED
17 years ago
16 years ago

People

(Reporter: Aleksey Nogin, Assigned: Robert Relyea)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

17 years ago
Here is the code in question:

    hasSensitive = PR_FALSE;
    att = pk11_FindAttribute(destKey,CKA_SENSITIVE);
    if (att) {
        hasSensitive = PR_FALSE;
        sensitive = (PRBool) *(CK_BBOOL *)att->attrib.pValue;
        pk11_FreeAttribute(att);
    }
 
    hasExtractable = PR_FALSE;
    att = pk11_FindAttribute(destKey,CKA_EXTRACTABLE);
    if (att) {
        hasExtractable = PR_FALSE;
        extractable = (PRBool) *(CK_BBOOL *)att->attrib.pValue;
        pk11_FreeAttribute(att);
    }

Shouldn't hasSensitive/hasExtractable be assigned to PR_TRUE, not PR_FALSE
inside ifs?

Comment 1

17 years ago
Assigned the bug to Bob.  I agree the code looks wrong.
Assignee: wtc → relyea

Updated

16 years ago
Priority: -- → P1
Target Milestone: --- → 3.4
(Assignee)

Comment 2

16 years ago
Suggested patch is correct, applied to 3.4
(Reporter)

Updated

16 years ago
(Assignee)

Comment 3

16 years ago
Fixed as per my previous comment.
Status: NEW → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.