EldoS | Feel safer!

Software components for data protection, secure storage and transfer

SSL Problem

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.
#1822
Posted: 12/10/2006 15:49:46
by Jeff Bridges (Basic support level)
Joined: 12/07/2006
Posts: 2

I am trying to use the TElSimpleSSLClient with UseInternalSocket set to false. I've added OnSend and OnRecieve events, with the following code:

Code
        static void ssl_OnReceive(object Sender, ref byte[] Buffer, int MaxSize, out int Written)
        {
            Written = stream.Read(Buffer, 0, MaxSize);
        }

        static void ssl_OnSend(object Sender, byte[] Buffer)
        {
            stream.Write(Buffer, 0, Buffer.Length);
        }


stream is currently a Stream exposed via a TcpClient. When testing using the internal socket to a TCP Host, everything works fine. But if I don't use the internal socket and try using the TcpClient instead, I get a NullReferenceException when calling RecieveData. I can use SendText successfully, and both the OnSend and OnReceive events are being called.

Is what I am trying possible? The end goal is to use a stream over a Bluetooth link.
#1823
Posted: 12/11/2006 01:41:05
by Eugene Mayevski (EldoS Corp.)

Your code seems to be correct (and OnSend/OnReceive work fine, as they are used in ElSSLSocket class). Try putting the breakpoints to the above methods and check when exactly the exception happens (and where).


Sincerely yours
Eugene Mayevski
#1829
Posted: 12/11/2006 21:41:15
by Jeff Bridges (Basic support level)
Joined: 12/07/2006
Posts: 2

The exception occurs when the TElSimpleSSLClient RecieveData method is called. I've worked around this for now by creating a TCP->Bluetooth wrapper.
#1830
Posted: 12/12/2006 01:05:59
by Eugene Mayevski (EldoS Corp.)

ReceiveData calls your OnReceive handler. So the problem must be in this handler.


Sincerely yours
Eugene Mayevski

Reply

Statistics

Topic viewed 2430 times

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




|

Back to top

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

Got it!