views:

1302

answers:

3

I'm trying to connect to google documents (following Marco Cantu's excellent REST example) but I am getting the following SSL errors:

1) If I use the SSL dlls from openssl-0.9.8i-i386-win32.zip I get the error:

"Could not load SSL library"

2) If I use the SSL dlls from indy_OpenSSL096m.zip I get the error:

"Error connecting with SSL"

3) If I use the SSL dlls from openssl-0.9.8h-i386-win32-Indy-IntraWebEdition.zip I get the error:

"Could not load SSl Library"

Now I've researched this and there are a lot of recommendations with dead links to dlls about, including links on stack overflow. I suspect I need to find the SSL dlls that are compatible with the version of INDY I am using.

My question is, does anyone know exactly which SSL dlls are compatible with Delphi 2006 & INDY 10.1.5?

+1  A: 

You could resort to some trial and error using downloads from the Fulgan site.

You might want to think about updating your copy of Indy and using the most recent OpenSSL DLLs.

Bruce McGee
I think you're right, I need to update INDY and use the most recent OpenSSL dlls.
Mattl
I think it will make things simpler.
Bruce McGee
+1  A: 

As far as I am aware the more recent versions of Indy work with standard OpenSSL binaries. Download from here. We produced a Delphi FTP client app a while ago using Indy with SSL connections and I'm sure we just shipped the current OpenSSL dlls.

Edit: Just checked the app directory and the DLLs we used are OpenSSL 0.9.8.2 (3-Aug-06). (It's an old app)

Edit 2: And I've just copied the more recent 0.9.8k dlls over and they work fine too.

shunty
+2  A: 

I had the same problem even after I upgrading to INDY 10.2.3 and I tryed every different version of the “libeay32.dll” and “ssleay32.dll” files I could find ... Like Matt I always got one of the two errors: "Could not load SSL library" or the "Error connecting with SSL" with something like "error:00000006:lib(0):func(0):EVP lib" ...

I was very happy when I change the TidSSLioHandlerSocketOpenSSL.SSLOptions.Method to sslvSSLv23 and everything started working.

A bit more research and I quickly understood anytime I got the error "Could not load SSL library" I was using the wrong version of the DLL files and anytime I got the "Error connecting with SSL" with something like "error:00000006:lib(0):func(0):EVP lib" I was using the wrong SSLOptions.Method value.

Other Info: I'm using Delphi 2006, INDY 10.2.3 and I'm runnin on WinXP Pro

This caused me so much pain, I hope this post will save someone some time.

Dave Clark
Very useful comments, I'm sure these will help others in the same situation. Thanks.
Mattl