Skip to content

Comments

Fix some minor record layer issues#16086

Closed
mattcaswell wants to merge 1 commit intoopenssl:masterfrom
mattcaswell:fix-rlayer-issues
Closed

Fix some minor record layer issues#16086
mattcaswell wants to merge 1 commit intoopenssl:masterfrom
mattcaswell:fix-rlayer-issues

Conversation

@mattcaswell
Copy link
Member

Various comments referred to s->packet and s->packet_length instead of
s->rlayer.packet and s->rlayer.packet_length. Also fixed is a spot where
RECORD_LAYER_write_pending() should have been used. Based on the review
comments in #16077.

Various comments referred to s->packet and s->packet_length instead of
s->rlayer.packet and s->rlayer.packet_length. Also fixed is a spot where
RECORD_LAYER_write_pending() should have been used. Based on the review
comments in openssl#16077.
@mattcaswell mattcaswell requested a review from kaduk July 15, 2021 13:33
@mattcaswell mattcaswell added approval: review pending This pull request needs review by a committer branch: master Applies to master branch labels Jul 15, 2021
Copy link
Contributor

@kaduk kaduk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with punctuation fixes

* thisrr->data by either the decryption or by the decompression When
* the data is 'copied' into the thisrr->data buffer, thisrr->input will
* be pointed at the new buffer
* ok, we can now read from 's->rlayer.packet' data into 'thisrr'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It feels like there should be a sentence break at the end of this line?

* at rr->length bytes, which need to be copied into rr->data by either
* the decryption or by the decompression When the data is 'copied' into
* the rr->data buffer, rr->input will be pointed at the new buffer
* ok, we can now read from 's->rlayer.packet' data into 'rr' rr->input
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing sentence breaks here as well.
And perhaps we should consider marking these comments with /*- to avoid re-wrapping (but there's not really much formatting other than the attempt to use end-of-line to replace full-stop).

|| !SSL_IS_TLS13(s))
return 0;
s->ext.extra_tickets_expected++;
if (s->rlayer.wbuf[0].left == 0 && !SSL_in_init(s))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(FWIW, I came up with this implementation by cribbing from the ssl3_write_bytes() implementation. I am not entirely sure that just looking at wbuf[0] is safe there, either (and it is checked for many things, not just the "extra tickets" logic).)

@kaduk kaduk added approval: done This pull request has the required number of approvals and removed approval: review pending This pull request needs review by a committer labels Jul 15, 2021
@kaduk
Copy link
Contributor

kaduk commented Jul 15, 2021

I think this should go to 1.1.1 as well (though the cherry-pick is not clean due to moving s3 to not be a separate allocation).

@kaduk
Copy link
Contributor

kaduk commented Jul 15, 2021

I think this should go to 1.1.1 as well (though the cherry-pick is not clean due to moving s3 to not be a separate allocation).

Er, I seem to have commented on the wrong issue. The SSL_new_session_ticket() fix in this PR won't apply because that API doesn't exist on 1.1.1.

@openssl-machine
Copy link
Collaborator

24 hours has passed since 'approval: done' was set, but as this PR has been updated in that time the label 'approval: ready to merge' is not being automatically set. Please review the updates and set the label manually.

openssl-machine pushed a commit that referenced this pull request Jul 17, 2021
Various comments referred to s->packet and s->packet_length instead of
s->rlayer.packet and s->rlayer.packet_length. Also fixed is a spot where
RECORD_LAYER_write_pending() should have been used. Based on the review
comments in #16077.

Reviewed-by: Tomas Mraz <[email protected]>
Reviewed-by: Ben Kaduk <[email protected]>
(Merged from #16086)
@kaduk
Copy link
Contributor

kaduk commented Jul 17, 2021

Pushed to master with extra punctuation. Thanks!

@kaduk kaduk closed this Jul 17, 2021
kaduk pushed a commit to kaduk/openssl that referenced this pull request Jul 17, 2021
Various comments referred to s->packet and s->packet_length instead of
s->rlayer.packet and s->rlayer.packet_length. Also fixed is a spot where
RECORD_LAYER_write_pending() should have been used. Based on the review
comments in openssl#16077.

Reviewed-by: Tomas Mraz <[email protected]>
Reviewed-by: Ben Kaduk <[email protected]>
(Merged from openssl#16086)

(cherry picked from commit ca00152)
@kaduk
Copy link
Contributor

kaduk commented Jul 17, 2021

1.1.1 version in #16105

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approval: done This pull request has the required number of approvals branch: master Applies to master branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants