TwidereProject / Twidere-Android

http://twidere.com
2.76k stars 377 forks source link

twidere needs to enable TLSv1.2 on android 4.1 & 4.4 #885

Open erisdev opened 7 years ago

erisdev commented 7 years ago

twidere needs to enable TLSv1.2 on older android versions to support some mastodon instances. TLSv1.2 is supported starting with android 4.1 but for some reason it's disabled by default until android 5. it can be enabled at the api level on these older versions though.

no useful output from logcat, but tusky has the same problem with the same instances and it logs an error message that indicates an ssl error.

Expected behavior

successfully connect to a mastodon instance that only allows TLSv1.2, such as https://cybre.space.

Actual behavior

vague "network error" when i click the sign in button.

Steps to reproduce

on an android 4.1 or 4.4 device, add a new mastodon account and enter cybre.space as the site.

Extra info

Android version: 4.4.4

Network type:

App version: 3.6.21

Build variant:

Micro-blogging service:

App settings:

mariotaku commented 7 years ago

Seems it's IPv6 related problem: image

erisdev commented 7 years ago

no, i don't think so. i've had no problem with ipv6 in other apps... there's no error message in logcat, but i have the same problem in tusky which is logging an exception related to ssl handshake.

i may have been mistaken about the solution here (it was suggested by someone else) but i am 100% certain that the problem is ssl-related.

mariotaku commented 7 years ago

I'm pretty sure TLS are enforced correctly, but error still remains. See https://github.com/socketio/socket.io-client-java/issues/298 .