Closed Bug 1274811 Opened 9 years ago Closed 9 years ago

TLS 1.3: Server cert is unavailable in GetClientAuthData callbacks

Categories

(NSS :: Libraries, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: emk, Assigned: mt)

References

Details

Attachments

(1 obsolete file)

Client auth will always fail if TLS 1.3 is negotiated. I found this when I tried to enable TLS 1.3 in an xpcshell-test (test_tls_server.js). nsNSS_SSLGetClientAuthData (the PSM GetClientAuthData callback) assumes that SSL_PeerCertificate will always get a server certificate. This assumption was valid as of TLS 1.2 because the server had to send the Certificate message before the Certificate Request message. But TlS 1.3 has changed the message order. The server will send the Certificate Request message before the Certificate message, so the server cert will be unavailable in the GetClientAuthData callback. Is this change expected as a libssl contract? Will applications have to deal with this change on their own? If the answer is "yes", I'll morph this to a PSM bug.
Flags: needinfo?(martin.thomson)
Yes, this is an NSS bug. This should be relatively easy to fix.
Flags: needinfo?(martin.thomson)
Attached patch bug1274811-1.patch (obsolete) — Splinter Review
Assignee: nobody → martin.thomson
Attachment #8755230 - Flags: review?(ekr)
Blocks: tls13
Any progress? WebRTC is going to enable TLS 1.3. (bug 1284103)
Flags: needinfo?(martin.thomson)
The WebRTC code doesn't invoke SSL_PeerCertificate()
I updated the patch; it should be good to land in NSS 3.2, but I'd like ekr to double-check it first. As ekr notes, we don't need this immediately.
Flags: needinfo?(martin.thomson)
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → 3.26
Attachment #8755230 - Attachment is obsolete: true
Attachment #8755230 - Flags: review?(ekr)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: