Closed Bug 201483 Opened 22 years ago Closed 19 years ago

libssldap client auth cert callback does not work with dual-key certs

Categories

(Directory :: LDAP C SDK, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mcs, Assigned: mcs)

Details

Attachments

(1 file, 1 obsolete file)

See NSS bug 201259 - "Default SSL client auth callback NSS_GetClientAuthData does not work with dual-key certs." The same fix needs to be made to the get_keyandcert() function in mozilla/directory/c-sdk/ldap/libraries/libssldap/ldapsinit.c.
Status: NEW → ASSIGNED
Target Milestone: --- → 5.13
QA Contact: nobody
-> TM 5.14
Target Milestone: 5.13 → 5.14
Attached file diffs for fix (obsolete) —
I basically just made the same fix as in the referenced NSS bug.
Attachment #231609 - Flags: review?(mcs)
Comment on attachment 231609 [details] diffs for fix Looking at the implementation of CERT_FindUserCertByUsage(), I am worried that because we pass NULL for the proto_win parameter it will no longer find certs. that are located on tokens. See: http://lxr.mozilla.org/seamonkey/source/security/nss/lib/certhigh/certhigh.c#270
Attached file new diffs
It looks like the proto_win/wincx void * is a bit of a misnomer - it doesn't appear to have anything to do with windows, it is merely any context (like session context) that the caller of NSS needs to keep track of. Also, it looks like everywhere get_keyandcert() is called the LDAPSSLSessionInfo *ssip must be non-NULL, so it should always find the cert. This version calls PK11_SetPasswordFunc first, then finds the cert and key.
Attachment #231609 - Attachment is obsolete: true
Attachment #231769 - Flags: review?(mcs)
Attachment #231609 - Flags: review?(mcs)
Comment on attachment 231769 [details] new diffs Looks good to me. Some smoke testing might be in order if you have not already done some.
Attachment #231769 - Flags: review?(mcs) → review+
I did some smoke testing, including with startTLS, which is how I found bug 347033 :-) Please reassign to me or close. Thanks! Checking in ldapsinit.c; /cvsroot/mozilla/directory/c-sdk/ldap/libraries/libssldap/ldapsinit.c,v <-- ldapsinit.c new revision: 5.13; previous revision: 5.12 done
Closed.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: