╭ changed ───────╮ │src/test/ssh.zig│ ╰────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────╮ │← previous│ ╰──────────╯ ╭────────────────────────────────────────────────────────────────────────────────╮ │280 var sc_cipher = proto.Cipher.init(&keys.sc_enc, 3); │ │281 │ │282 // STEP 5: SERVICE REQUEST (RFC 4253 §10) │ │283 - // First encrypted message: client asks for the "ssh-userauth" service.│ │284 - // Server replies SERVICE_ACCEPT. ("ssh-connection" comes after auth.) │ │283 + // first encrypted message: client asks for the "ssh-userauth" service.│ │284 + // server replies SERVICE_ACCEPT. ("ssh-connection" comes after auth.) │ │285 { │ │286 var req: std.ArrayList(u8) = .empty; │ │287 defer req.deinit(allocator); │ ╰────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────╮ │296 } │ │297 │ │298 // STEP 6: PUBLIC-KEY USERAUTH — PROBE (RFC 4252 §7) │ │299 - // Two-trip dance. Round 1: USERAUTH_REQUEST with method=publickey and│ │300 - // has_signature=false, carrying just the algo + public key blob. The │ │299 + // two-trip dance. round 1: USERAUTH_REQUEST with method=publickey and│ │300 + // has_signature=false, carrying just the algo + public key blob. the │ │301 // server says USERAUTH_PK_OK if it would accept that key (haxy │ │302 // accepts any ed25519) or USERAUTH_FAILURE if not — so the client │ │303 // doesn't waste a signature on a rejected key. │ ╰───────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────╮ │325 } │ │326 │ │327 // STEP 7: PUBLIC-KEY USERAUTH — SIGNED REQUEST │ │328 - // Round 2: same USERAUTH_REQUEST, now with has_signature=true and an│ │328 + // round 2: same USERAUTH_REQUEST, now with has_signature=true and an│ │329 // ed25519 signature over the canonical signed-data block — see │ │330 - // proto.appendPublickeySignedData for the exact byte layout. The │ │330 + // proto.appendPublickeySignedData for the exact byte layout. the │ │331 // block includes session_id (== H of the first KEX), so signatures │ │332 // can't be replayed across sessions. │ │333 var signed: std.ArrayList(u8) = .empty; │ ╰──────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────╮ │361 } │ │362 │ │363 // STEP 8: CHANNEL_OPEN (RFC 4254 §5.1) │ │364 - // Open a "session" channel — SSH's container for shell/exec/subsystem.│ │365 - // Client picks its own channel id and announces an initial receive │ │364 + // open a "session" channel — SSH's container for shell/exec/subsystem.│ │365 + // client picks its own channel id and announces an initial receive │ │366 // window + max-packet size; server replies CHANNEL_OPEN_CONFIRMATION │ │367 - // with its own channel id and c->s limits. Each side identifies the │ │367 + // with its own channel id and c->s limits. each side identifies the │ │368 // channel by *the other's* id when sending. │ │369 // │ │370 // haxy supports exactly one channel per connection — a second │ ╰────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────╮ │392 } │ │393 │ │394 // STEP 9: CHANNEL_REQUEST exec (RFC 4254 §6.5) │ │395 - // Ask the server to run a command on this channel. Packet is │ │396 - // addressed to the *server's* channel id. With want_reply=true the │ │395 + // ask the server to run a command on this channel. packet is │ │396 + // addressed to the *server's* channel id. with want_reply=true the │ │397 // server must respond CHANNEL_SUCCESS or CHANNEL_FAILURE before any│ │398 // CHANNEL_DATA flows. │ │399 const exec_command = "git-upload-pack 'demo-repo'"; │ ╰─────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────╮ │414 } │ │415 │ │416 // STEP 10: HANDLER RUNS, CHANNEL TEARDOWN │ │417 - // The server is now in handleSession. Our recording handler returns│ │417 + // the server is now in handleSession. our recording handler returns│ │418 // immediately; runChannelLayer's wrap-up then sends: │ │419 // - CHANNEL_REQUEST "exit-status" (status=0, want_reply=false) │ │420 // - CHANNEL_EOF │ ╰─────────────────────────────────────────────────────────────────────────────╯