unexpected packet type - problem and workaround

Discussion of open issues, suggestions and bugs regarding network security and data protection solution - SecureBridge
Post Reply
tabu
Posts: 5
Joined: Fri 15 Jan 2021 14:02

unexpected packet type - problem and workaround

Post by tabu » Tue 30 Mar 2021 09:15

There is a problem with a seUnexpectedPacketType Exception.

Code: Select all

procedure TClientHandshakeLayer.ReplyToMessage(Message: THandshakeMessage);
begin
...
    htHelloRequest:
      MakeClientRenegotiateMessage;
...
end;
htHelloRequest comes to MakeClientRenegotiateMessage, comes to MakeClientHelloMessage

Code: Select all

procedure TClientHandshakeLayer.MakeClientHelloMessage;
...
begin
  if  (FState <> htNothing) and (FState <> htFinished) and (FState <> htServerHello) then
    raise EscError.Create(seUnexpectedPacketType);

Comes always to seUnexpectedPacketType cause FState is in this path always htHelloRequest.

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);
is a workaround fixing my current problem, but i can't see over the side effects

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: unexpected packet type - problem and workaround

Post by ViktorV » Thu 01 Apr 2021 16:58

Unfortunately, we are unable to reproduce the problem in our environment based on the information you provide.
Please check if the behavior you specified is reproduced on the new SecureBridge 9.5.1 build, which is already available for download. If it is played again, in order for us to be able to give you a detailed answer, please compose a small sample demonstrating the described behavio and send it to us using contact form https://devart.com/company/contactform.html

Post Reply