Repository navigation
Address feedback on SSLv2 ClientHello processing - #1374
mattcaswell wants to merge 5 commits into
Conversation
|
Ping @davidben. Thoughts? |
There was a problem hiding this comment.
(I believe read_hash/enc_read_ctx are indeed redundant, yeah. Likewise with the s->first_packet check. Though I'm not familiar with the 1.1.0 record-layer code so perhaps I'm missing something.)
This is a remarkably long-winded comment that, now that the logic is pretty straightforward, doesn't seem to add much. I'd probably just have written:
/*
* The first record received by the server may be a V2ClientHello.
*/
if (s->server && RECORD_LAYER_is_first_record(&s->rlayer)
&& (p[0] & 0x80) && (p[2] == SSL2_MT_CLIENT_HELLO)) {
And maybe stuck the redundant checks in as asserts if they seemed interesting enough.
|
No tests? ;-) |
There was a problem hiding this comment.
If is_first_record is really just a boolean, you may not need the vull versatility of setting a specific vlaue; just a RECORD_LAYER_clear_first_record() call would be sufficient.
|
I've added three new commits to this:
|
|
Needs a team member review. |
|
(Non-team-member lgtm. But I don't really know perl, so I just glossed over those bits.) |
|
Another non-team-member lgtm, modulo the commented duplicate line, and I only sort-of looked at the perl. |
|
Duplicate line removed. So two non-team member reviews done - still need another team review! |
|
Ping any team member!! |
Feedback on the previous SSLv2 ClientHello processing fix was that it breaks layering by reading init_num in the record layer. It also does not detect if there was a previous non-fatal warning. This is an alternative approach that directly tracks in the record layer whether this is the first record. GitHub Issue openssl#1298
If we receive a non-initial record but the version number isn't right then we should send an alert.
Test that we handle a TLS ClientHello in an SSLv2 record correctly.
37d80dd to
583671c
Compare
|
Rebased this. |
|
+1 - code looks much clearer to me at least |
|
Merged. Thanks @t-j-h. |
Feedback on the previous SSLv2 ClientHello processing fix was that it
breaks layering by reading init_num in the record layer. It also does not
detect if there was a previous non-fatal warning.
This is an alternative approach that directly tracks in the record layer
whether this is the first record.
GitHub Issue #1298