[domistream] Host: HTTP requests, XML answers and pairing #12
Reference in New Issue
Block a user
Delete Branch "feature/host-pairing-http"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Lumen L1, host side of HTTP/HTTPS and pairing: new module
hostwithhost::http(strict GET request-head and query parsing, typed routes, XML answer writers) andhost::pairing(the host's pairing state machine), tests first.host::http: caps checked before allocation (head 64 KiB, 64 headers, path 256 B, query 40 KiB, 32 params, values 32 KiB); refuses bodies, folded headers, bare CR/LF; routes ServerInfo, AppList, Launch, Resume, Cancel, Pair, Unpair, AppAsset, Unknown; unknown launch parameters kept for logging (U4). Writers for serverinfo (PROTOCOL 1.2, PairStatus only over HTTPS when paired), applist, launch/resume, ok, pair answers, error root; all escaped and checked against what the client parser accepts.host::pairing: the five phases from the host side, holding phase 1 until the owner supplies the PIN (supply_pin, the "Enter the code" box), deadlines from the caller's clock, cancel; phase 5 only over HTTPS with the phase-1 certificate.PairedClient::trusted(cert)records a certificate the owner already trusts (the Tessera-grant path)./pairagainst Lumen: arena-host records their client certificate withPairedClient::trustedand hands them the host certificate over the signed grant channel. Arena Domi Remote keeps the PIN path (D5).Evidence: 52 new tests (our client
PairingSessionagainst the host in memory through the real parsers and writers; wrong PIN, bad signatures, every out-of-order phase, wrong client, deadlines, cancel; every client request parses on the host; every host answer parses on the client; hostile heads; caps at max and max+1; proptests). Rebased on PRs #9-#11: 416 passed / 0 failed; clippy, fmt and rustdoc clean. Fuzz:host_http_request8,784,228 runs / 75 s,host_pairing45,096 runs / 75 s (RSA signing bound), 0 crashes.Noted for follow-ups: the client's applist cap allows 4096 apps but its XML element cap allows 4095 (writer caps at 4095); PIN brute force after phase 3 is inherent to the GameStream handshake (matters only against a man in the middle; the Tessera path avoids it).
Clean-room checklist
Self-review: rebase conflicts were the lib.rs module table and fuzz bins (merged). Checked that host key material is redacted in Debug, that
matchesis constant time, and that a fuzzer without a client key can never reach Paired (fuzz invariant). The list of U1/U4/U25/U27 questions is kept for the black-box measurement.a65bc54878to80047c65df