#1 2015-10-22 18:04:23

itSDS
Member
From: Germany
Registered: 2014-04-24
Posts: 516

No IndySSL under Android 6

Hi Arnaud today i discovered that Google removed OpenSSL from Android 6.
As result my Crossplatform Client could not connect.

Does anybody have a clue to Run without OpenSSL or has a solution for that ?
May be it effects also Smart Mobile Studio Client ?!


Rad Studio 12.1 Santorini

Offline

#2 2015-10-22 18:49:41

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,669
Website

Re: No IndySSL under Android 6

We may have to use the native HTTP classes available with latest version of Delphi.
Unit SynCrossPlatformSpecific.pas should be modified as such.

It would not affect Smart Mobile Studio clients at all, since HTTPS is integrated within the web component used.

Offline

#3 2015-10-23 11:17:28

itSDS
Member
From: Germany
Registered: 2014-04-24
Posts: 516

Re: No IndySSL under Android 6

You mean System.Net.HttpClient ?

May be a very good alternative cause the Android Client uses JNI

I took a look in the Documentation and it seems to be very easy to integrate. I would do it but i don't know exactly how ...

I'll write a ticket.

Last edited by itSDS (2015-10-23 11:34:07)


Rad Studio 12.1 Santorini

Offline

#4 2015-10-23 11:36:07

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,669
Website

Re: No IndySSL under Android 6

You just need to add another conditional define, which would be used instead of Indy for compilers which support System.Net.HttpClient.

Offline

#5 2015-10-23 11:39:06

itSDS
Member
From: Germany
Registered: 2014-04-24
Posts: 516

Re: No IndySSL under Android 6

Yes I tried, but do not know which Params to use - i wrote a ticket.

http://synopse.info/fossil/tktview/9ff4 … 1e5754857e


Rad Studio 12.1 Santorini

Offline

#6 2015-10-23 18:39:42

itSDS
Member
From: Germany
Registered: 2014-04-24
Posts: 516

Re: No IndySSL under Android 6

Hi Arnaud i send you the Source via EMail - I integrated the THttpClient

Windows and Android Tests passed smile

Last edited by itSDS (2015-10-23 18:48:58)


Rad Studio 12.1 Santorini

Offline

#7 2015-10-24 07:35:29

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,669
Website

Re: No IndySSL under Android 6

Thanks!

I will integrate it this week end.

Offline

#8 2015-10-24 07:58:02

itSDS
Member
From: Germany
Registered: 2014-04-24
Posts: 516

Re: No IndySSL under Android 6

Ty under iOS i do not use it. I have Problems with ssl. so i made a little change. I send it to you.


Rad Studio 12.1 Santorini

Offline

#9 2015-11-05 21:03:01

wil32
Member
Registered: 2015-11-05
Posts: 1

Re: No IndySSL under Android 6

@itSDS

I would be interested into those file too!

Last edited by wil32 (2015-11-05 21:32:17)

Offline

#10 2015-11-06 19:01:27

itSDS
Member
From: Germany
Registered: 2014-04-24
Posts: 516

Re: No IndySSL under Android 6

Hi i send my modifications to arnaud but he did not integrate them, he seems to be busy


Rad Studio 12.1 Santorini

Offline

#11 2015-11-06 20:33:24

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,669
Website

Re: No IndySSL under Android 6

Should be included with http://synopse.info/fossil/info/8b7f795fdc

Sorry for the delay!

Offline

#12 2015-11-08 08:04:07

itSDS
Member
From: Germany
Registered: 2014-04-24
Posts: 516

Re: No IndySSL under Android 6

Hi Arnaud, tyvm,

but i had to made little modification to the ifdef section in the beginning

Please integrate this in the source.

...

  {$ifdef MSWINDOWS}
    {$ifdef FPC}
      {$define USEFCL}  // for debugging the FCL within Lazarus
    {$else}
      {$ifdef UNICODE}
        {$define USESYNCRT}       // sounds to be the best choice under Windows
        {.$define USEHTTPCLIENT}  // as alternative
        {.$define USEINDY}        // as alternative
      {$else}
        {$define USESYNCRT}
      {$endif}
    {$endif}
    {$define USECRITICALSECTION}
  {$else}
    {$ifdef FPC}
      {$define USEFCL}
      {$define USECRITICALSECTION}
    {$else}
      {$ifdef ISDELPHIXE8}
        {$ifdef ANDROID}
          {$define USEHTTPCLIENT} // use new System.Net.HttpClient
        {$else}
          {$define USEINDY}
        {$endif}
      {$else}
        {$define USEINDY}
      {$endif}
    {$endif}
  {$endif}

...

Let me explain:

Under Windows you can use all 3 HTTPCLIENT, SYNCRT, INDY just as you like I prefer using SYNCRT, but put the outdotted other defines as alternatives to show this.
You made a mistake putting the {$ifdef ISDELPHIXE8} under the WINDOWS ifdef. it is for iOS/ANDROID, i changed this.
ATM there is a problem (may be bug or i don't know how) in using HTTPCLIENT under IOS with authorization of self created certificates.
I added ifdef ANDROID before define httpclient This may change if i find out how to accept this kind of certificates under IOS. (Perhaps one has an idea?)


Rad Studio 12.1 Santorini

Offline

#13 2015-11-08 08:09:24

itSDS
Member
From: Germany
Registered: 2014-04-24
Posts: 516

Re: No IndySSL under Android 6

One other thing:
in SynCrossPlatform.inc you used $ifend please change it to $endif cause of the Compiler Warning


Rad Studio 12.1 Santorini

Offline

#14 2015-11-09 07:43:18

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,669
Website

Re: No IndySSL under Android 6

Offline

#15 2015-11-10 11:12:16

itSDS
Member
From: Germany
Registered: 2014-04-24
Posts: 516

Re: No IndySSL under Android 6

tyvm thats ok now


Rad Studio 12.1 Santorini

Offline

#16 2015-11-24 19:05:40

itSDS
Member
From: Germany
Registered: 2014-04-24
Posts: 516

Re: No IndySSL under Android 6

I forgot the endif / ifend Problem is still in syncrossplatform.inc can you pls fix it


Rad Studio 12.1 Santorini

Offline

Board footer

Powered by FluxBB