godot: mbedtls error when using private key on server

Godot version: Godot Engine v3.2.1.stable.official - https://godotengine.org , server build OS/device including version: Ubuntu 18.04.4 LTS Issue description: Console prints mbedtls error: returned -0x7780 and connection is not established Steps to reproduce: Using the server build on linux try to use a private key from LetsEncrypt , then have a godot client connect. Minimal reproduction project:

extends Node

var server: WebSocketServer = null

func _ready():
    server = WebSocketServer.new()
    server.private_key = load("res://privkey.key")
    server.ssl_certificate = load("res://fullchain.crt")
    server.listen(port, PoolStringArray(), true)
    get_tree().set_network_peer(server)

func _process(delta):
    if server.is_listening():
        server.poll()

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 15 (9 by maintainers)

Commits related to this issue

Most upvoted comments

var error = net.connect_to_url(‘wss://178.62.117.12:6969’, PoolStringArray(), true)

@lumenwrites Well, you need to put the fully qualified domain name there, not the IP address. The browser is also telling you that: ERR_CERT_COMMON_NAME_INVALID

In general, SSL is based on a chain of trust. The whole chain must be trusted for the certificate to be trusted. Browsers comes with quite a few trusted top-level certificates, so you don’t always need the full chain in browsers. Tools that checks SSL validity also easily spot and report the fact that the full chain is missing (e.g. https://www.digicert.com/help/ or https://www.sslshopper.com/ssl-checker.html)

Those links should be on the websockets doc page https://docs.godotengine.org/en/stable/tutorials/networking/websocket.html