aboutsummaryrefslogtreecommitdiff
path: root/lib/std/crypto/Certificate/Bundle/macos.zig
AgeCommit message (Collapse)Author
6 dayscompiler: update various code to new fs APIAndrew Kelley
6 daysupdate all readFileAlloc() to accept Io instanceAndrew Kelley
6 daysupdate all std.fs.cwd() to std.Io.Dir.cwd()Andrew Kelley
6 daysupdate all occurrences of std.fs.File to std.Io.FileAndrew Kelley
2025-10-29std: fix macos compilation errorsAndrew Kelley
2025-08-30compiler: fix macos buildAndrew Kelley
2025-08-29std.Io: delete GenericReaderAndrew Kelley
and delete deprecated alias std.io
2025-02-20rescanMac: Avoid overallocating/overreading by millions of bytesRyan Liptak
readAtLeast is greedy and will read the entire length of the buffer if it can. However, reading past the end of the cert in this case is useless, so reading the full length of the buffer just puts an increasingly large (due to the growth algorithm of ArrayList) collection of wasted bytes after each cert in cb.bytes. In practical terms, this ends up saving potentially millions of bytes of wasted reads/allocations. In my testing, after reading the keychain files on my machine, cb.bytes ends up with these capacities: - Before: cb.bytes.capacity = 32720747 - After: cb.bytes.capacity = 251937 That's a decrease of 99.2% Additionally, swaps to readNoEof since it should be an error to hit EOF without reading the full cert size.
2025-02-18Skip empty/invalid records/certs in MacOS keychain filesRyan Liptak
In the original PR that implemented this (https://github.com/ziglang/zig/pull/14325), it included a list of references for the keychain format. Multiple of those references include the checks that are added in this commit, and empirically this fixes the loading of a real keychain file that was previously failing (it had both a record with offset 0 and a record with cert_size 0). Fixes #22870
2025-02-09Read System.keychain as well as SystemRootCertificates.keychain for MacOS CA ↵Don
Bundle
2024-07-19std.c reorganizationAndrew Kelley
It is now composed of these main sections: * Declarations that are shared among all operating systems. * Declarations that have the same name, but different type signatures depending on the operating system. Often multiple operating systems share the same type signatures however. * Declarations that are specific to a single operating system. - These are imported one per line so you can see where they come from, protected by a comptime block to prevent accessing the wrong one. Closes #19352 by changing the convention to making types `void` and functions `{}`, so that it becomes possible to update `@hasDecl` sites to use `@TypeOf(f) != void` or `T != void`. Happily, this ended up removing some duplicate logic and update some bitrotted feature detection checks. A handful of types have been modified to gain namespacing and type safety. This is a breaking change. Oh, and the last usage of `usingnamespace` site is eliminated.
2024-03-19extract std.posix from std.osAndrew Kelley
closes #5019
2024-02-04x86_64: fix errors compiling the compilerJacob Young
This fixes issues targetting both `x86_64-linux` and `x86_64-macos` with the self-hosted backend.
2024-01-22std.io: replace readStructBig with readStructEndianTristan Ross
2023-10-31std.builtin.Endian: make the tags lower caseAndrew Kelley
Let's take this breaking change opportunity to fix the style of this enum.
2023-10-31mem: fix ub in writeIntJacob Young
Use inline to vastly simplify the exposed API. This allows a comptime-known endian parameter to be propogated, making extra functions for a specific endianness completely unnecessary.
2023-06-24all: migrate code to new cast builtin syntaxmlugg
Most of this migration was performed automatically with `zig fmt`. There were a few exceptions which I had to manually fix: * `@alignCast` and `@addrSpaceCast` cannot be automatically rewritten * `@truncate`'s fixup is incorrect for vectors * Test cases are not formatted, and their error locations change
2023-06-19all: zig fmt and rename "@XToY" to "@YFromX"Eric Joldasov
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
2023-04-17add explicit error union for Bundle.rescan and associated functionsNameless
2023-01-17Add std.os.darwin.cssmfn ⌃ ⌥
2023-01-17std.crypto.Certificate.Bundle: clear bundle before macOS rescanfn ⌃ ⌥
2023-01-16Find system-installed root SSL certificates on macOS (#14325)fn ⌃ ⌥