3

I do expect the answer is no but maybe I'm wrong !

Is there any way to use HTTPS connection without use DLL files (libeay32.dll and ssleay32.dll) ???

Or can I embedded them in my application and establish the HTTPS connection without extract them ?

I use indy library in my application Idhttp...

1 Answers1

2

Is there any way to use HTTPS connection without use DLL files (libeay32.dll and ssleay32.dll) ???

You can use any SSL library you want, all you need is a wrapper component that is derived from TIdSSLIOHandlerSocketBase. And then you can assign that component to the TIdHTTP.IOHandler property before accessing an HTTPS url.

Indy provides such a component for OpenSSL (TIdSSLIOHandlerSocketOpenSSL), but Indy is not dependent on OpenSSL specifically. You can write your own component, or use a 3rd party one (like the one provided in Eldos SecureBlackBox).

Even if you use OpenSSL, Indy 10 does have an IdSSLOpenSSLHeaders_static.pas unit for static linking OpenSSL. It is primarily meant for iOS only, but it could be adapted to work on other platforms, if you have suitable OBJs for it.

Or can I embedded them in my application and establish the HTTPS connection without extract them ?

If you use the OpenSSL DLLs, you need to use them as DLLs, which means extracting them first.

Remy Lebeau
  • 555,201
  • 31
  • 458
  • 770
  • OK, I tried to use `TIdSSLIOHandlerSocketBase` and assign it to `TIdHTTP.IOHandler ` but this exception **Abstract Error** is show to me ! – junior.programmer Mar 11 '17 at 19:29
  • @jumior So what? Trying stuff at random usually ends this way. Did you ever have much success coding with a complex system without understanding? Programming is hard. Don't trivialise it. Don't imagine that you can write correct code with no understanding. – David Heffernan Mar 11 '17 at 20:46
  • @junior.programmer you cannot use `TIdSSLIOHandlerSocketBase` **directly** in `TIdHTTP.IOHandler`. It is an abstract base class. Read my answer again more carefully, I said you have to use a component that is **derived from** `TIdSSLIOHandlerSocketBase`. `TIdSSLIOHandlerSocketOpenSSL` is one such component. – Remy Lebeau Mar 11 '17 at 21:23