mirror of
https://github.com/ziglang/zig.git
synced 2025-12-23 22:53:06 +00:00
solaris: load CA certs file
This commit is contained in:
parent
c17ebdca6a
commit
68bcd7ddd4
@ -64,6 +64,7 @@ pub fn rescan(cb: *Bundle, gpa: Allocator) RescanError!void {
|
|||||||
.netbsd => return rescanBSD(cb, gpa, "/etc/openssl/certs/ca-certificates.crt"),
|
.netbsd => return rescanBSD(cb, gpa, "/etc/openssl/certs/ca-certificates.crt"),
|
||||||
.dragonfly => return rescanBSD(cb, gpa, "/usr/local/etc/ssl/cert.pem"),
|
.dragonfly => return rescanBSD(cb, gpa, "/usr/local/etc/ssl/cert.pem"),
|
||||||
.windows => return rescanWindows(cb, gpa),
|
.windows => return rescanWindows(cb, gpa),
|
||||||
|
.solaris => return rescanSolaris(cb, gpa, "/etc/ssl/cacert.pem"),
|
||||||
else => {},
|
else => {},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -151,6 +152,15 @@ fn rescanWindows(cb: *Bundle, gpa: Allocator) RescanWindowsError!void {
|
|||||||
cb.bytes.shrinkAndFree(gpa, cb.bytes.items.len);
|
cb.bytes.shrinkAndFree(gpa, cb.bytes.items.len);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const RescanSolarisError = AddCertsFromFilePathError;
|
||||||
|
|
||||||
|
fn rescanSolaris(cb: *Bundle, gpa: Allocator, cert_file_path: []const u8) RescanSolarisError!void {
|
||||||
|
cb.bytes.clearRetainingCapacity();
|
||||||
|
cb.map.clearRetainingCapacity();
|
||||||
|
try addCertsFromFilePathAbsolute(cb, gpa, cert_file_path);
|
||||||
|
cb.bytes.shrinkAndFree(gpa, cb.bytes.items.len);
|
||||||
|
}
|
||||||
|
|
||||||
pub const AddCertsFromDirPathError = fs.File.OpenError || AddCertsFromDirError;
|
pub const AddCertsFromDirPathError = fs.File.OpenError || AddCertsFromDirError;
|
||||||
|
|
||||||
pub fn addCertsFromDirPath(
|
pub fn addCertsFromDirPath(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user