Closed Bug 1290762 Opened 10 years ago Closed 10 years ago

Accept 0 length CertificateRequest.context

Categories

(NSS :: Libraries, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ekr, Unassigned)

Details

Attachments

(1 file, 1 obsolete file)

I meant for this to be forbidden but the current spec says otherwise, so we need to accept it
Attachment #8776418 - Flags: review?(martin.thomson)
Comment on attachment 8776418 [details] [diff] [review] 0002-Accept-empty-CertificateRequest.context.patch Review of attachment 8776418 [details] [diff] [review]: ----------------------------------------------------------------- I think that we disagree about the context length. The point is to ensure that the context is unique. That can be achieved with a zero-length context. My memory of discussions with David was that we sort of agreed that it would be nice to allow (or even force) context to be zero-length in the handshake so that the two endpoints didn't have to retain extra state to handle a certificate request. A nice rule might be: in handshake = zero length; out of handshake = non-zero length.
Attachment #8776418 - Flags: review?(martin.thomson)
(In reply to Martin Thomson [:mt:] from comment #2) > Comment on attachment 8776418 [details] [diff] [review] > 0002-Accept-empty-CertificateRequest.context.patch > > Review of attachment 8776418 [details] [diff] [review]: > ----------------------------------------------------------------- > > I think that we disagree about the context length. The point is to ensure > that the context is unique. That can be achieved with a zero-length > context. Provided that only one CR is sent, yes. But then this requires all kinds of special case logic on both sides. > My memory of discussions with David was that we sort of agreed > that it would be nice to allow (or even force) context to be zero-length in > the handshake so that the two endpoints didn't have to retain extra state to > handle a certificate request. I don't think that we agreed to this and in any case it's not a particularly accurate description of the burdens on both sides. Specifically, it's no harder for the server to have a fixed string as context than it is to have an empty value. It still needs to validate that whatever the client sends back matches. As for the client, given that it needs to send the Cert/CV/Fin immediately, it's not particularly difficult to store the context (as is clear from the NSS implementation). It's true that it's a pain to store an unbounded number of CRs but that's inherent in the post-handshake scenario, and isn't alleviated by allowing a zero-length context in CR during the handshake.
In any case, this is a standards issue. Not landing this patch merely leaves us non-compliant. Perhaps you're objecting to the TODO, but removing that also makes the situation worse, because even in your design we should have a check for non-emptiness during post-handshake, and this is a placeholder for resolution of that issue.
Yes, the objection is to the comment. I would be happier if the code were just removed. We can track (any) disagreements in bugs.
(In reply to Martin Thomson [:mt:] from comment #5) > Yes, the objection is to the comment. I would be happier if the code were > just removed. We can track (any) disagreements in bugs. As noted, this *still* leaves us with a mess to clean up when we add post-handshake client auth.
Future us are probably better equipped to handle this.
Attachment #8776418 - Attachment is obsolete: true
Attachment #8780771 - Flags: review?(martin.thomson)
Attachment #8780771 - Flags: review?(martin.thomson) → review+
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → 3.27
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: