Delphi uses OpenSSL for Indy's HTTP support, but also for Amazon and Azure cloud services. it is also used for DataSnap clients when encryption filters are enabled. Here are some tips on how to get this library up and running.

To enable Indy's OpenSSL support in your Delphi code, all you need to do is add the unit IdSSLOpenSSLHeaders_Static in one of the uses statements of your project. In fact, as you probably know, on iOS you cannot use dynamic libraries but have to link external compiled libraries (.a files) to your executable. The unit above has the code needed to bring in the proper library files, libcrypto.a and libssl.a.

Now the problem becomes, where do you find it? We would have been more than happy to ship a version of the library with Delphi but given it is a general purpose encryption library there are restrictions to ship it due to US export laws. One option is to build these libraries from the sources. You can find OpenSSL for iOS at . You can compile the libraries following the detailed steps and using the compilation script at . Once you have done that, you need to copy the two .a files indicated above in a folder visible by the project (the main project source folder could certainly be an option).

This covers the device, but not the simulator, which can use dynamic libraries. For the simulator you can use IdOpenSSLSetLibPath and set the path to a location on the Mac where the .dylib files are located. Notice that if you let the Mac just find the OpenSLL libraries, this generally works for an OS X application, but might not run for one running in the simulator. In fact, you might have a different / wrong version of the dylibs in the library folders the simulator uses. You can also grab the right dylib files, copy from the Mac to your project source folders, and deploy them to the simulator along with the application, using Delphi's deployment support. Remember, though, that you cannot add these dylibs to the device deployment.

Thanks to three Steve/Stephen of Embarcadero (Blas, Ball, Axtell) for the information in this post.