Watch, Follow, &
Connect with Us

Please visit our new home
community.embarcadero.com.


Welcome, Guest
Guest Settings
Help

Thread: OpenSSL and Android 6



Permlink Replies: 41 - Last Post: Mar 29, 2018 10:55 PM Last Post By: Maria Fox
Thomas Horstmann

Posts: 4
Registered: 10/14/03
OpenSSL and Android 6
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 8, 2015 2:21 PM
I am using Indy with OpenSLL (Win, Mac, iOS and Android). It seems that Google has replaced OpenSSL with BoringSSL in Android 6. So SSL is no longer working (Message: Unable to load SSL.). Is there a way to uses OpenSSL with Android 6.

For iOS I placed "libcrypto.a" and "libssl.a" in the project folder. It works fine. Are libraries/files available for Android?
Eli M

Posts: 1,346
Registered: 11/9/13
Re: OpenSSL and Android 6
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 9, 2015 9:10 PM   in response to: Thomas Horstmann in response to: Thomas Horstmann
So far I only found this (where you have to compile it yourself):
https://wiki.openssl.org/index.php/Android
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: OpenSSL and Android 6
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 19, 2015 7:57 PM   in response to: Thomas Horstmann in response to: Thomas Horstmann
Thomas wrote:

I am using Indy with OpenSLL (Win, Mac, iOS and Android). It seems
that Google has replaced OpenSSL with BoringSSL in Android 6.

For the record, here is what Google says about it:

http://developer.android.com/about/versions/marshmallow/android-6.0-changes.html#boringSSL

Android is moving away from OpenSSL to the BoringSSL library. If you’re using
the Android NDK in your app [which Delphi does], don't link against cryptographic
libraries that are not a part of the NDK API, such as libcrypto.so and libssl.so
[which Indy does]. These libraries are not public APIs, and may change or
break without notice across releases and devices. In addition, you may expose
yourself to security vulnerabilities. Instead, modify your native code to
call the Java cryptography APIs via JNI or to statically link against a cryptography
library of your choice.

Considering that BoringSSL is just a fork of OpenSSL to make it "a much lighter-weight
version of OpenSSL that strips out many of the application programing interfaces
(APIs) and application binary interfaces (ABIs) found in the latter", and
for Google to apply their own internal patches to without applying them to
OpenSSL, I wonder how much work it would be to make Indy compatible with
BoringSSL. As long as the remaining APIs are the same, maybe it is just
a matter of making Indy look for different library filenames at runtime.
I hope it does not mean having to write a completely new IOHandler for BoringSSL,
that could be a lot of work.

So SSL is no longer working (Message: Unable to load SSL.).

What does Indy's WhichFailedToLoad() function return when that happens?
Is it failing to load the library files themselves? Or is it failing to find
particular SSL functions?

Is there a way to uses OpenSSL with Android 6.

You would have to distribute the OpenSSL binaries (libssl.so and libcrypto.so)
with your Android app and then call the IdOpenSSLSetLibPath() function at
app startup to tell Indy where to find them.

For iOS I placed "libcrypto.a" and "libssl.a" in the project folder.
It works fine.

For iOS, Indy statically links to OpenSSL at compile time, it does not dynamically
load OpenSSL at runtime (due to Apple restrictions at the time, which may
have since been lifted in recent iOS versions, but Indy has not been updated
to support that yet).

Are libraries/files available for Android?

Not from Indy, no. You will have to find third-party .so files, or compile
OpenSSL yourself.

--
Remy Lebeau (TeamB)
Doug Chabun

Posts: 2
Registered: 11/20/09
Re: OpenSSL and Android 6
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 25, 2015 6:31 PM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
I downloaded prebuilt libssl.so and libcrypto.so libraries for Android but got the message from WhichFailedToLoad(): "SSLv2_method,SSLv2_server_method,SSLv2_client_method".

Figuring there might be something wrong with the libraries I extracted both from a Moto-G phone and got the same message from WhichFailedToLoad().

Anything you can think of that I am missing?
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: OpenSSL and Android 6
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 26, 2015 9:51 AM   in response to: Doug Chabun in response to: Doug Chabun
Doug wrote:

I downloaded prebuilt libssl.so and libcrypto.so libraries for Android
but got the message from WhichFailedToLoad():
"SSLv2_method,SSLv2_server_method,SSLv2_client_method".

That was addressed in an update to Indy a few weeks ago:

OpenSSL changes
http://www.indyproject.org/sockets/blogs/changelog/20150907.aspx

Figuring there might be something wrong with the libraries

There is not, actually. Some distributions of OpenSSL have disabled SSLv2
altogether.

Anything you can think of that I am missing?

If you cannot find an OpenSSL distribution that does not disable SSLv2, then
you will have to update your Indy installation to an up-to-date version.

--
Remy Lebeau (TeamB)
Doug Chabun

Posts: 2
Registered: 11/20/09
Re: OpenSSL and Android 6
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 29, 2015 4:31 AM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Thank you!
David Drouin

Posts: 16
Registered: 11/11/11
Re: OpenSSL and Android 6
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 4, 2015 7:44 AM   in response to: Thomas Horstmann in response to: Thomas Horstmann
It doesn't work either with TLS1_2. libssl.so, libcrypto.so aren't present.

I tried to add them to the lib\armeabi via deployement and force IdOpenSSLSetLibPath(). no sucess
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: OpenSSL and Android 6
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 4, 2015 11:17 AM   in response to: David Drouin in response to: David Drouin
David wrote

I tried to add them to the lib\armeabi via deployement and
force IdOpenSSLSetLibPath(). no sucess

Why not? Please be more speciifc.

--
Remy Lebeau (TeamB)
David Drouin

Posts: 16
Registered: 11/11/11
Re: OpenSSL and Android 6
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 4, 2015 1:10 PM   in response to: Thomas Horstmann in response to: Thomas Horstmann
  FSSL := TIdSSLIOHandlerSocketOpenSSL.Create(nil);
  FSSL.SSLOptions.Method := sslvTLSv1_2;
  FSSL.SSLOptions.Mode := sslmClient;
 
  FTCP := TIdTCPClient.Create(nil);
  FTCP.IOHandler := FSSL;
  FTCP.Host := 'google.com';
  FTCP.Port := 443;
 
  FTCP.Connect;


it gives you 'Could not load SSL library' error. only on Android 6.0

i tried to deploy libssl.so and libcrypto.so to library\lib\armeabi\ or library\lib\armeabi-v7a\

still no sucess.

Edited by: David Drouin on Nov 4, 2015 3:15 PM - typos
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: OpenSSL and Android 6 [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 5, 2015 11:26 AM   in response to: David Drouin in response to: David Drouin
David wrote:

it gives you 'Could not load SSL library' error. only on Android 6.0

In Android 6, Google got rid of OpenSSL, replaced with its own fork named
BoringSSL:

https://www.imperialviolet.org/2014/06/20/boringssl.html

Indy has not been updated to support BoringSSL yet. You will have to deploy
the libcrypto.so and libssl.so files with your app, and then call Indy's
IdOpenSSLSetLibPath() function at runtime to tell Indy where the files are
located.

--
Remy Lebeau (TeamB)
David Drouin

Posts: 16
Registered: 11/11/11
Re: OpenSSL and Android 6 [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 5, 2015 12:57 PM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Everything you said is totally right.

Here is a snippet of what I tried a couple days ago and doesnt work.

program NoGoSSL;
 
{$R *.dres}
 
uses
  {$IFDEF ANDROID}
    IdSSLOpenSSL;
  {$endif}
  //.....
 
{$R *.res}
 
begin
  {$IFDEF ANDROID}
    IdOpenSSLSetLibPath('library\lib\armeabi\');
  {$ENDIF}
  //...
  Application.Run;
end.


I also went to the project deployment and add both libcrypto.so and libssl.so to library\lib\armeabi\

I also tried with libcrypto.a and libssl.a with the same path.

I also tried the two stated above with this path -> library\lib\armeabi-v7a\

Any ideas are welcome.
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: OpenSSL and Android 6 [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 5, 2015 1:40 PM   in response to: David Drouin in response to: David Drouin
David wrote:

{$IFDEF ANDROID}
IdSSLOpenSSL;
{$endif}

IdOpenSSLSetLibPath() is declared in the IdSSLOpenSSLHeaders unit.

{$IFDEF ANDROID}
IdOpenSSLSetLibPath('library\lib\armeabi\');
{$ENDIF}

That is not a valid path. 'library\lib\armeabie\' is a special path used
within the Deployment Manager, but that is not the actual path that the files
are deployed to on the Android device. Read the documentation:

Loading and Deploying Files
http://docwiki.embarcadero.com/RADStudio/en/Creating_an_Android_App#Loading_and_Deploying_Files

Deploy the files to 'assets\internal', and then use TPath.GetDocumentsPath()
for the OpenSSL lib path.

--
Remy Lebeau (TeamB)
David Drouin

Posts: 16
Registered: 11/11/11
Re: OpenSSL and Android 6 [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 6, 2015 6:36 AM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Thanks again.

I did all that.

used Es File Explorer to check if the files exists : Yes.

used code inside the app to check if the exists : Yes

modified line 19400 from IdSSLOpenSSLHeaders unit to add 1.0.2 // not sure if that helps or not.
SSLDLLVers : array [0..8] of string = ('','.10','1.0.2','.1.0.1','.1.0.0','0.9.9','.0.9.8','.0.9.7','0.9.6');


Still getting the same error. 'Could not load SSL library'
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: OpenSSL and Android 6 [Edit] [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 9, 2015 2:40 PM   in response to: David Drouin in response to: David Drouin
David wrote:

Still getting the same error. 'Could not load SSL library'

But that does not tell me anything useful. As I stated in my very first
reply in this discussion, please call Indy's WhichFailedToLoad() function
to find out WHAT exactly is not loading. Is it the actual dylib files themselves
that are not loading (ie, did Google rename them?), or are there particular
functions that Indy is looking for that Google is no longer exporting?

--
Remy Lebeau (TeamB)
David Drouin

Posts: 16
Registered: 11/11/11
Re: OpenSSL and Android 6 [Edit] [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 10, 2015 6:49 AM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
WhichFailedToLoad() gives me "Failed to load /data/user/0/myapp/files/libcrypto."

Here are the 4 files related to openssl in /data/user/0/myapp/files/

libcrypto.a
libcrypto.so
libssl.a
libssl.so

did Google rename them, no.

under /system/lib/ you can find

libcrypto.so
libssl.so

WhichFailedToLoad() gives me the following when i don't set IdOpenSSLSetLibPath()

https://imgur.com/Ejm5nfS
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: OpenSSL and Android 6 [Edit] [Edit] [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 10, 2015 10:37 AM   in response to: David Drouin in response to: David Drouin
David wrote:

WhichFailedToLoad() gives me "Failed to load
/data/user/0/myapp/files/libcrypto."

Here are the 4 files related to openssl in /data/user/0/myapp/files/

libcrypto.a
libcrypto.so
libssl.a
libssl.so

The .a files are only used for static linking, so do not deploy them. Only
the .so files are needed for dynamic loading.

under /system/lib/ you can find

libcrypto.so
libssl.so

WhichFailedToLoad() gives me the following when i don't set
IdOpenSSLSetLibPath()

https://imgur.com/Ejm5nfS

Thanks. The latest Indy SVN trunk already accounts for the SSLv2 functions,
but the others will have to be taking into account now.

--
Remy Lebeau (TeamB)
David Drouin

Posts: 16
Registered: 11/11/11
Re: OpenSSL and Android 6 [Edit] [Edit] [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 11, 2015 5:13 AM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
I just tried TscSSLClient from SecureBridge( it doesnt rely on indy)

it works fine. only problem is that i will need to rewrite the whole unit that uses indy stuff.
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: OpenSSL and Android 6 [Edit] [Edit] [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 11, 2015 10:14 AM   in response to: David Drouin in response to: David Drouin
David wrote:

only problem is that i will need to rewrite the whole unit that uses indy
stuff.

I have already started working on addressing the errors when loading BoringSSL's
missing functions, but it will probably take me some time to finish that
update since they are functions that Indy actually uses so I have to work
around them.

--
Remy Lebeau (TeamB)
Dave Nottage

Posts: 1,850
Registered: 1/7/00
Re: OpenSSL and Android 6
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 11, 2016 7:09 PM   in response to: David Drouin in response to: David Drouin
i tried to deploy libssl.so and libcrypto.so to library\lib\armeabi\ or library\lib\armeabi-v7a\

Where are you obtaining the .so files from, or are you compiling them yourself? I'm having the same issue with SSL on Android 6.

I know how to deploy; possibly just have the wrong binaries.

--
Dave Nottage [TeamB]
Delphi Worlds blog: http://delphi.radsoft.com.au/blog
Dave Nottage

Posts: 1,850
Registered: 1/7/00
Re: OpenSSL and Android 6
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 11, 2016 7:51 PM   in response to: Dave Nottage in response to: Dave Nottage
Where are you obtaining the .so files from, or are you compiling them yourself?

Never mind.. I managed to work out the File Explorer in Android Studio and obtained them from /system/lib. That said, it looks like I need to wait for an Indy update as well

--
Dave Nottage [TeamB]
Delphi Worlds blog: http://delphi.radsoft.com.au/blog
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: OpenSSL and Android 6
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 11, 2016 8:10 PM   in response to: Dave Nottage in response to: Dave Nottage
Dave wrote:

Never mind.. I managed to work out the File Explorer in Android Studio
and obtained them from /system/lib. That said, it looks like I need to
wait for an Indy update as well

As long as you deploy standard OpenSSL .so files, I think Indy would work,
if you tell it to load your deployed .so files and not the system naative
.so files. If that is not working, then I need to know what is still failing.

--
Remy Lebeau (TeamB)
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: OpenSSL and Android 6
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 11, 2016 7:54 PM   in response to: Dave Nottage in response to: Dave Nottage
Dave wrote:

Where are you obtaining the .so files from, or are you compiling
them yourself? I'm having the same issue with SSL on Android 6.

I know how to deploy; possibly just have the wrong binaries.

In Android 6, Google switched its native OpenSSL libraries to BoringSSL instead,
which is an OpenSSL fork created by Google:

https://boringssl.googlesource.com/boringssl/
https://www.imperialviolet.org/2015/10/17/boringssl.html

If you deploy the standard OpenSSL binaries with your app, you will likely
have to call Indy's IdOpenSSLSetLibPath() function to tell Indy exactly where
your binaries are located, so it does not (hopefully) load the new BoringSSL
libraries instead.

I checked in some new code last night to help Indy deal with some of the
OpenSSL functions that are missing in BoringSSL, but I have not done any
testing yet, and I'm sure there are lots of other things that need to be
dealt with in order to make Indy compatible with BoringSSL.

--
Remy Lebeau (TeamB)
Mida Converter

Posts: 77
Registered: 6/2/12
Re: OpenSSL and Android 6
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 10, 2016 3:47 AM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
I'm tring with Delphi Berlin and DataSnap TCP with SSL on Android 6.01 device. i can't work fine ( Samsung S6 edge )

my code:
IdOpenSSLSetLibPath('assets/internal/');

in deployment option:
libssl.so and libcrypto.so to remote_path = assets\internal\

i have tried rename libssl.so and libcrypto.so to mylibssl.so and mylibcrypto.so and update IdSSLOpenSSLHeaders source file but i can't work :(

Any hint ?

Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: OpenSSL and Android 6
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 10, 2016 11:35 AM   in response to: Mida Converter in response to: Mida Converter
Mida wrote:

I'm tring with Delphi Berlin and DataSnap TCP with SSL on Android 6.01
device. i can't work fine ( Samsung S6 edge )

Unfortunately, Indy's support for SSL/TLS is broken on Android 6 due to Google's
change from OpenSSL to BoringSSL. See my reply in the "OpenSSL latest android
binaries" discussion in the Delphi Android forum for more details.

https://forums.embarcadero.com/thread.jspa?threadID=211089

my code:
IdOpenSSLSetLibPath('assets/internal/');
in deployment option:

Unfortunately, that will not have any effect on Android 6.

i have tried rename libssl.so and libcrypto.so to mylibssl.so and
mylibcrypto.so and update IdSSLOpenSSLHeaders source file
but i can't work :(

That will not work either, due to internal linkages between the files. It
is not enough to simply rename the files if you don't also recompile them
to rename their links to each other.

--
Remy Lebeau (TeamB)
Mida Converter

Posts: 77
Registered: 6/2/12
Re: OpenSSL and Android 6
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 11, 2016 1:30 AM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
update:

i have change my code to:
IdOpenSSLSetLibPath(System.IOUtils.TPath.GetDocumentsPath);

in deployment option:
libssl.so and libcrypto.so to remote_path = assets\internal

Download SSL files ( OpenSSL 1.0.2g Android.zip )
http://www.delphipraxis.net/188736-kompilierte-openssl-bibliotheken-fuer-android.html

compiled.. and work fine on my Samsung S6 Edge 6.0.1 :-)

i have uploaded and published on Google play store, APK Correct , no Google warning. all ok.

i have downloaded from others smartphone ( android 6.0 ) my app from store and work fine.

Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: OpenSSL and Android 6
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 11, 2016 11:32 AM   in response to: Mida Converter in response to: Mida Converter
Mida wrote:


You have to be a registered user of that forum in order to download those
files.

--
Remy Lebeau (TeamB)
Markus Humm

Posts: 5,113
Registered: 11/9/03
Re: OpenSSL and Android 6
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 11, 2016 11:52 AM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Am 11.05.2016 um 20:32 schrieb Remy Lebeau (TeamB):
Mida wrote:


You have to be a registered user of that forum in order to download those
files.

And where's the problem with registering?
It's free, it might be just German language on the registration screen.
If you need help with that ask and we'll find a way ;-)

Greetings

Markus
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: OpenSSL and Android 6
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 11, 2016 12:15 PM   in response to: Markus Humm in response to: Markus Humm
Markus wrote:

And where's the problem with registering?
It's free, it might be just German language on the
registration screen.
If you need help with that ask and we'll find a way ;-)

Feel free to register if you want ;)

Or maybe Mida would be nice enough to post the files in the Attachments forum
of this server.

--
Remy Lebeau (TeamB)
Marco Cirinei

Posts: 26
Registered: 12/28/99
Re: OpenSSL and Android 6
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 12, 2016 12:24 AM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
{quote:title=Remy Lebeau (TeamB) wrote:}

Or maybe Mida would be nice enough to post the files in the Attachments forum
of this server.

--
Remy Lebeau (TeamB)

I just did it.
https://forums.embarcadero.com/thread.jspa?messageID=824565&#824565
Marco

Edited by: Marco Cirinei on May 12, 2016 9:24 AM
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: OpenSSL and Android 6 [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 12, 2016 11:04 AM   in response to: Marco Cirinei in response to: Marco Cirinei
Marco wrote:


Can you post the iOS simulator files as well? Thanks.

--
Remy Lebeau (TeamB)
Markus Humm

Posts: 5,113
Registered: 11/9/03
Re: OpenSSL and Android 6 [Edit]
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 13, 2016 10:47 AM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Am 12.05.2016 um 20:04 schrieb Remy Lebeau (TeamB):
Marco wrote:


Can you post the iOS simulator files as well? Thanks.

Did you already make anything out of the Android files yet?

Greetings

Markus
Marti Sergio

Posts: 1
Registered: 3/1/16
Re: OpenSSL and Android 6
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 28, 2017 10:08 AM   in response to: Mida Converter in response to: Mida Converter
I read all the forums and I've done everything there was to do but not sonoriuscito to make the app work.
Use delphi XE7. what am I doing wrong?
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: OpenSSL and Android 6
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 30, 2017 11:33 AM   in response to: Marti Sergio in response to: Marti Sergio
Marti Sergio wrote:
I read all the forums and I've done everything there was to do but not sonoriuscito
to make the app work.
Use delphi XE7. what am I doing wrong?

Hard to say without knowing what you have actually read and tried so far.

--
Remy Lebeau (TeamB)
David Drouin

Posts: 16
Registered: 11/11/11
Re: OpenSSL and Android 6
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 11, 2015 10:32 AM   in response to: Thomas Horstmann in response to: Thomas Horstmann
Oh, i didn't realise you work on Indy.

if you need me to test anything, just let me know.
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: OpenSSL and Android 6
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 11, 2015 10:51 AM   in response to: David Drouin in response to: David Drouin
David wrote:

Oh, i didn't realise you work on Indy.

I am the primary developer of Indy.

--
Remy Lebeau (TeamB)
Chris Dunn

Posts: 160
Registered: 8/22/11
Re: OpenSSL and Android 6
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 17, 2015 7:27 AM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Should we watch this thread for updates?

thanks,
Chris
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: OpenSSL and Android 6
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 17, 2015 9:20 AM   in response to: Chris Dunn in response to: Chris Dunn
Chris wrote:

Should we watch this thread for updates?

When an update is made (still in progress), an announcement will be more
appropriately posted in the 3rd Party forum instead. As well as on Indy's
own forum server (http://forums2.atozed.com) and Indy's changelog blog (http://www.indyproject.org/Sockets/Blogs/ChangeLog/).

--
Remy Lebeau (TeamB)
Andreas Wegener

Posts: 25
Registered: 12/6/12
Re: OpenSSL and Android 6
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 10, 2017 2:44 AM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
This threat is old but i had the same issue today.
Many thanks to all for this post, it made my day :-)
I had to download an image via https using idhttp im my c++ Android app.

Steps to solve:
1. Place IDHttp component
2. Place IdSSLIOHandlerSocketOpenSSL and assign IDHTTP component to this io handler
3. In header add #include <IdSSLOpenSSLHeaders_Static.hpp>
4. Download latest libs like said before from https://forums.embarcadero.com/thread.jspa?messageID=824565󉓵
5. Add these libs to deploment at remote path “assets/internal”
6. Set IdOpenSSLSetLibPath before idhttp usage

Now you can make a HTTP get via ssl like this
TMemoryStream * lStream= new TMemoryStream();
#if defined (__WIN32__)
#elif defined (_WIN64)
#elif defined (MACOS)
#elif defined (__ANDROID__)
IdOpenSSLSetLibPath(IncludeTrailingPathDelimiter(System::Ioutils::TPath::GetDocumentsPath()));
#elif defined (__APPLE__)
#endif
 
 
	mIdHTTP->Disconnect();
	UnicodeString URL="https://xxxx/SSLCheck/isapi.dll/GetImage" ;
	mIdHTTP->Get(URL,lStream);
	lStream->Position=0;
	Image1->Bitmap->LoadFromStream(lStream);
}


Thanks again :-)

Remy Lebeau (TeamB) wrote:
Chris wrote:

Should we watch this thread for updates?

When an update is made (still in progress), an announcement will be more
appropriately posted in the 3rd Party forum instead. As well as on Indy's
own forum server (http://forums2.atozed.com) and Indy's changelog blog (http://www.indyproject.org/Sockets/Blogs/ChangeLog/).

--
Remy Lebeau (TeamB)
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: OpenSSL and Android 6
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 10, 2017 11:48 AM   in response to: Andreas Wegener in response to: Andreas Wegener
Andreas wrote:

3. In header add #include <IdSSLOpenSSLHeaders_Static.hpp>

That only applies to iOS, not to Android.

4. Download latest libs like said before from
https://forums.embarcadero.com/thread.jspa?messageID=824565

The latest OpenSSL libs for Indy are available at https://indy.fulgan.com/SSL/

--
Remy Lebeau (TeamB)
Andreas Wegener

Posts: 25
Registered: 12/6/12
Re: OpenSSL and Android 6
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 10, 2017 11:53 AM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Thanks for the update Remy.

Remy Lebeau (TeamB) wrote:
Andreas wrote:

3. In header add #include <IdSSLOpenSSLHeaders_Static.hpp>

That only applies to iOS, not to Android.

4. Download latest libs like said before from
https://forums.embarcadero.com/thread.jspa?messageID=824565

The latest OpenSSL libs for Indy are available at https://indy.fulgan.com/SSL/

--
Remy Lebeau (TeamB)
Hareesh Reddy

Posts: 1
Registered: 1/30/18
Re: OpenSSL and Android 6
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 30, 2017 2:38 AM   in response to: Remy Lebeau (Te... in response to: Remy Lebeau (Te...
Remy Lebeau (TeamB) wrote:
Andreas wrote:

3. In header add #include <IdSSLOpenSSLHeaders_Static.hpp>

That only applies to iOS, not to Android .

4. Download latest libs like said before from
https://forums.embarcadero.com/thread.jspa?messageID=824565

The latest OpenSSL libs for Indy are available at https://indy.fulgan.com/SSL/

--
Remy Lebeau (TeamB)

Thank you so much Remy for all the prompt replies. I'm all clear now :)

https://dltutuapp.com/apk/ https://tutuappx.com/download-tutu-helper-app/

Edited by: Hareesh Reddy on Jan 1, 2018 1:58 AM
Maria Fox

Posts: 1
Registered: 4/29/18
Re: OpenSSL and Android 6
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 29, 2018 10:53 PM   in response to: Hareesh Reddy in response to: Hareesh Reddy
Remy, Thank-you so much for this solution, i had an same issue & i did follow your steps & its solved, as an app developer, i often face these issues during my work.

Edited by: Maria Fox on Mar 29, 2018 10:54 PM

Edited by: Maria Fox on Mar 29, 2018 10:55 PM
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02