| ... | ... | @@ -60,6 +60,7 @@ pub fn rescan(cb: *Bundle, gpa: Allocator) RescanError!void { |
| 60 | 60 | switch (builtin.os.tag) { |
| 61 | 61 | .linux => return rescanLinux(cb, gpa), |
| 62 | 62 | .macos => return rescanMac(cb, gpa), |
| 63 | .openbsd => return rescanOpenBSD(cb, gpa), |
| 63 | 64 | .windows => return rescanWindows(cb, gpa), |
| 64 | 65 | else => {}, |
| 65 | 66 | } |
| ... | ... | @@ -112,6 +113,19 @@ pub fn rescanLinux(cb: *Bundle, gpa: Allocator) RescanLinuxError!void { |
| 112 | 113 | cb.bytes.shrinkAndFree(gpa, cb.bytes.items.len); |
| 113 | 114 | } |
| 114 | 115 | |
| 116 | pub const RescanOpenBSDError = AddCertsFromFilePathError; |
| 117 | |
| 118 | pub fn rescanOpenBSD(cb: *Bundle, gpa: Allocator) RescanOpenBSDError!void { |
| 119 | const cert_file_path = "/etc/ssl/cert.pem"; |
| 120 | |
| 121 | cb.bytes.clearRetainingCapacity(); |
| 122 | cb.map.clearRetainingCapacity(); |
| 123 | |
| 124 | addCertsFromFilePathAbsolute(cb, gpa, cert_file_path) catch |err| return err; |
| 125 | |
| 126 | cb.bytes.shrinkAndFree(gpa, cb.bytes.items.len); |
| 127 | } |
| 128 | |
| 115 | 129 | pub const RescanWindowsError = Allocator.Error || ParseCertError || std.os.UnexpectedError || error{FileNotFound}; |
| 116 | 130 | |
| 117 | 131 | pub fn rescanWindows(cb: *Bundle, gpa: Allocator) RescanWindowsError!void { |