http://bugzilla.novell.com/show_bug.cgi?id=602659
http://bugzilla.novell.com/show_bug.cgi?id=602659#c0 Summary: SslStream.AuthenticateAsServer incompatibility with .NET Classification: Mono Product: Mono: Class Libraries Version: 2.4.x AddOn CD Platform: x86-64 OS/Version: SLES 11 Status: NEW Severity: Normal Priority: P5 - None Component: System AssignedTo: mono-bugs@lists.ximian.com ReportedBy: maciej.pas...@secpl.cs.put.poznan.pl QAContact: mono-bugs@lists.ximian.com Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 When calling AuthenticateAsServer on SslStream, call hangs and no callback is made on the client side to validate server's certificate. Reproducible: Always Steps to Reproduce: 1. Setup server side of SslStream 2. Setup client's cert validation callback to alway return true 3. Call AuthenticateAsServer 4. Setup client side of SslStream and connect to previously prepared server 5. Setup callback to provide server with client certificate and callback for server's cert validation. 6. Call AuthenticateAsClient... wait for the server's cert validation to be called on the client side and wait for the exit from AuthenticateAsServer method on the server side. Actual Results: Server hangs and the code never exits from AuthenticateAsServer Expected Results: Server's certificate validation callback should be called on the client side, and server's code should exit from call to AuthenticateAsServer(). The code works as expected on .NET Framework. The code was tested on both Mono 2.4 (Mono Extensions) and on Mono 2.6 from openSuse's Build Service. After examining the code in: System.Net.Security/SslStream.cs It appears that after the call to BeginAuthenticateAsServer server start reading from the socket and, ineed, when I call: m_sslClient.Write(new byte[] { 0 }); on the client side, authentication process finishes at both the client and the server side, this works differently to the SslStream implementiation in .NET. When change is made to SslStream.cs to start writing in BeginAuthenticateAsServer() that is return BeginRead (new byte [0], 0, 0, callback, asyncState); is changed to return BeginWrite (new byte [0], 0, 0, callback, asyncState); The code starts working as expected. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug. _______________________________________________ mono-bugs maillist - mono-bugs@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-bugs