unexpected packet type - problem and workaround
Posted: Tue 30 Mar 2021 09:15
There is a problem with a seUnexpectedPacketType Exception.
htHelloRequest comes to MakeClientRenegotiateMessage, comes to MakeClientHelloMessage
Comes always to seUnexpectedPacketType cause FState is in this path always htHelloRequest.
Replacing with
is a workaround fixing my current problem, but i can't see over the side effects
Code: Select all
procedure TClientHandshakeLayer.ReplyToMessage(Message: THandshakeMessage);
begin
...
htHelloRequest:
MakeClientRenegotiateMessage;
...
end;
Code: Select all
procedure TClientHandshakeLayer.MakeClientHelloMessage;
...
begin
if (FState <> htNothing) and (FState <> htFinished) and (FState <> htServerHello) then
raise EscError.Create(seUnexpectedPacketType);
Replacing with
Code: Select all
// if (FState <> htHelloRequest) and (FState <> htNothing) and (FState <> htFinished) and (FState <> htServerHello) then
if not (FState in [htHelloRequest, htNothing, htFinished, htServerHello]) then
raise EscError.Create(seUnexpectedPacketType);