[Mono-devel-list] Mono.Security.Protocol.Tls

Sebastien Pouliot spouliot at videotron.ca
Mon Oct 4 09:41:30 EDT 2004

>Where can I find the status of Mono.Security.Protocol.Tls? I've looked
>at the class status pages

Status pages are built so people can easily compare Mono class library with
MS class library. However this doesn't make sense for Mono specific

> but i only managed to find out that it is 100%
>managed code, not whether it is 100% done or not ;-)

Tls: An 100% managed SSLv3 and TLSv1 implementation from Carlos Guzman
from http://www.mono-project.com/contributing/crypto.html

The Mono.Security assembly is one of the few sections without a TODO entry.
I guess that's a good hint ;-)
Another one is the fact the Mono use this class for it's own HTTPS support
for WebRequest.
Finally when in doubt read the sources ;-).

>Documentation about the class is quite scarce and i have done a little
>trial and error coding with it.

The design of SslClientStream is based on the .NET Fx 1.2 preview from the
last PDC. Luckily it seems that the original documentation is still online!


Warning: I was surprised that this old documentation (1.2 preview) was still
available now that 2.0 beta 1 is released. I have the feeling that it may
disappear at any moment.

>I've noticed for instance that accessing
>the Length property triggers a NotImplementedException so I guess it is
>not 100% yet.

This should be a NotSupportedException (see SslClientStream.Length source
code) and it's completely normal as you can't know the length of a network
stream (see NetworkStream.Length documentation). This is true for many kind
of streams (and not just for Length).

>This is acually my first try at c# and mono so it might just be that I
>have no clue about what I'm doing, but what I'm trying to do is to
>establish asynchronous communication with a sort of chat server.
>Writing seems to work fine but I have a problem with reading. When doing
>BeginWrite with a callback function the code continues executing as
>expected even though the callback function hasn't finished. But when
>doing BeginRead, execution halts until the callback returns.
>Is this expected behaviour or...? When looking at examples of
>asynchronous communication on simple TCP sockets I got the picture that
>execution should continue after an asynchronous read.

Some parts are blocking, like the handshake (IIRC), which must be done when
initiating the channel.

If possible I suggest that you make your code 100% working without SSL. Then
add SSL (debugging network sessions with encrypted data isn't really fun for
most people). Adding SSL is really easy if your code is stream based (have a
look at Mono's HTTPS support in System.dll).

>Oh by the way. I'm using mono 1.0.2 on linux.

>Thank you very much in advance!
>/Fredrik Svensson

Sebastien Pouliot
home: spouliot at videotron.ca
blog: http://pages.infinit.net/ctech/poupou.html

More information about the Mono-devel-list mailing list