godot-docs icon indicating copy to clipboard operation
godot-docs copied to clipboard

how to use SSL certificates in server side

Open rodadax opened this issue 3 years ago • 4 comments

Your Godot version: 3.5 Issue description: dont have the description how to use keys and ca crt, what to use in each side... and the line of codes necessary

i want to make a home server to conect to a webservice (a host i think), a multiplayer game.. i already done the http version www.rubiu.pt , please, help me out

URL to the documentation page (if already existing): https://docs.godotengine.org/en/latest/tutorials/networking/ssl_certificates.html#approach-2-ca-cert

rodadax avatar Aug 10 '22 02:08 rodadax

cc @Faless

Calinou avatar Aug 10 '22 10:08 Calinou

key.key and crt.crt ... but now i think the client in web browser dont need anything

rodadax avatar Aug 10 '22 17:08 rodadax

but now i think the client in web browser dont need anything

In HTML5, custom certificates cannot be used as the web browser handles everything.

Calinou avatar Aug 10 '22 18:08 Calinou

i did understand that, it showed the error in the browser console ... that is why i changed the title to only server, and u keep talking about the webclient, i want to know about the webserver in my machine

rodadax avatar Aug 12 '22 01:08 rodadax

If you are using a StreamPeerSSL you need to pass the key and cert (full chain since ca_chain is unused for now) to accept_stream ( https://docs.godotengine.org/en/stable/classes/class_streampeerssl.html#class-streampeerssl-method-accept-stream ). If you use DTLSServer you need to pass them to setup ( https://docs.godotengine.org/en/stable/classes/class_dtlsserver.html) If you use websocketserver you need to set the private_key and ssl_certificate property (https://docs.godotengine.org/en/stable/classes/class_websocketserver.html)

Hope this helps.

On Fri, Aug 12, 2022, 02:22 rodadax @.***> wrote:

i did untherstabd that, it showed the error in the browser console ... that is why i changed the title to only server, and u keep talking about the webclient, i want to know about the webserver in my machine

— Reply to this email directly, view it on GitHub https://github.com/godotengine/godot-docs/issues/6062#issuecomment-1212642043, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAM4C3RR4LKRPCEKYTTOM3TVYWRO5ANCNFSM56CZHT4Q . You are receiving this because you were mentioned.Message ID: @.***>

Faless avatar Oct 11 '22 07:10 Faless