Closed Bug 1681099 Opened 3 years ago Closed 2 years ago

Certificate lookup with PKCS #11 URI doesn't take into account of attributes other than "object"

Categories

(NSS :: Libraries, enhancement, P1)

3.59
enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ueno, Assigned: ueno)

Details

Attachments

(1 file)

Since bug 1162897 NSS has a mechanism to lookup certificates by PKCS #11 URI if the nickname starts with "pkcs11:". However, this only checks the "object" attribute (mapped to CKA_LABEL) and ignores other attributes. That is counter-intuitive to the matching behavior guidelined in RFC 7512:
https://tools.ietf.org/html/rfc7512#section-2.5

Previously we only used the "object" attribute (mapped to CKA_LABEL) to find certificates by PKCS #11 URI. This updates the logic to match also with "id" (mapped to CKA_ID) and reject the request if a "type" attribute is present with the value other than "cert".

Note: as "id" may not be null-terminated, the PKCS #11 URI API had to be revamped to allow binary blobs. This is still not perfect because PK11URIAttribute doesn't have a length field of value.

Assignee: nobody → dueno
Severity: -- → N/A
Status: NEW → ASSIGNED
Type: task → enhancement
Priority: -- → P1

The bug assignee didn't login in Bugzilla in the last 7 months and this bug has priority 'P1'.
:beurdouche, could you have a look please?
For more information, please visit auto_nag documentation.

Assignee: dueno → nobody
Status: ASSIGNED → NEW
Flags: needinfo?(bbeurdouche)

Sorry for the inactivity. Looks like the patch itself is almost ready for merge; let me take it again.

Assignee: nobody → dueno
Status: NEW → ASSIGNED
Assignee: nobody → dueno
Status: NEW → ASSIGNED

Sorry, there was a problem with the detection of inactive users. I'm reverting the change.

Flags: needinfo?(bbeurdouche)
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 3.82
Flags: needinfo?(bbeurdouche)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: