╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ serve_ssh_protocol.zig ───────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭ find file ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╮ ╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╮ │ │ │http│ ssh │ │ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╯ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╯
2280 .cs_cipher = Cipher.init(&key, 0), 2281 .sc_cipher = Cipher.init(&key, 0), 2282 .rekey = undefined, 2283 .idle = &idle, 2284 }; 2285 const Handler = struct { 2286 pub fn handleSession(_: *@This(), _: *SessionCtx, _: Request) !void { 2287 return error.UnexpectedSession; 2288 } 2289 }; 2290 var handler = Handler{}; 2291 try runChannelLayer(&conn, &.{ .fingerprint = @splat(0), .blob = "" }, &handler); 2292 var output_reader = std.Io.Reader.fixed(writer.buffered()); 2293 var receiver = Cipher.init(&key, 0); 2294 const confirmation = try receiver.readPacket(allocator, &output_reader); 2295 defer allocator.free(confirmation); 2296 try std.testing.expectEqual(SSH_MSG_CHANNEL_OPEN_CONFIRMATION, confirmation[0]); 2297 const close = try receiver.readPacket(allocator, &output_reader); 2298 defer allocator.free(close); 2299 try std.testing.expectEqualSlices(u8, &.{ SSH_MSG_CHANNEL_CLOSE, 0, 0, 0, 7 }, close); 2300 try std.testing.expectEqual(0, output_reader.buffered().len); 2301 } 2302