Skip to content

std.crypto.Certificate.Bundle: find system-installed root certificates on macOS #14169

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Tracked by #14178
andrewrk opened this issue Jan 3, 2023 · 0 comments · Fixed by #14325
Closed
Tracked by #14178

std.crypto.Certificate.Bundle: find system-installed root certificates on macOS #14169

andrewrk opened this issue Jan 3, 2023 · 0 comments · Fixed by #14325
Labels
contributor friendly This issue is limited in scope and/or knowledge of Zig internals. enhancement Solving this issue will likely involve adding new logic or components to the codebase. os-macos standard library This issue involves writing Zig code for the standard library.
Milestone

Comments

@andrewrk
Copy link
Member

andrewrk commented Jan 3, 2023

Extracted from #13980.

This code needs to be expanded to find the root certificates on macOS:

pub fn rescan(cb: *Bundle, gpa: Allocator) !void {
switch (builtin.os.tag) {
.linux => return rescanLinux(cb, gpa),
.windows => {
// TODO
},
.macos => {
// TODO
},
else => {},
}
}

Hint: this is typically done with a framework on macOS but we cannot depend on frameworks in the zig standard library. Perhaps this implementation can rely on a child process for now, like this:

/usr/bin/security find-certificate -a -p /System/Library/Keychains/SystemRootCertificates.keychain

However, ideally there would be no child process execution like this.

Related:

@andrewrk andrewrk added enhancement Solving this issue will likely involve adding new logic or components to the codebase. contributor friendly This issue is limited in scope and/or knowledge of Zig internals. standard library This issue involves writing Zig code for the standard library. os-macos labels Jan 3, 2023
@andrewrk andrewrk added this to the 0.11.0 milestone Jan 3, 2023
@andrewrk andrewrk mentioned this issue Jan 11, 2023
32 tasks
@mlugg mlugg moved this to Uncategorized in Package Manager Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor friendly This issue is limited in scope and/or knowledge of Zig internals. enhancement Solving this issue will likely involve adding new logic or components to the codebase. os-macos standard library This issue involves writing Zig code for the standard library.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant