EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Strange rx behavior

Also by EldoS: CallbackDisk
Create virtual disks backed by memory or custom location, expose disk images as disks and more.
Posted: 05/06/2010 07:27:23
by neil young (Standard support level)
Joined: 11/05/2007
Posts: 96

Hi again,


Server A: The SBB Stack is driven in TLS mode.

Client B: In order to provoke some erroneous condx I'm sending non TLS packets from the client using the same SBB stack, but client.enabled = false

Client opens the socket connection and starts the initial sequence. Server is receiving raw socket data and calls DataAvailable. I'm immediately getting a OnReceive callback, requesting 2 bytes (which are written). The next and all subsequent callbacks OnReceive have a MaxSize of 0, which did hang in my realisation until now, because I wasn't prepared to get a callback of 0 bytes.

I can fix this, but why do I'm getting a 0 byte request?

Posted: 05/06/2010 08:19:43
by Ken Ivanov (Team)

Thank you for contacting us.

That is how it works. The server obtains packet length from first two bytes received. If this length is 0, 0 bytes are requested with the subsequent OnReceive call.

I agree that this behavior is a bit non-obvious. We will improve the behavior of the components to make them return errors in such cases.
Posted: 05/06/2010 09:30:38
by neil young (Standard support level)
Joined: 11/05/2007
Posts: 96

Length is in the first two bytes? Is this TLS standard?
Posted: 05/06/2010 09:41:27
by Ken Ivanov (Team)

It is defined by SSL2 standard. All SSL2+SSL3+TLS1-compliant clients must use SSL2 client hello for backward compatibility reasons.
Posted: 05/06/2010 11:09:37
by neil young (Standard support level)
Joined: 11/05/2007
Posts: 96

Ah, yes. Now when you say this I remember to have seen the "Client Hello" in some traces :)

Also by EldoS: CallbackFilter
A component to monitor and control disk activity, track file and directory operations (create, read, write, rename etc.), alter file data, encrypt files, create virtual files.



Topic viewed 760 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS business operates as a division of /n software, inc. For more information, please read the announcement.

Got it!