EldoS | Feel safer!

Software components for data protection, secure storage and transfer

TElSimpleSSLClient Connect to non-ssl

Also by EldoS: CallbackDisk
Create virtual disks backed by memory or custom location, expose disk images as disks and more.
#17811
Posted: 10/11/2011 11:07:28
by matt garrett (Basic support level)
Joined: 10/11/2011
Posts: 7

My title is a bit misleading, what I would ideally like to be able to do, is use the same code base for connecting to both ssl and non-ssl sockets. When I try to connect to a non-ssl socket using the TElSimpleSSLClient class, I see the connection on my server side module, but then I get an error code 75777, ERROR_SSL_UNEXPECTED_MESSAGE... which makes sense if it's expecting an ssl certificate. Is there anyway to get around this? I tried playing with the .Versions property, but nothing I'm trying seems to get around this. I am fine having to change some flags around for non-ssl vs. ssl, but hoping I can avoid having to maintain two wrappers around an ssl-socket type class and a non-ssl socket type class. Thanks in advance!
#17812
Posted: 10/11/2011 11:17:00
by Vsevolod Ievgiienko (EldoS Corp.)

Thank you for contacting us.

You should use TElSimpleSSLClient.Enabled to enable/disable SSL. If you want a kind of "SSL detection" you can enable/disable SSL using this property and try to connect again depending of error code you receive on the first try.
#17813
Posted: 10/11/2011 11:18:59
by Eugene Mayevski (EldoS Corp.)

Just to add: there's no reliable way for the server to distinguish SSL from non-SSL connection. It's not just "waiting for certificate" - SSL is a complex packet-based protocol.


Sincerely yours
Eugene Mayevski
#17814
Posted: 10/11/2011 11:20:47
by matt garrett (Basic support level)
Joined: 10/11/2011
Posts: 7

Ah, I saw that, but thought it was more of a get property from the underlying stuff, guess I should have tried first. Anyways, that worked. Thanks for your quick reply.
#17815
Posted: 10/11/2011 11:22:16
by matt garrett (Basic support level)
Joined: 10/11/2011
Posts: 7

Yeah, I'm fine making it confiurable and/or flipping the flag if I get an exception when I call the Open() method. Thanks again for your quick response!
Also by EldoS: Callback File System
Create virtual file systems and disks, expose and manage remote data as if they were files on the local disk.

Reply

Statistics

Topic viewed 826 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!