Android Question NetExtras - CloseNow / Compatibilty vs. Net / FTP - Implicit SSL with AutoCertificate

MMORETTI964

Member
Licensed User
Longtime User
Hi, we use NetExtras with success.

However, in some remote cases, we've found an issues that's cause behaviours (and exception) not manageable from b4a.

When calling CloseNow during a file rx or tx (for example, because a User don't like to get a large files and we give an abort button option), silently the files continues its progress.
When we enter another once in that form (for another communication) the old transfer continues for a while. There is a way, after (or during the CloseNow) to absolutely disable all transfers event? I supposed that CloseNow should close not only command socket but also data socket(s).

But CloseNow relies (I think) on the Net version of the library. NetExtras should be recompiled against new Net library version?

Last question: I remember that wasn't possible using Implicit FTP SSL with AutoCertificate. Is that true also today with all new Android version?

Thank you so much.
Maurizio
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
FTP.CloseNow does close the data connection (only if the progress events are implemented). I'm not sure whether this is implemented in NetExtras or not. Why do you need to use NetExtras?

I remember that wasn't possible using Implicit FTP SSL with AutoCertificate. Is that true also today with all new Android version?
It should be possible with the Net library.
 
Upvote 0

MMORETTI964

Member
Licensed User
Longtime User
With Net, no problem, so I think NetExtras don't implement it correctly in some way.
We would like to use NetExtras for using resume, should be fine porting Martin works inside the standard Net library (or compile it against new Net?)
However, our NetExtras use was for "a future implementation", we can use the correct Net.

For the other question, I've tried, the result is that:
(CertPathValidatorException) java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.

Here some code (made AFTER Effetipi.Initialize, Effetipi is an FTP class):

CTM.InitializeAcceptAll
Effetipi.SetCustomSSLTrustManager(CTM)
'Implicit
Effetipi.UseSSLExplicit=False
Effetipi.UseSSL=True
'Explicit
'Effetipi.UseSSLExplicit=True
'Effetipi.UseSSL=False

The same problem in another thread:
https://www.b4x.com/android/forum/t...m-net-library-v1-37-solved.38984/#post-237708
You said that the custom SSL manager currently only works with SSL Explicit mode (and probably is true in 2014 and now, too).

However... If I'll get a true certificate for my server, how can I use it for my client? There is such a tutorial on that?
Many Thanks.

Maurizio
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Please use [code]code here...[/code] tags when posting code.

You said that the custom SSL manager currently only works with SSL Explicit mode (and probably is true in 2014 and now, too).
You are correct.

However... If I'll get a true certificate for my server, how can I use it for my client?
You will not need to do anything special. It will work with the default trust manager.
 
Upvote 0
Top