1

I'm getting errors like:

"IndyProtocols5 does not use or support IdSSLOpenSSLHeaders.."

when attempting to install Indy 9 or 10 with my Delphi5 and notice it is a problem for others. This causes the exception:

"Could not load SSL library"

when using IdHttp.IOHandler.

The applications I have inherited include so many unsupported D5 components, upgrading to D6+ is unfortunately beyond my skillset. I want to initially use Indy for posting and downloading CSV, but potentially calling web services too.

Is there a known workaround for this or should I start looking in to other options like ICS which may still work with D5.

Thanks

TZHX
  • 5,291
  • 15
  • 47
  • 56
notidaho
  • 588
  • 8
  • 28
  • You don't need any skills to upgrade from D5 to D2007. Upgrading to D2009 and later would require upgrading your code to Unicode, though. – Eugene Mayevski 'Callback Oct 26 '11 at 11:59
  • Which Indy version are you using (current is 10.5.8)? – mjn Oct 26 '11 at 13:26
  • @mjn I can't get the latest Indy10 snapshot 10_4690 to install because of the above IndyProtocols5 error when I run FullD5.bat. With Indy9.0.17 I can install it OK and can compile the objects but get the "Could not load SSL library" when I run. – notidaho Oct 26 '11 at 13:42

2 Answers2

0

All versions of Indy SSL support require the OpenSSL libraries libeay32.dll and ssleay32.dll. (http://www.indyproject.org/Sockets/SSL.EN.aspx)

The older versions of Indy required custom built SSL libraries. The older ones should work here: http://indy.fulgan.com/SSL/Archive/

Darian Miller
  • 7,808
  • 3
  • 43
  • 62
  • I've tried copying the most recent .dlls from this archive in to my application directory but it has no affect. I then used the .dlls labelled indy_openssl096b from ZIP/SSL.zip and my error changes to "Error Connecting with SSL". This post http://stackoverflow.com/questions/1874677/indy-10-1-5-which-ssl-dlls-work seems to suggest I need to change SSLOptions.Method but I don't understand his solution – notidaho Oct 26 '11 at 14:13
  • @notidaho, the post from your comment means that if you get `Could not load SSL library`, you have incompatible version of `OpenSSL` library and if you're getting the `Error Connecting with SSL` then you are trying to connect to the host using wrong version of SSL protocol, and that this can be set by property `SSLOptions.Method`. – TLama Oct 26 '11 at 14:49
  • @TLama Yes I copied his solution for SSLOptions.Method := sslvSSLv23 and it seems stop the error. Can anyone tell me the significance of v23? Now I need to actually d/l the csv as per my original post: http://stackoverflow.com/questions/7895790/download-csv-in-delphi-5-with-indy thanks – notidaho Oct 26 '11 at 15:01
  • @notidaho, it depends what [version](http://en.wikipedia.org/wiki/Secure_Sockets_Layer#History_and_development) of SSL the target host you're connecting to supports. You might check that e.g. [this](http://www.ehow.com/how_5953595_determine-ssl-protocol-version.html) way. By setting the `SSLOptions.Method` to `sslvSSLv23` you're telling Indy to negotiate version of SSL that uses the other side (if you set it to something else than the other side has to support the chosen SSL protocol). – TLama Oct 26 '11 at 15:46
  • That's very useful thanks @TLama This version is not likely to change but is it possible to get the version number with Indy? The site says V3 but how does this translate to V23 above? – notidaho Oct 26 '11 at 15:47
  • @notidaho, this is done by sending so named `hello` messages using different protocol versions. If the other side understands this message then this protocol version is set for further communication. For this is used [SSL_CTX_new](http://www.openssl.org/docs/ssl/SSL_CTX_new.html) function from OpenSSL library. – TLama Oct 26 '11 at 16:04
  • @notidaho: SSLv23 is a wildcard that dynamically negotiates a particular SSL/TLS protocol version based on each party's capabilities. It is not a specific protocol version by itself. It existed before TLSv1 was created, back when only SSLv2 and SSLv3 existed, so for backwards compatibility it is still named SSLv23, though it supports negotiating TLSv1 when available. – Remy Lebeau Oct 26 '11 at 22:46
0

I copied his solution for SSLOptions.Method := sslvSSLv23 from INDY 10.1.5 - Which SSL dlls work with Delphi 2006? and it stops the error. This is with the latest Indy9 version.

I do not know the significance of sslvSSLv23 and still don't know why Indy10 doesn't install but I'll see how I get on with Indy9.

Community
  • 1
  • 1
notidaho
  • 588
  • 8
  • 28