Hi, first of all sorry for my English.
I have a problem using secure connection with Nakama. Using non secure connection works like a charm.
Details about deployment:
- Unity project
- AWS machine (Ubuntu)
- Using Docker-Compose
- SSL certs are self-signed
We don’t need trusted certs because only our game will have access to server, so the idea is to validate the connection with the cert fingerprint. To accomplish that we are using a custom UnityWebRequestAdapter:
var client = new Client(“https”, “x.x.x.x”, 7350, “defaultKey”, UnityWebRequestAdapter.Instance);
That UnityWebRequestAdapter class is modified to validate the cert using a CertificateHandler that compares the cert fingerprint. For now it just returns ‘true’ on validate method:
protected override bool ValidateCertificate(byte certificateData) { return true; }
Have tried a lot of ways to generate the certs but it always come with the same error:
ApiResponseException: all SubConns are in TransientFailure, latest connection error: connection error: desc = “transport: authentication handshake failed: x509: certificate signed by unknown authority”
Don’t know if has something to do with Docker. Have searched a lot and tested a lot but nothing worked.
This thread has a similar problem: Improve connectivity when enabling SSL in Nakama for development · Issue #348 · heroiclabs/nakama · GitHub
Please, I need help, I have spent 3 days on this and didn’t solve.
Thanks in advance.