Delphi 11 10 XE8 XE7 XE Seattle Berlin Tokyo Rio Firemonkey, Delphi Android, Delphi IOS

Secure Connections With SSL In Delphi XE5 Firemonkey On IOS, Windows, OSX, And Android

| Delphi 11 10 XE8 XE7 XE Seattle Berlin Tokyo Rio Firemonkey Delphi Android Delphi IOS

HTTPS And SSL With Delphi Firemonkey | Delphi 11 10 XE8 XE7 XE Seattle Berlin Tokyo Rio Firemonkey Delphi Android Delphi IOSThere are a lot of web based APIs like Facebook where you will need to use SSL to connect and access them. Olaf Monien has a blog post that covers each Delphi Firemonkey platform and how to get SSL working on each of them. Each platform in Delphi Firemonkey has a slightly different way of accessing the OpenSSL libraries which Indy 10 (the TCP/UDP library in XE5) uses. For IOS you will need to download and place in your build directory the static libraries libcrypto.a and libssl.a. For Windows you will need to include libeay32.dll and ssleay32.dll with your application that you distribute. On Windows the section option is for the user to install OpenSSL separately. An install wizard for OpenSSL on Windows can be downloaded from openssl.org. Olaf provides links to the static version of the OpenSSL library which you’ll need for IOS. He has some sample code which goes in your project file that handles the includes cross platform:

{$IF Defined(IOS) and Defined(CPUARM)}
  IdSSLOpenSSLHeaders_Static,
{$ELSE}
  IdSSLOpenSSLHeaders,
{$ENDIF}
  FMX.Forms,
  Unit5 in 'Unit5.pas' {Form5};
{$R *.res}
begin
{$IF Defined(IOS) and not Defined(CPUARM)}
  IdOpenSSLSetLibPath('/usr/lib/');
{$ENDIF}


Update: I think for Android SSL just works. No special configuration required.

Head over and read the full blog post on how to get SSL working.

Exit mobile version