Indy "Could not load SSL Library" with Delphi 2007/Apache

11,741

Solution 1

For Indy you need a special build of OpenSSL libraries. The default OpenSSL libraries are not suitable for using with Indy.

See also. May be you need to try different versions, until you'll find a suitable one.

Solution 2

That error means that the TIdSSLIOHandlerSocketOpenSSL.PassThrough property is being set to False (which would happen when posting to an HTTPS URL) before TIdSSLIOHandlerSocketOpenSSL.Init() has been called to intialize the SSL context first.

Sounds like a bug. Next time you get the error, can you grab the stack trace?

Share:
11,741
M Schenkel
Author by

M Schenkel

I program predominantly in Delphi.

Updated on June 04, 2022

Comments

  • M Schenkel
    M Schenkel almost 2 years

    I know this question has been asked a number of times. I seem to have a bit of a different problem. In my situation after the exception is thrown initially it works fine (and no; I did not turn off exceptions). So what I have done is on the exception I simply repost:

    IdHTTP1.Post(.......

    I have put the libeay32.dll and ssleay32.dll both in the Apache bin directory and the directory where my ISAPI dll resides.

    Anyone have any suggestions?

  • M Schenkel
    M Schenkel almost 15 years
    Here it is. Sorry, I can't seem to insert carriage returns. :7761b08e kernel32.RaiseException + 0x58 :0113bb57 Call_HookedRaise + $B3 :011f7bed TIdSSLContext.Create + $61 :011f7481 TIdSSLIOHandlerSocketOpenSSL.Init + $1D :011f7270 TIdSSLIOHandlerSocketOpenSSL.ConnectClient + $20 :012076e2 TIdCustomHTTP.CheckAndConnect + $7E :01207b2a TIdCustomHTTP.ConnectToHost + $3BE :01209426 TIdCustomHTTP.DoRequest + $152 :012064d7 TIdCustomHTTP.Post + $9F :01206899 TIdCustomHTTP.Post + $D1 :012069ec TIdCustomHTTP.Post + $6C MyMain.SubmitIt
  • Remy Lebeau
    Remy Lebeau almost 15 years
    That only applies to older versions of Indy. Modern version use the default OpenSSL DLLs as-is now.
  • Remy Lebeau
    Remy Lebeau almost 15 years
    Given that stack trace, there are a couple of possibilities: 1) the OpenSSL DLLs can't be loaded at all (you can use WhichFailedToLoad() to check that); 2) OpenSSL is loaded but the mi_SSLeay_add_ssl_algorithms() function is failing.