Recently, Godot added integration of DTLS on NetworkedMultiplayerENet. Yay! I have a working server/client connextion with NetworkedMultiplayerENet. I tried to integrate DTLS using these resources: https://docs.godotengine.org/en/stable/classes/class_crypto.html https://godotengine.org/article/enet-dtls-encryption But it didn't work: error code 42, invalid certificate. I finally found what seems to be a solution:

which is part of a series from our forum: https://godotforums.org/discussion/comment/43773 Anyway, he says that if you have peer.dtls_verify set to true, it will look for your certificate in a database of certified certificates, y'know, Verisecure or whatnot. Obviously not what you want, at least at the first stages of development. The point of being able to make a self-signed certificate is that you don't have to make it official, right? So I set peer.dtls_verify to false, and it works! But wait a minute... I removed the certificate from the client folder. When it loads, it gives an error (31: the certificate failed to load). But the connection is still working! That doesn't seem right. The client should compare the server's certificate with the one he has, right? Otherwise any certificate would work, which would be poor security. Am I missing something?

I removed the certificate from the client folder. When it loads, it gives an error (31: the certificate failed to load). But the connection is still working! That doesn't seem right. The client should compare the server's certificate with the one he has, right? Otherwise any certificate would work, which would be poor security.

Could you report an issue on GitHub with a minimal reproduction project attached?

4 months later
a year later