ReviewOS

also looking at this

mail-os/mail

Harden encrypted mail storage, recovery, and forwarding

#8
Merged chris wants to merge codex/mail-storage-hardening into main
50 files +1701 -9001
packages/zig/vendor/zig-tls/README.mddeleted+0-62
Changes to packages/zig/vendor/zig-tls/README.md
@@ -1,62 +0,0 @@
1# zig-tls
2
3Pure Zig TLS 1.3 implementation for SMTP and other protocols.
4
5## Features
6
7- TLS 1.3 client and server support
8- Pure Zig implementation (no C dependencies)
9- Non-blocking I/O
10- STARTTLS support for protocol upgrades
11- Certificate and private key management
12
13## Installation
14
15Add to your `build.zig.zon`:
16
17```zig
18.dependencies = .{
19 .tls = .{
20 .path = "../zig-tls",
21 },
22},
23```
24
25Add to your `build.zig`:
26
27```zig
28const tls = b.dependency("tls", .{
29 .target = target,
30 .optimize = optimize,
31});
32exe.root_module.addImport("tls", tls.module("tls"));
33```
34
35## Usage
36
37### Server Example
38
39```zig
40const tls = @import("tls");
41
42// Load certificate and key
43var cert_key = try tls.config.CertKeyPair.fromFilePathAbsolute(
44 allocator,
45 "/path/to/cert.pem",
46 "/path/to/key.pem",
47);
48defer cert_key.deinit(allocator);
49
50// Create TLS connection from stream
51const tls_conn = try tls.serverFromStream(stream, .{
52 .auth = &cert_key,
53});
54
55// Read/write through TLS
56const n = try tls_conn.read(buffer);
57try tls_conn.write(data);
58```
59
60## License
61
62MIT - Based on https://github.com/ianic/tls.zig