Skip to content

Comments

Handle partial messages in TLSProxy#5726

Closed
bernd-edlinger wants to merge 1 commit intoopenssl:OpenSSL_1_1_0-stablefrom
bernd-edlinger:proxy_handle_partial_messages_1
Closed

Handle partial messages in TLSProxy#5726
bernd-edlinger wants to merge 1 commit intoopenssl:OpenSSL_1_1_0-stablefrom
bernd-edlinger:proxy_handle_partial_messages_1

Conversation

@bernd-edlinger
Copy link
Member

This is the back-port of #5412
I used the following in addition to test the fragmentation:

diff --git a/util/perl/TLSProxy/Proxy.pm b/util/perl/TLSProxy/Proxy.pm
index 4ca0a7d..86bca5c 100644
--- a/util/perl/TLSProxy/Proxy.pm
+++ b/util/perl/TLSProxy/Proxy.pm
@@ -290,11 +290,11 @@ sub clientstart
     while(!(TLSProxy::Message->end) && (@ready = $sel->can_read)) {
         foreach my $hand (@ready) {
             if ($hand == $server_sock) {
-                $server_sock->sysread($indata, 16384) or goto END;
+                $server_sock->sysread($indata, 256) or goto END;
                 $indata = $self->process_packet(1, $indata);
                 $client_sock->syswrite($indata);
             } elsif ($hand == $client_sock) {
-                $client_sock->sysread($indata, 16384) or goto END;
+                $client_sock->sysread($indata, 256) or goto END;
                 $indata = $self->process_packet(0, $indata);
                 $server_sock->syswrite($indata);
             } else {

levitte pushed a commit that referenced this pull request Mar 23, 2018
Reviewed-by: Matt Caswell <[email protected]>
(Merged from #5726)
@bernd-edlinger
Copy link
Member Author

Merged to 1.1.0, thanks!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants