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.
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!
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.
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
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.
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: CallbackFilter
A component to monitor and control disk activity, track file and directory operations (create, read, write, rename etc.), alter file data, encrypt files, create virtual files.



Topic viewed 824 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!