Description
Experiencing some issue using TLS.
Payloads are truncated after exactly 16k.
TLS RFC sets the record size to 16k, so with one write only 16k can be written.
Small ruby PoC to demonstrate:
require 'socket'
require 'openssl'
context = OpenSSL::SSL::SSLContext.new
tcp_client = TCPSocket.new 'google.hu', 443
ssl_client = OpenSSL::SSL::SSLSocket.new tcp_client, context
ssl_client.connect
payload = 'A' * (16 * 1024 + 123) # 16k + 123 byte
n = ssl_client.syswrite(payload)
puts "Payload size: #{payload.length}"
puts "Written bytes: #{n}"
ssl_client.close
output:
Payload size: 16507
Written bytes: 16384