Skip to content

Commit

Permalink
don't allow tail garbage in client hello
Browse files Browse the repository at this point in the history
  • Loading branch information
kazu-yamamoto committed Dec 20, 2024
1 parent fb92f84 commit 7bc78fb
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tls/Network/TLS/Packet.hs
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,9 @@ decodeClientHello = do
exts <-
if r > 0
then fromIntegral <$> getWord16 >>= getExtensions
else do
rest <- remaining
_ <- getBytes rest
return []
else return []
r1 <- remaining
when (r1 /= 0) $ fail "Client hello"
let ch = CH session ciphers exts
return $ ClientHello ver random compressions ch

Expand Down

0 comments on commit 7bc78fb

Please sign in to comment.