Skip to content

Commit

Permalink
Fix recvClientData with single Handshake packet
Browse files Browse the repository at this point in the history
Function recvClientData did not accept a client flight with messages
ClientKeyXchg and CertVerify received from the same Handshake packet.
This patch extends the state machine to transform remaining handshake
messages as input to RecvStateNext.

Resolves #350.
  • Loading branch information
ocheron committed Jan 29, 2019
1 parent 8d67e1d commit c281fd7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions core/Network/TLS/Handshake/Common.hs
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ recvPacketHandshake ctx = do
-- | process a list of handshakes message in the recv state machine.
onRecvStateHandshake :: Context -> RecvState IO -> [Handshake] -> IO (RecvState IO)
onRecvStateHandshake _ recvState [] = return recvState
onRecvStateHandshake _ (RecvStateNext f) hms = f (Handshake hms)
onRecvStateHandshake ctx (RecvStateHandshake f) (x:xs) = do
nstate <- f x
processHandshake ctx x
Expand Down

0 comments on commit c281fd7

Please sign in to comment.