diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-12-29 15:45:51 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2023-01-02 16:57:16 -0700 |
| commit | e4a9b19a1490d5c41a4d8c10f47ba5639de48404 (patch) | |
| tree | 0ed259b5e272adab65c2f81dfa4c384ebe259096 /src/zig_llvm.cpp | |
| parent | 7391df2be5143db8308ab7c5281842aea99cb1d7 (diff) | |
| download | zig-e4a9b19a1490d5c41a4d8c10f47ba5639de48404.tar.gz zig-e4a9b19a1490d5c41a4d8c10f47ba5639de48404.zip | |
std.crypto.tls.Client: rework the read function
Here's what I landed on for the TLS client. It's 16896 bytes
(max_ciphertext_record_len is 16640). I believe this is the theoretical
minimum size, give or take a few bytes.
These constraints are satisfied:
* a call to the readvAdvanced() function makes at most one call to the
underlying readv function
* iovecs are provided by the API, and used by the implementation for
underlying readv() calls to the socket
* the theoretical minimum number of memcpy() calls are issued in all
circumstances
* decryption is only performed once for any given TLS record
* large read buffers are fully exploited
This is accomplished by using the partial read buffer to storing both
cleartext and ciphertext.
Diffstat (limited to 'src/zig_llvm.cpp')
0 files changed, 0 insertions, 0 deletions
