Replies: 3 comments
-
Hi @yuroyami - what you are describing is mutual TLS, Syncplay doesn't use it. In fact I'm somewhat surprised every time I hear somebody mention it who is not an IT security professional or developer/architect of large Kubernetes applications. Syncplay only uses the "standard" TLS where client verifies that the certificate presented by the server is valid - the same basic principle as typical https website. If you for a second ignore the details of negotiating the opportunistic TLS by Syncplay and the nitty-gritty details of TLS (handled by libraries, not directly by Syncplay) the flow is just:
I'm not sure what's the Android equivalent to establish an encrypted connection in the framework of your choice, but there definitely should be something that handles all of the black magic of TLS largely on its own. As a side note - TLS can be very complicated, especially with regards to secure use of old versions. Syncplay uses TLS 1.3 and while technically there is still a TLS 1.2 fallback, it's completely irrelevant to using Syncplay today so feel free to ignore existence of older versions of TLS. |
Beta Was this translation helpful? Give feedback.
-
Hi, I agree with everything @daniel-123 says but have some more information that is hopefully useful. You appear to be using Netty 4.1 for networking. I had a quick check and https://netty.io/4.1/api/io/netty/handler/ssl/SslHandler.html provides guidance on how to implement startTLS (i.e. opportunistic TLS). According to the guide, the client-side process on Netty is as follows:
In terms of the Syncplay protocol side of things, I discuss that at yuroyami/syncplay-mobile#6 |
Beta Was this translation helpful? Give feedback.
-
@daniel-123 How did I not think of the fact that Syncplay may not be using mutual TLS at all in the first place? Now that I actually implemented normal Opportunistic TLS (startTLS) (thanks a lot for the javadocs @Et0h, I did not even know Netty supports Op TLS out of the box), everything is working perfectly. I was able to establish a TLSv1.3 connection with the public servers. Thank you both so much for your assistance. |
Beta Was this translation helpful? Give feedback.
-
Today I have finally decided to experiment with adding TLS support to the Android unofficial client . I am not well-knowledgeable when it comes to SSL but I believe I grasp the notion well enough to understand how to implement the whole thing. As per the discussion here (Huge thanks to @Et0h and @daniel-123), I concluded that Syncplay uses (Opportunistic) mutual TLS where both the server and the client have to authenticate themselves to one other. The server presents its certificates to the Android client, which authenticates it against its own built-in CAs, all good so far, since LetsEncrypt is officially supported by Android. The client, in return, can present a set of certificates that cannot be self-signed, and have to be issued by trusted CA, be it global or private. Here lies the issue:
If this roadblock is overcome, I can further extend the TLS support beyond that, and make the client capable of loading
.pem
certificates within a folder (just like what Syncplay desktop expects), so a user can also connect his Android unofficial client to a custom private server.TL;DR: I suspect the missing piece of the puzzle for an unofficial client to connect via TLS to the public servers is the server's certificates, correct ?
Beta Was this translation helpful? Give feedback.
All reactions