| ... | @@ -64,6 +64,7 @@ pub fn rescan(cb: *Bundle, gpa: Allocator) RescanError!void { | ... | @@ -64,6 +64,7 @@ pub fn rescan(cb: *Bundle, gpa: Allocator) RescanError!void { |
| 64 | .netbsd => return rescanBSD(cb, gpa, "/etc/openssl/certs/ca-certificates.crt"), | 64 | .netbsd => return rescanBSD(cb, gpa, "/etc/openssl/certs/ca-certificates.crt"), |
| 65 | .dragonfly => return rescanBSD(cb, gpa, "/usr/local/etc/ssl/cert.pem"), | 65 | .dragonfly => return rescanBSD(cb, gpa, "/usr/local/etc/ssl/cert.pem"), |
| 66 | .windows => return rescanWindows(cb, gpa), | 66 | .windows => return rescanWindows(cb, gpa), |
| | 67 | .solaris => return rescanSolaris(cb, gpa, "/etc/ssl/cacert.pem"), |
| 67 | else => {}, | 68 | else => {}, |
| 68 | } | 69 | } |
| 69 | } | 70 | } |
| ... | @@ -151,6 +152,15 @@ fn rescanWindows(cb: *Bundle, gpa: Allocator) RescanWindowsError!void { | ... | @@ -151,6 +152,15 @@ fn rescanWindows(cb: *Bundle, gpa: Allocator) RescanWindowsError!void { |
| 151 | cb.bytes.shrinkAndFree(gpa, cb.bytes.items.len); | 152 | cb.bytes.shrinkAndFree(gpa, cb.bytes.items.len); |
| 152 | } | 153 | } |
| 153 | | 154 | |
| | 155 | const RescanSolarisError = AddCertsFromFilePathError; |
| | 156 | |
| | 157 | fn rescanSolaris(cb: *Bundle, gpa: Allocator, cert_file_path: []const u8) RescanSolarisError!void { |
| | 158 | cb.bytes.clearRetainingCapacity(); |
| | 159 | cb.map.clearRetainingCapacity(); |
| | 160 | try addCertsFromFilePathAbsolute(cb, gpa, cert_file_path); |
| | 161 | cb.bytes.shrinkAndFree(gpa, cb.bytes.items.len); |
| | 162 | } |
| | 163 | |
| 154 | pub const AddCertsFromDirPathError = fs.File.OpenError || AddCertsFromDirError; | 164 | pub const AddCertsFromDirPathError = fs.File.OpenError || AddCertsFromDirError; |
| 155 | | 165 | |
| 156 | pub fn addCertsFromDirPath( | 166 | pub fn addCertsFromDirPath( |