[Mono-bugs] [Bug 698674] New: TCP communication works without SSL but doesn't with SSL certificate.

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Jun 7 19:28:20 EDT 2011


https://bugzilla.novell.com/show_bug.cgi?id=698674

https://bugzilla.novell.com/show_bug.cgi?id=698674#c0


           Summary: TCP communication works without SSL but doesn't with
                    SSL certificate.
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.6.x
          Platform: x86
        OS/Version: Ubuntu
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: Mono.Security
        AssignedTo: frego at novell.com
        ReportedBy: patel.chirag.d at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


Created an attachment (id=433410)
 --> (http://bugzilla.novell.com/attachment.cgi?id=433410)
actual client server code

User-Agent:       Mozilla/5.0 (X11; Linux i686; rv:2.0.1) Gecko/20100101
Firefox/4.0.1

Following exception occurs at:
SslStream::AuthenticateAsClient

I understand there are certificate chain errors, but those have been allowed
"OK" in certificate validation callback.

Unhandled Exception: System.IO.IOException: BeginWrite failure
  at System.Net.Sockets.NetworkStream.BeginWrite (System.Byte[] buffer, Int32
offset, Int32 size, System.AsyncCallback callback, System.Object state)
[0x00000] in <filename unknown>:0 
  at Mono.Security.Protocol.Tls.RecordProtocol.BeginSendRecord (ContentType
contentType, System.Byte[] recordData, System.AsyncCallback callback,
System.Object state) [0x00000] in <filename unknown>:0 
  at Mono.Security.Protocol.Tls.RecordProtocol.SendRecord (ContentType
contentType, System.Byte[] recordData) [0x00000] in <filename unknown>:0 
  at Mono.Security.Protocol.Tls.RecordProtocol.SendAlert
(Mono.Security.Protocol.Tls.Alert alert) [0x00000] in <filename unknown>:0 
  at Mono.Security.Protocol.Tls.RecordProtocol.SendAlert (AlertDescription
description) [0x00000] in <filename unknown>:0 
  at Mono.Security.Protocol.Tls.SslStreamBase.AsyncHandshakeCallback
(IAsyncResult asyncResult) [0x00000] in <filename unknown>:0 

For the sake of testing and bug submission, I have used a self signed
certificate generated using following commands. I do have an original
certificate received from Verisign CA. That did not work earlier.

Server cert:
makecert -r -eku 1.3.6.1.5.5.7.3.1 -n "CN=novellsubmit.bug" -p12
novelsubmit.p12 allowme
Client cert:
makecert -eku 1.3.6.1.5.5.7.3.2 -n "CN=novellsubmitclient.bug" -p12
novellsubmitclient.p12 allowme

Please also look at following thread for more details:
http://www.mail-archive.com/mono-list@lists.ximian.com/msg34415.html

Setup details:
Client and server both are on the same virtual machine
Ubuntu Linux 11.4 + Mono 2.6
 (latest stable release)

Reproducible: Always

Steps to Reproduce:
1. Run the attached TcpServer.exe code with [sudo mono TcpServer.exe]
2. Run the attached NetClient.exe code with [sudo mono NetClient.exe]
3. See if any exception was printed at client or a greeting message from
server?
Actual Results:  
Exception happens at client on call to AuthenticateAsClient

Expected Results:  
It should have printed the greeting message from the server.
And after that, server should receive and print a message from client.
(Greeting message is required by the design of the system. Server must send a
greeting to every connecting client)
(Rest is for simplicity. In reality, we exchange command requests and its
result responses in XML format)

If you expect any changes in code, please let me know. I will be happy to make
requested changes for repro.

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list