| Dart Home | PowerTCP Sockets for .NET | Custom Development | Reply | PowerTCP Sockets for .NET (Secure and Standard) Topics | Forums |
| Author | Forum: PowerTCP Sockets for .NET (Secure and Standard) Topic: object closed down in the middle of SSL handshake |
| User133 From: oakbrook, IL USA Posts: 17 Member Since: 04/08/02 |
posted October 3, 2003 9:06 AM Get this error when trying to get certificate store. App is a web application. My guess is that is has something to do with permissions and accessing the certificates on the server. Any suggestions??? |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted October 3, 2003 9:33 AM I want to send you the latest version of the DLL's to try, but I can't find you anywhere in our system. Please email sales@dart.com and provide your contact info including name, telephone, serial number. Make sure the subject of the message is "Contact info re: topic 3526" |
| paola From: Desio, MI Italy Posts: 6 Member Since: 11/26/03 |
posted November 26, 2003 10:22 AM I've the same problem. How have you solved the problem? I wrote the code with trial version and the program correctly run. The problem started when I've installed the latest version with the serial number. Thanks Paola |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted November 26, 2003 10:37 AM The current version is 1.0.6 and was released a couple weeks ago. I don't have anything newer. If you have 1.0.6 and are having a problem, please explain the exact steps I need to take to duplicate it. |
| paola From: Desio, MI Italy Posts: 6 Member Since: 11/26/03 |
posted November 27, 2003 8:31 AM Hi i've looked the day of the 2 your releases i have. one is of the 9 april, and the other is of the 13 november. whith the first version i set the useAuthentication properties of the secureStream and i can connect with the tcp to the remote server without problems. with the second version i can't connect because i receive this error: -Connection terminated by server during SSL handshake.- When UseAutentication is false and a suggestion to set UseAuthentication false when is true. What can i do? |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted November 30, 2003 4:05 PM There should have been a Readme that opened up at the end of the install. In there it explained that we have added a SecureProtocol property which is none by default. Also, if you look at the samples, you'll see where we implement it. |
| lluciani From: Houston, TX USA Posts: 3 Member Since: 01/06/04 |
posted January 6, 2004 6:44 PM I have the same problem. With the previous version it worked fine - with 1.0.6 I get the "Connection terminated by server during SSL handshake" exception. I have tried setting SslStream.Protocol to all possible settings. I have Ssl.Authentication set to false. I have also tried setting Tcp.UseAuthentication and Tcp.SecureProtocol. To simplify things I tried to get the sample code under "Creating an SSL Client" to work and have had no success. Any help would be greatly appreciated. Thanks. |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted January 6, 2004 7:05 PM Does the sample TCP client work? If not, please provide the address of a machine that causes the error so that I can try it here. |
| lluciani From: Houston, TX USA Posts: 3 Member Since: 01/06/04 |
posted January 6, 2004 7:24 PM After my post I tried setting all of the relevant event handlers to get a better idea of what is going on and found that if SslStream.EndAuthentication has a handler assigned to it, it connects without the exception. This is irregardless as to whether UseAuthentication is set to true or false. |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted January 6, 2004 7:27 PM Can you confirm this with the sample TCP Client? If so, again, please give me an address to connect to. |
| lluciani From: Houston, TX USA Posts: 3 Member Since: 01/06/04 |
posted January 6, 2004 7:53 PM The sample TCP Client has a similar problem. The exception is the same but SslStream doesn't have anything to do with it this time since it isn't used. The inner exception message is "Index was outside the bounds of the array". The StackTrace is Dart.PowerTCP.SslSockets.SslStream.VerifySecured() at Dart.PowerTCP.SslSockets.Tcp.a(String A_0, Int32 A_1, String A_2, Int32 A_3, Int32 A_4) The inner exception stack trace is Dart.PowerTCP.SslSockets.SslStream.a(Byte[] A_0, UInt32 A_1)\r\n at Dart.PowerTCP.SslSockets.SslStream.a(Byte[] A_0, Int32 A_1)\r\n at Dart.PowerTCP.SslSockets.SslStream.g()\r\n at Dart.PowerTCP.SslSockets.SslStream.VerifySecured() My server is behind a corporate firewall. I'll see if I can set it up somewhere else where you can get to it. |
| User133 From: oakbrook, IL USA Posts: 17 Member Since: 04/08/02 |
posted January 7, 2004 8:01 AM You will also want to verify your interfaces. There are changes with 1.0.6 When we upgraded to this version there were many coding changes that were required. You can not just drop in the new Dart assembly and be on your way. |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted January 7, 2004 9:29 AM That's good advice. I don't even see an SslStream.EndAuthenticate method in the sample. It sounds like he is using an old sample. I just tested by removing the CertificateReceived event and setting UseAuthentication to false and I was able to connect to a server that uses a cert with an invalid date with no problem. |
| paola From: Desio, MI Italy Posts: 6 Member Since: 11/26/03 |
posted January 30, 2004 6:32 AM In November you wrote me to look your samples to solve my problems but if I use your client sample to connect to my server (with SSL3)the usually error "Connection terminating by server during SSL handshake" appeare. If I use the previous version, the connection is ok but when my clien try to reach a pdf page or a zip page compare the error "Object close in the middle of SSL handshake." How can I solve this problem? Can I reach the page from the point error? So where I can find same right samples? Finally, what is the meaning of the errore above? Thanks |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted January 30, 2004 9:02 AM The error means that there was a failure during the establishment of the secure part of the connection. What happens if you try using Auto or SSL2 intead of SSL3? |
| paola From: Desio, MI Italy Posts: 6 Member Since: 11/26/03 |
posted January 30, 2004 10:54 AM If I use Ssl2 it doesn't connect instead if I use Auto it return the follow error: "An unhandled exception of type 'System.InvalidOperationException' occurred in dart.powertcp.sslsockets.dll Additional information: Connection terminated by server during SSL handshake." Today I try to see what happen with my application and it's very strange: I made a wrapper between a web server using Https protocol and a browser using http protocol, if browser request are Html pages and image I haven't problem instead I can't receive pdf and zip pages. SSL socket return me this error: "Object close in the middle of SSL handshake" I try to explain you what I do: Ricevuta=new Byte[start+copiatiHeader]; //copio l'header su ricevuta Array.Copy(Header,0,Ricevuta,0,copiatiHeader); copiatiBody=0; count=start; //finkč non raggiungo la content length ricevo while (copiatiBody<start) { byte[] temp= new Byte[1024]; int appenaricevuti= ssTelemaco.Stream.Read(temp,0,1024); Array.Copy(temp,0,Ricevuta,copiatiBody+copiatiHeader,appenaricevuti); copiatiBody+=appenaricevuti; pag = ASCIIEncoding.ASCII.GetString(Ricevuta); } It seems correct and like your samples, so what could be the problem? Thanks Paola |
| paola From: Desio, MI Italy Posts: 6 Member Since: 11/26/03 |
posted January 30, 2004 10:59 AM I have another question: SSLSocket.Available return the available bytes but SSL certificate is counted or it return only the header size + page size? |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted January 30, 2004 11:04 AM There's no relation between file types and SSL negotiation. Are you sure that they aren't on different servers? Are you sure the server is actually secure? If you are getting "Object close in the middle of SSL handshake" error and have tried all the different security settings then we would need access to the server to test it. Please send the info to support@dart.com if needed. |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted January 30, 2004 11:06 AM I don't think that you would have access to the bytes of the certificate. The TCP control won't be "connected" until all that stuff has been read and disposed of. |
| paola From: Desio, MI Italy Posts: 6 Member Since: 11/26/03 |
posted February 2, 2004 12:53 PM I'm sorry but I can't give you the URL of my customer server. But I've found the problem. YOUR SOCKET can't receive 1024 bytes but only 64 or maybe 512 if I introduce a delay of 5 seconds. But the response is very slow. So, is there a method to set socket timeout? I have already wrote (I don't know how spell it) the problem to the support in november and decembre but they didn't gave any help. Paola |
Tony Priest![]() From: Utica, NY USA Posts: 8466 Member Since: 04/11/00 |
posted February 2, 2004 1:20 PM We don't put any limitation on how much you can receive. I'm not sure why you are having a problem, but since no one else is reporting trouble, it must be something specific to your site. Therefore I would not be able to figure out what the problem is without access to the site. If you are worried about posting the info to the forum, just send it to support@dart.com. |
| Reply | PowerTCP Sockets for .NET (Secure and Standard) Topics | Forums |
This site is powered by
PowerTCP WebServer for ActiveX
|