Page 1 of 1

[closed] SSL Handshake Exception

Posted: Thu Aug 06, 2020 8:58 pm
by Guest
Since June 2020 I got SSH Handshake Exception when accessing OpenStreetMaps. Specific map OSM France is working. I use Android 4.1.

Re: SSL Handshake Exception

Posted: Fri Aug 07, 2020 9:15 am
by Psyberia-Support
Hi,
You must update to Android 5.0 or more.
Some maps now require a security "level" that is unfortunately not available on older devices.

Re: SSL Handshake Exception

Posted: Fri Aug 07, 2020 8:16 pm
by Guest
Upgrade is not possible (at least I do not know how). I use HTC desire X (one of the small smartphones still working).
Anyway, what in detail is wrong or out dated? Certificates are up to date. Is it possible to define what you mean by security level?

Re: SSL Handshake Exception

Posted: Sat Aug 08, 2020 10:00 am
by Psyberia-Support
Hi again,
It's not about the certificates, it's the protocols themselves.
On Android 4.4 or less, only SSL and TLSv1 security protocols were available by default (https://developer.android.com/reference/javax/net/ssl/SSLEngine#protocols).
But now, more and more websites only accept TLSv2 and/or TLSv3.

If you have some tech knowledge, there are a few things you can try (it may help but there is no guarantee). In the app, go in the installed maps list, click on "Add more maps" and select "OSM maps". It will add a config file of the OSM maps on your device that will be used instead of the built-in config file. This way you can edit the file (here is some doc).
- First, try to replace all "https://" occurrences by "http://" in order no to use any secured connection. Some servers may accept this, some not (they will redirect requests to the https version and not give you the map).
- Add the insecure="true" attribute to none working maps. Replace:

Code: Select all

    <zoom-levels z="3,5,7,8,9,10,11,12,13,14,15,16,17">
      <server><![CDATA[https://a.tile.openstreetmap.org/{$z}/{$x}/{$y}.png]]></server>
    </zoom-levels>
by

Code: Select all

    <zoom-levels z="3,5,7,8,9,10,11,12,13,14,15,16,17" insecure="true">
      <server><![CDATA[https://a.tile.openstreetmap.org/{$z}/{$x}/{$y}.png]]></server>
    </zoom-levels>
It will disable all certificate checks, and try to add all available protocols (including the ones not activated by default because it was too early at that time, depending on your device/system/rom you may have TLSv2 support).

Re: SSL Handshake Exception

Posted: Sun Aug 09, 2020 6:38 pm
by Guest
Thanks for information. It helps me to understand that https is the problem. The German map server only accepts https, while others like France still accept http. Maybe I will find a new one for me. OepnStreetMap France is still a workaround. Thanks for trying to help. I like your app.