[Mono-dev] TDS 8.0 and SslClientStream

Dmitry Key dmitryskey at hotmail.com
Tue Nov 28 01:57:09 EST 2006


Hi, all

I am working on TDS 8.0 network protocol for the SqlClient and facing with 
the problem of the handshaking implementation. The corresponding TDS packet 
consists of the TDS header and TDS body with the TLS handshake packet. So to 
parse server response we have to read entire TDS packet, analyze its type 
and, if necessary, extract TLS part and send it to the SslClientStream 
class. But this class uses asynchronous Stream.BeginRead/EndRead methods in 
the handshake procedure and it is impossible read data asynchronously from 
the internal buffer. I see two methods to resolve such a problem.
1) Rewrite handshake code of the SslClientStream/SslBaseStream in the 
synchronous manner. Another reason to do it is the following: SslStream 
class from .Net 2.0 uses synchronous methods to make handshake and as far as 
I understand Mono version of this class will be implemented on the basis of 
the Mono.Security.
2) Implement IAsyncResult interface in such a way that it will be possible 
to read data from memory buffer asynchronously. I suppose it can be done as 
the extension of the MemoryStream class.

In any case the good knowledge of Mono.Security internals is required. So 
could some Mono guru help me to solve my problem?

_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar - get it now! 
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/




More information about the Mono-devel-list mailing list