Skip to content

Handshake error keeps an openssl command for a 47-byte IPv6 address after every TLS alert (#38) - #41

Merged
thebenignhacker merged 1 commit into
mainfrom
integrate/2026-10-18-r7
Oct 18, 2026
Merged

thebenignhacker merged 1 commit into
mainfrom
integrate/2026-10-18-r7

Conversation

@thebenignhacker

Copy link
Copy Markdown
Member

This pull request lands 1 commit in internal/scanner.

Included

Verified on this exact tree

  • git ls-files --others -- '*_test.go': no output (git ls-files -- '*_test.go' | wc -l: 102)
  • go mod verify: all modules verified
  • go build ./...: exit 0
  • go vet ./...: exit 0
  • gofmt -s -l .: 0 files listed
  • golangci-lint run --timeout=5m --concurrency=4 ./... (golangci-lint 2.12.2, empty cache directory): 0 issues.
  • go test -p 4 -race -count=1 -timeout 9m -v -skip '^TestAZoneScopedLinkLocalTargetIsScanned$|^TestAnUnreachableIPv6AddressIsWrittenInBrackets$/^zone-scoped_link-local$' ./...: exit 0, 6 of 6 packages ok; 960 === RUN, 959 --- PASS, 0 --- FAIL, 1 --- SKIP
  • The 1 --- SKIP: TestFIPSChildScanNamesTheHybridGroupsItCannotOffer, message runs in the child process that TestAFIPSBuildWithoutMLKEMNamesTheHybridGroupsItCannotOffer starts; TestAFIPSBuildWithoutMLKEMNamesTheHybridGroupsItCannotOffer: --- PASS
  • TestAHandshakeFailureKeepsACommandForA47ByteIPv6Address: --- PASS
  • Not run, left out by the -skip above: TestAZoneScopedLinkLocalTargetIsScanned and TestAnUnreachableIPv6AddressIsWrittenInBrackets/zone-scoped_link-local, the two callers of listenOnALinkLocalAddress (internal/scanner/zone_scoped_target_test.go:70)

Not included

None

Closes

Fixes #38

How to merge

Rebase and merge, so that each change stays its own commit on main.

…fter every TLS alert (#38)

When the openssl commands in the error for a scan that completed no
handshake do not all fit in the 500 bytes the CLI prints, the error names
the key exchange groups this scanner does not offer and the cipher suites
the handshake lacks in one sentence, then gives the commands that fit
whole. Under GODEBUG=fips140=on,tlsmlkem=0, where the scanner offers none
of the three hybrid groups, that sentence left no room for a command for
the address [ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]:65535 after alert
113 (bad certificate status response) or alert 121 (encrypted client
hello required): the first command would have ended at byte 501, so the
350-byte error gave none.

The cipher suites in that sentence are now introduced with "like" instead
of "such as", which takes 3 bytes off it. After alert 113 the error for
that address is 498 bytes and ends with the command for X25519MLKEM768.
The wording of an error whose commands all fit is not changed.

TestAHandshakeFailureKeepsACommandForA47ByteIPv6Address builds the error
for three 47-byte IPv6 addresses after each of the 256 alert values,
io.EOF and io.ErrUnexpectedEOF. It fails 6 times on the earlier code,
after alerts 113 and 121 for each address, and passes with this change.

Fixes #38
@thebenignhacker
thebenignhacker merged commit d613d1f into main Oct 18, 2026
2 checks passed
@thebenignhacker
thebenignhacker deleted the integrate/2026-10-18-r7 branch October 18, 2026 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Handshake error keeps no openssl command for a 47-byte IPv6 address after alerts 113 and 121

1 participant