| ... | ... | @@ -6,6 +6,9 @@ const Allocator = std.mem.Allocator; |
| 6 | 6 | const Bundle = @import("../Bundle.zig"); |
| 7 | 7 | |
| 8 | 8 | pub fn rescanMac(cb: *Bundle, gpa: Allocator) !void { |
| 9 | cb.bytes.clearRetainingCapacity(); |
| 10 | cb.map.clearRetainingCapacity(); |
| 11 | |
| 9 | 12 | const file = try fs.openFileAbsolute("/System/Library/Keychains/SystemRootCertificates.keychain", .{}); |
| 10 | 13 | defer file.close(); |
| 11 | 14 | |
| ... | ... | @@ -63,6 +66,8 @@ pub fn rescanMac(cb: *Bundle, gpa: Allocator) !void { |
| 63 | 66 | try cb.parseCert(gpa, cert_start, now_sec); |
| 64 | 67 | } |
| 65 | 68 | } |
| 69 | |
| 70 | cb.bytes.shrinkAndFree(gpa, cb.bytes.items.len); |
| 66 | 71 | } |
| 67 | 72 | |
| 68 | 73 | const ApplDbHeader = extern struct { |