From d86a8aedd5674819ec4af1bfc8a81b3fef91fd85 Mon Sep 17 00:00:00 2001 From: Jacob Young Date: Mon, 4 Nov 2024 22:43:31 -0500 Subject: [PATCH] std.crypto.tls: increase handshake buffer sizes --- lib/std/crypto/tls/Client.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/std/crypto/tls/Client.zig b/lib/std/crypto/tls/Client.zig index 2a0d49ca69..4665a0ba38 100644 --- a/lib/std/crypto/tls/Client.zig +++ b/lib/std/crypto/tls/Client.zig @@ -256,8 +256,8 @@ pub fn init(stream: anytype, ca_bundle: Certificate.Bundle, host: []const u8) In var main_cert_pub_key: CertificatePublicKey = undefined; const now_sec = std.time.timestamp(); - var cleartext_bufs: [2][8000]u8 = undefined; - var handshake_buffer: [8000]u8 = undefined; + var cleartext_bufs: [2][tls.max_ciphertext_inner_record_len]u8 = undefined; + var handshake_buffer: [tls.max_ciphertext_record_len]u8 = undefined; var d: tls.Decoder = .{ .buf = &handshake_buffer }; while (true) { try d.readAtLeastOurAmt(stream, tls.record_header_len);