NSS needs to expose interfaces to deal with multiple token sources of certs.

RESOLVED FIXED in 3.12.1

Status

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

People

(Reporter: Robert Relyea, Assigned: Robert Relyea)

Tracking

(Blocks: 1 bug)

3.12.1
x86
Windows NT
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

16 years ago
In NSS there is only once cert structure for a given DER cert. That cert
structure has a single entry to store token and nickname information.

Certs can have multiple sources, however. NSS 3.4 correctly manages the fact
that a given cert may live on multiple tokens, but it can only present one token
& nickname for a given cert through it public API's. We need two new functions
(proposed by Ian and agreed by me) to provide this information:

char **CERT_GetTokenNames(CERTCertificate *cert);
char *CERT_GetNicknameForToken(CERTCertificate *cert, PK11SlotInfo *slot);
(Assignee)

Updated

16 years ago
Depends on: 129301
(Assignee)

Updated

16 years ago
No longer depends on: 129301
(Assignee)

Updated

16 years ago
Blocks: 129301
Depends on: 129298

Comment 1

16 years ago
Assigned the bug to Bob.
Assignee: wtc → relyea
Priority: -- → P1
Target Milestone: --- → 3.4.1

Comment 2

15 years ago
Changed the QA contact to Bishakha.
QA Contact: sonja.mirtitsch → bishakhabanerjee
(Assignee)

Comment 3

15 years ago
PSM won't be able to use this before RTM, so move the feature out to a future
release of NSS.
Target Milestone: 3.4.1 → 4.0
QA Contact: bishakhabanerjee → jason.m.reid

Comment 4

12 years ago
Bob, you said "Certs can have multiple sources".
What does that mean?
(Assignee)

Comment 5

12 years ago
Created attachment 203479 [details] [diff] [review]
function to return all the slots that this cert exists on.

Here is part of what is needed: given a cert, this function returns all the slots that cert exists on. With it is possible (if not exactly efficient) to implement the rest of the functions.
Attachment #203479 - Flags: review?(kengert)
(Assignee)

Comment 6

12 years ago
Actually this combined with CERT_GetNicknameForToken() will allow efficient implementation of CERT_GetTokenNames...

bob
(Assignee)

Updated

12 years ago
Target Milestone: 4.0 → 3.12

Comment 7

12 years ago
Comment on attachment 203479 [details] [diff] [review]
function to return all the slots that this cert exists on.

r=kaie

You might want to consider the following:

- Should the function behave safe when called with a NULL cert? If you think it should, please check for cert==NULL.

- You do not check whether c is NULL, but I suspect that's not required, as there is a 1:1 relationship between CERT and STAN_NSS ?

- can instance->token ever be NULL ?
Attachment #203479 - Flags: review?(kengert) → review+
(Assignee)

Comment 8

12 years ago
It is a public function, so a NULL check is resonable.

It's highly unlikely NSS will get very far if STAN_GetNSSCertificate ever fails.
Yes, instances always have valid token pointers.

bob
(Assignee)

Comment 9

12 years ago
Checking in pk11cert.c;
/cvsroot/mozilla/security/nss/lib/pk11wrap/pk11cert.c,v  <--  pk11cert.c
new revision: 1.144; previous revision: 1.143
done
/cvsroot/mozilla/security/nss/lib/nss/nss.def,v  <--  nss.def
new revision: 1.159; previous revision: 1.158
done

Comment 10

12 years ago
Bob, as you checked it in, can this be marked fixed?
(Assignee)

Comment 11

12 years ago
Oops.
Status: NEW → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED
This was only fixed on trunk, not branch.
Do we want this fix in NSS 3.11.1 ?
Need to know right away.
(Assignee)

Comment 13

11 years ago
This is also a nice to have. I've held it out of 3.11 because it's and interface change. I wouldn't hold 3.11 to get it, but would be happy to see it in.

bob
Depends on: 428106
Duplicate of this bug: 449105
The patch that was reviewed for this bug was not checked in.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---

Comment 16

9 years ago
I checked in the declaration to the trunk for NSS 3.12.1 .

Checking in pk11pub.h;
/cvsroot/mozilla/security/nss/lib/pk11wrap/pk11pub.h,v  <--  pk11pub.h
new revision: 1.26; previous revision: 1.25
Status: REOPENED → RESOLVED
Last Resolved: 12 years ago9 years ago
Resolution: --- → FIXED
Target Milestone: 3.12 → 3.12.1
There is no test for this code.  There are no invocations of the new function
in any NSS libraries or test programs. :(

Comment 18

9 years ago
Nelson,

It is somewhat difficult to test without support for multiple tokens in the QA.
Right now the best we could do would be to test it with the root cert module.

For example, change the trust on some root certs, and then make sure they exist on both the softoken and built-in tokens.
You need to log in before you can comment on or make changes to this bug.