Repository navigation
Conversation
|
If v2 then module and class name should be SSLv2, keep the Also, I'm expecting it to be a subclass of an abstract class |
|
Noted — module and class rename to |
|
Cross-review (different model, adversarial) came back NEEDS CHANGES. Wire format, message types, and round-trip on well-formed records are all verified correct — the defects are elsewhere:
Should-fix: five of the seven raw-body message types are specified as sent-encrypted, so decoding them as cleartext on a real encrypted session produces garbage — needs a documented fallback. A few RFC/draft citation and overclaim fixes in the docstrings too (see full review). Separately: the owner's rename ruling ( Dispatching the bug fixes now. |
…entry point Per the owner's ruling on #2441: TLS should dispatch by version with a thin abstract base and per-version dispatcher, the same shape HTTP already uses over HTTPv1/HTTPv2. TLS keeps its record-layer schema and subclasses SSL as before, but now only identifies the concrete tier -- SSLv3, TLSv1_0, TLSv1_1, TLSv1_2 or TLSv1_3, new thin classes each fixing alias/id() -- and delegates; the real parse moves to TLS._read_tls_record, shared unchanged by every tier since SSLv3 through TLS 1.3 share the identical wire format this dissector already treated generically. Dispatch: SSLv3/TLSv1_0/TLSv1_1 are named directly by the record's legacy version; 0x0303 is ambiguous between TLS 1.2 and TLS 1.3, which freezes its own legacy version at TLS 1.2's value, so that case peeks the ClientHello/ServerHello's supported_versions extension (SSL._tls_negotiates) and falls back to TLS 1.2 -- the common case -- when the peek is inconclusive. Any other legacy version also falls back to TLS 1.2, so _validate_tls_record reports the real rejection reason rather than this method guessing one. SSLv2 entry point: _looks_like_sslv2 disambiguates SSLv2's content-type-less header (2-octet form, or 3-octet escaped/plain) from a genuine TLS/SSLv3+ record's content-type+0x03 pair, and TLS._guess_version delegates to SSL2 when it matches. The import is lazy and ImportError-tolerant, since #2466 (SSL2) is not yet merged; dispatch falls through to the TLS family unchanged until it is. TLS.id() deliberately does not list SSL2 -- it is checked against every instance of this class regardless of which tier it resolved to, and listing it would make genuine TLS 1.2 traffic match an SSL2 lookup. DTLS 1.3's new unified record header (#2467) is out of scope and depends on this landing first; only its legacy-format records, which reuse the shared wire format, are reachable here. Refs #2437, #2457, #2467
66d7002 to
c6b605d
Compare
|
Fixed and verified directly (new head |
|
Round 2 review: NEEDS CHANGES. Most of round 1 holds up, but:
Should-fix: make() doesn't raise where its docstring claims for a non-hello data-model body; no hand-built (non-make()-derived) wire vector in the tests, so make/read-shared bugs can slip through; a version-value citation slip (reads as 768, docstring said "3" not "768"); the encrypted-body fallback has a simpler fix available (ForwardMatchField or the schema's own raw buffer) than the "needs corekit changes" excuse claimed. Dispatching round 3. |
c6b605d to
92b7124
Compare
|
Verified directly (new head |
|
NEEDS CHANGES. Cross-review on Opus at head All seven round-3 items are fixed as described. Two blockers sit beside them:
Should fix in the same round:
Correction to my verification above: I said the read-path SESSION-ID-HIT check "can never trip". It does: it's what refuses |
92b7124 to
a3646c4
Compare
|
Verified ( |
|
Held: Actions queue at 47 (above the hold line). The fix round dispatches when the queue drops below 40. |
|
Member order is in scope for this rework. Group the class body as: properties, public methods ( |
c910fd4 to
6680816
Compare
|
GOOD TO GO (Sonnet,
|
|
we need |
|
Yes, it's needed. |
|
GOOD TO GO (Sonnet, |
- SSLv2 (draft-hickman-netscape-ssl-00) subclasses SSL and joins SSL.id(). Its module and class are named SSLv2. - TLS.read tries TLS first. SSLv2 is taken only when TLS rejects the record and the payload is a complete CLIENT-HELLO or SERVER-HELLO that passes the hello length probe; anything else stays Raw. - The TLS object that adopts an SSLv2 parse reports its 2- or 3-octet header as length, so packet splits as a direct SSLv2 parse does. - TLS.from_data rebuilds an adopted SSLv2 record as SSLv2, so a port-443 hello round-trips byte-exact through TCP.from_data. - Add pcapkit.const.sslv2 (HandshakeType, Version) and bump the const census pins by +2 over #2441's. Part of #2457.
7fe5592 to
3b5ef6b
Compare
|
Rebased onto main after #2443/#2491 landed, new head |
sslv2.HandshakeType and sslv2.Version are 2 new const modules, but the branch's pin bumps were all +1. Each pinned count needed the second +1: - test_const_enum_builtin_parity: ints 118->119, enums 134->135, distinct modules 128->129 - test_const_enum_get: enums 124->125, covered 121->122 - test_const_enum_lookup: enums 118->119 - test_const_registry_protocol: all_files 128->129, generated 111->112 Verified: all four files pass clean (128 tests, 1522 subtests).
|
Pushed Separate from the pins: this PR is also a const-vendor-pairing violation under the house rule ( |
|
Cross-review (Sonnet) at The blocking item is the const-vendor-pairing gap flagged above: confirmed independently, no |
Please follow the guide below
make pylint,make mypy,make isort)make testpasses (narrow set only: SSLv2, TLS and const tests; full suite not run on the shared host), and a test case covers the changeWhat is the purpose of your pull request?
feat, adds a featureDescription of your pull request and other information
Adds the SSLv2 dissector (draft-hickman-netscape-ssl-00) as a subclass of
SSL, reached on TCP 443 only as the fallback after TLS rejects a record. Part of #2457. Rebased onto main, where #2441 has merged.SSL.id()listsSSLv2. On 443, TLS parses first; SSLv2 is taken only for a complete, length-probed CLIENT-HELLO or SERVER-HELLO, otherwise the payload stays raw.length, sopacketmatches a direct parse.pcapkit.const.sslv2addsHandshakeTypeandVersion; the const census pins move +2.