i am currently working on a sample and a tool to troubleshoot with SslStream - i half way finished (and working so far). i can send you what i got...
One thing to note - i am not quite sure if SslStream in your .net build is working at all...i am using Nov CTP and they changed e.g. some of the method names, e.g. ClientAuthenticate -> AuthenticateAsClient a.s.o.
Dominick Baier - DevelopMentor
nntp://news.microsoft.com/microsoft.public.dotnet.security/< XXXX@XXXXX.COM >
Could someone point me a tutorial on using SslStream (.NET 2)? Here is
what I have:
* When I try to read or write to a SslStream which is not authenticated
(ClientAuthenticate or ServerAuthenticate), I get an exception
(InvalidOperationException: "This operation is only allowed on
successfully authenticated context. Invoke one of Authenticate overload
* If I try to authenticate the server with ServerAuthenticate, I get an
exception (Win32Exception: "No credentials available on security
package.", translated from portuguese);
* If I authenticate the client only, with ClientAuthenticate, I also get
the first exception.
So, if someone could help, what should I do to use a SslStream?
Extra info: I'm using .NET 2.0.40607, Windows 2000 Professional (logging
on AD) and test certificate created with makecert.exe.