| ... | ... | @@ -2199,10 +2199,15 @@ pub const Signature = union(enum) { |
| 2199 | 2199 | const sigversion = try b64r.readInt(u32, .big); |
| 2200 | 2200 | if (sigversion != 1) return .unrecognized; |
| 2201 | 2201 | const publickey = try b64r.readAlloc(allocator, try b64r.readInt(u32, .big)); |
| 2202 | errdefer allocator.free(publickey); |
| 2202 | 2203 | const namespace = try b64r.readAlloc(allocator, try b64r.readInt(u32, .big)); |
| 2204 | defer allocator.free(namespace); |
| 2203 | 2205 | const reserved = try b64r.readAlloc(allocator, try b64r.readInt(u32, .big)); |
| 2206 | defer allocator.free(reserved); |
| 2204 | 2207 | const hash_algorithm = try b64r.readAlloc(allocator, try b64r.readInt(u32, .big)); |
| 2208 | errdefer allocator.free(hash_algorithm); |
| 2205 | 2209 | const signature = try b64r.readAlloc(allocator, try b64r.readInt(u32, .big)); |
| 2210 | errdefer allocator.free(signature); |
| 2206 | 2211 | if (!std.mem.eql(u8, namespace, "git")) return .unrecognized; |
| 2207 | 2212 | if (reserved.len > 0) return .unrecognized; |
| 2208 | 2213 | |