openbmap / radiocells-scanner-android

WLAN and cell tower scanner for Radiocells.org
https://www.radiocells.org
Other
55 stars 26 forks source link

SSL handshake fails (Error Couldn't contact server. Either you're offline or the server is down) #196

Closed mvglasow closed 7 years ago

mvglasow commented 7 years ago

What steps will reproduce the problem? I have two devices: a OnePlus running Android 7.1.1, and a Nexus S running Android 4.4.4. Sometime in April, uploads from the Nexus S stopped working—I would get an error message stating that either I am offline or the server is down. At the same time, uploads from the OnePlus One continued to work fine.

What is the expected output? What do you see instead? See above—I’d expect the upload to go through on both phones.

What version are you using? On what operating system? Nexus S: 0.8.15 (tried upgrading to 0.8.18 but the problem persisted), Android 4.4.4 (CyanogenMod). OnePlus One: 0.8.18, Android 7.1.1 (LineageOS).

Please provide any additional information below. Today I ran a packet capture on my Internet router. It turns out the Nexus S makes several connection attempts to the server: The first is TLSv1, which goes through. The next two or three attempts are SSLv3, which immediately fail with the server reporting a handshake error. Looks like the recent server reconfiguration included tightened security settings, which include rejecting SSLv3 connections, while for some reason the client (or the OS) still defaults to that protocol version.

The fact that it works on one device but not on another (the problematic device running an old Android version) suggests that the OS is at fault. Then again, there are multiple connection attempts using different protocol versions, therefore maybe this can be rectified by the app requesting the appropriate parameters. I suspect newer Android versions simply default to newer protocol versions, whereas older versions will use these only where explicitly requested.

wish7code commented 7 years ago

Thanks a lot for investigating and discovering this issue!

I've seen this error on some older device ocassionaly too. But a SSL protocol issue has never come to my mind as error source..

I'll check how we can fix..

mvglasow commented 7 years ago

I tried a couple of times over the past few days, and indeed it seems to be working again. Thanks for fixing!