Closed Bug 95985 Opened 23 years ago Closed 23 years ago

pkcs11c.c: pk11_DeriveSensitiveCheck does something weird.

Categories

(NSS :: Libraries, defect, P1)

x86
Linux
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mozilla-bugs, Assigned: rrelyea)

References

()

Details

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?
Assigned the bug to Bob.  I agree the code looks wrong.
Assignee: wtc → relyea
Priority: -- → P1
Target Milestone: --- → 3.4
Suggested patch is correct, applied to 3.4
Fixed as per my previous comment.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.