╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ serve_ssh_protocol.zig ───────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭ find file ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╮ ╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │ │ │http│ ssh │ │ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╯ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
2314 .cs_cipher = Cipher.init(&key, 0), 2315 .sc_cipher = Cipher.init(&key, 0), 2316 .rekey = undefined, 2317 .idle = &idle, 2318 }; 2319 const Handler = struct { 2320 pub fn handleSession(_: *@This(), _: *SessionCtx, _: Request) !void { 2321 return error.UnexpectedSession; 2322 } 2323 }; 2324 var handler = Handler{}; 2325 try runChannelLayer(&conn, &.{ .fingerprint = @splat(0), .blob = "" }, &handler); 2326 var output_reader = std.Io.Reader.fixed(writer.buffered()); 2327 var receiver = Cipher.init(&key, 0); 2328 const confirmation = try receiver.readPacket(allocator, &output_reader); 2329 defer allocator.free(confirmation); 2330 try std.testing.expectEqual(SSH_MSG_CHANNEL_OPEN_CONFIRMATION, confirmation[0]); 2331 const close = try receiver.readPacket(allocator, &output_reader); 2332 defer allocator.free(close); 2333 try std.testing.expectEqualSlices(u8, &.{ SSH_MSG_CHANNEL_CLOSE, 0, 0, 0, 7 }, close); 2334 try std.testing.expectEqual(0, output_reader.buffered().len); 2335 } 2336