notes icon indicating copy to clipboard operation
notes copied to clipboard

Notes doesn't work with TLS 1.2

Open DarkSteve opened this issue 9 years ago • 8 comments

I've been unable to use Notes since I was constantly getting "Server connection is broken" errors on Android. I've only recently upgraded from ownCloud to Nextcloud so I've only just discovered this issue.

I'm running Apache 2.4.27, PHP 5.6.31, OpenSSL 1.0.2l, on FreeBSD 11.1 and my phone is Cyanogenmod 11 (Android 4.4) and Notes 0.11.0 from F-Droid.

Everything else (Nextcloud app, Contacts and Calendar sync) is connecting to my server just fine.

Apache was originally configured with: SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1

But I kept getting errors about the server connection being broken, an instant error without any delay.

Once I changed that setting to: SSLProtocol all -SSLv2 -SSLv3

Notes now works.

This is really not ideal. TLS 1.2 has been out for around a decade, and I'd really prefer not to lower my server's security if I can help it!

DarkSteve avatar Aug 29 '17 04:08 DarkSteve

Same here, I cannot connect to my server anymore using the Notes android app, and I think it could be related to my server using TLS1.2 for https (not sure though, I don't have anything more than an "Error" message)

nautik1 avatar Aug 29 '17 11:08 nautik1

I don't have anything more than an "Error" message

Let me guess, it's something like "Server connection broken" :-)

Have you tried enabling TLS 1.0 and 1.1? It would be good to have somebody else independently confirm what I found!

DarkSteve avatar Aug 29 '17 14:08 DarkSteve

My bad, seems to work fine now and still using TLS1.2I believe. -> I changed my let's encrypt config to use fullchain.pem instead of cert.pem, in order to include the full chain of certs. Maybe this had an impact ?

nautik1 avatar Sep 01 '17 23:09 nautik1

@DarkSteve Do you use the full certificate chain in your Apache config?

korelstar avatar Sep 02 '17 08:09 korelstar

@korelstar I'd already made that mistake and corrected it! I was getting errors in odd places that I traced back to using cert instead of fullchain. I've already corrected it in Apache, Postfix, and Dovecot.

From my httpd-ssl.conf: SSLCertificateFile "/usr/local/etc/letsencrypt/live/darksteve.tk/fullchain.pem"

And from my httpd-vhosts.conf (for my cloud.darksteve.tk entry): SSLCertificateFile /usr/local/etc/letsencrypt/live/darksteve.tk/fullchain.pem

But Notes still fails. Is there something else that could cause issues? OCSP stapling or HSTS?

@parquetn Are you sure you're only using TLS 1.2? If it's ok, can you provide what ciphers you're using - maybe I'm missing a cipher or using ciphers that Notes can only use with TLS 1.0 and 1.1? I'll try using your ciphers and see if I can get Notes working.

DarkSteve avatar Sep 02 '17 12:09 DarkSteve

Ok, it's not the ciphers. I didn't think it was, but I just tried some older ciphers (as recommended by Mozilla) and still it seems it's the protocol that's the problem.

Still, the Notes mobile app requires TLS 1.0. It's not even compatible with TLS 1.1.

After getting the "server connection broken" error, it displays a second fuller error:

https://i.imgur.com/iJMtGdM.png

@parquetn Can you recheck your protocols? Mine is: SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1

DarkSteve avatar Sep 02 '17 17:09 DarkSteve

It appears that TLS 1.2 is activated only on Android 5.0+. I think, that's the reason, why this doesn't work for you.

Hence, you should update your phone (and TLS 1.2 is the smallest problem on such an old OS ;-) !

korelstar avatar Sep 23 '17 19:09 korelstar

@korelstar Thank you!

That explains why the problem is so obvious and repeatable for me, but not many others seem to have noticed. I'm currently running Cyanogenmod, but Lineage OS has nightlies based on Android 7 that I can try out.

The main reason I haven't yet upgraded is because it took me ages to find an appropriate Xposed Framework for my phone and its associated modules, and it's currently working just right, so I didn't want to change it.

I guess it's time to bite the bullet and jump through all those hoops again!

DarkSteve avatar Sep 24 '17 02:09 DarkSteve