Closed Bug 416067 Opened 14 years ago Closed 14 years ago

certutil -L -h token doesn't report token authentication failure

Categories

(NSS :: Tools, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED
3.11.10

People

(Reporter: julien.pierre, Assigned: julien.pierre)

References

Details

Attachments

(1 file, 1 obsolete file)

I was running

certutil -d . -L -h "Sun Metaslot"

The following (roughly) code sequence is executed by certutil is :
NSS_Initialize
PK11_Authenticate(metaslot, ..)
PK11_ListCertsInSlot(metaslot)

The PK11_Authenticate in my case call failed due to bug 396999 . But certutil ignored the error and tried to list the certs in the slot anyway, and ended up reporting "problem printing certificate nicknames" .

I will attach a fix for this.
OS: SunOS → All
Priority: -- → P2
Target Milestone: --- → 3.11.10
I found more than one such silent authentication error case, so I fixed them all in this patch.
Attachment #301828 - Flags: superreview?(rrelyea)
Attachment #301828 - Flags: review?(nelson)
Comment on attachment 301828 [details] [diff] [review]
Report PK11_Authenticate failures

r+ 

optional enhancement:

Add the token name to the SECU_PrintError...

SECU_PrintError(progName, "could not authenticate to token or database name %s.", PK11_GetTokenName(slot));
Attachment #301828 - Flags: superreview?(rrelyea) → superreview+
As checked in to the trunk.

Checking in certutil.c;
/cvsroot/mozilla/security/nss/cmd/certutil/certutil.c,v  <--  certutil.c
new revision: 1.128; previous revision: 1.127
done

Nelson, please review for the branch.
Attachment #301828 - Attachment is obsolete: true
Attachment #302050 - Flags: review?(nelson)
Attachment #301828 - Flags: review?(nelson)
Attachment #302050 - Flags: review?(nelson) → review+
Thanks, Nelson. As it turns out, this patch doesn't apply directly to the branch because your first patch for bug 291384 isn't on the branch yet. I'll wait until that bug is resolved to check in my patch.
Depends on: 291384
I checked in the patch to NSS_3_11_BRANCH :

Checking in certutil.c;
/cvsroot/mozilla/security/nss/cmd/certutil/certutil.c,v  <--  certutil.c
new revision: 1.97.2.13; previous revision: 1.97.2.12
done
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.