std.crypto.tls: increase handshake buffer sizes

This commit is contained in:
Jacob Young 2024-11-04 22:43:31 -05:00
parent 485f20a10a
commit d86a8aedd5

View File

@ -256,8 +256,8 @@ pub fn init(stream: anytype, ca_bundle: Certificate.Bundle, host: []const u8) In
var main_cert_pub_key: CertificatePublicKey = undefined; var main_cert_pub_key: CertificatePublicKey = undefined;
const now_sec = std.time.timestamp(); const now_sec = std.time.timestamp();
var cleartext_bufs: [2][8000]u8 = undefined; var cleartext_bufs: [2][tls.max_ciphertext_inner_record_len]u8 = undefined;
var handshake_buffer: [8000]u8 = undefined; var handshake_buffer: [tls.max_ciphertext_record_len]u8 = undefined;
var d: tls.Decoder = .{ .buf = &handshake_buffer }; var d: tls.Decoder = .{ .buf = &handshake_buffer };
while (true) { while (true) {
try d.readAtLeastOurAmt(stream, tls.record_header_len); try d.readAtLeastOurAmt(stream, tls.record_header_len);