0 votes

I'm using godot 3.4.3 to edit and export my projects. I'm running the server projects through godot 3.4.2 linux_server version. I have my server code running in the document root of a dedicated server. I bought an SSL from a 3rd party. I tried runnning the server project as the root user, as well as a non-root user. My cert and keys load properly in godot on the server and on the client ( I checked by having it print them when they're loaded) I tried loading the cert and key directly from where they are installed on the server, AND i tryed loading copies of them from the res:// directory in godot instead. My SSL definately works in some respect because when I go to the URL that's connected to my server I do get the little lock icon.

THE PROBLEM: when I try to use this dang SSL for a DTLS connection when the player signs in (and change setdtlsvarifyenabled() to TRUE) I just keep getting a handshake error. When I keep it false, everything works fine. But when I try to use my newly aquired SSL and switch it to true. Handshake errors for days. This is the error I get --> E 0:00:04.727 _dohandshake: TLS handshake error: -9984
<C++ Source> modules/mbedtls/packetpeermbeddtls.cpp:102 @ _dohandshake()
Gateway.gd:23 @ _process()
I've been grappling with this issue for weeks now. I really need this DTLS to work for sign in. Does anyone have any idea what could be wrong? I'm losing my mind over here.

extends Node

onready var main = get_node("/root/Main")

var cert = load("res://Certificate/stopclock.crt")
var network = NetworkedMultiplayerENet.new()
var gateway_api = MultiplayerAPI.new()
#var ip = "127.0.0.1" #<-- Loop it back IP
var ip = "www.stopclock.app" #<--- Server IP
var port = 42092

var username
var password
var new_user

func _ready():
    print(cert)

func _process(_delta):
    if get_custom_multiplayer() == null: return
    if not custom_multiplayer.has_network_peer():
        return;
    custom_multiplayer.poll();

func ConnectToServer(_username, _password, _new_user):
    network = NetworkedMultiplayerENet.new()
    gateway_api = MultiplayerAPI.new()
    network.set_dtls_enabled(true)
    network.set_dtls_verify_enabled(true) ##<--- PROBLEM
    network.set_dtls_certificate(cert)
    username = _username
    password = _password
    new_user = _new_user
    network.create_client(ip, port)
    set_custom_multiplayer(gateway_api)
    custom_multiplayer.set_root_node(self)
    custom_multiplayer.set_network_peer(network)

    network.connect("connection_failed", self, "_OnConnectionFailed")
    network.connect("connection_succeeded", self, "_OnConnectionSucceeded")

func _OnConnectionFailed():
    print("Failed to connect to login server")
    print("Pop-up server could be offline")
    main.get_node("Panel").login_back_button.disabled = false
    main.get_node("Panel").login_button.disabled = false
    main.get_node("Panel").new_account_back_button.disabled = false
    main.get_node("Panel").confirm_new_account_button.disabled = false

func _OnConnectionSucceeded():
    print("Succesfully connected to login server")
    if new_user: RequestCreateAccount()
    else: RequestLogin()

func RequestCreateAccount():
    print("Requesting new account")
    main.loading = true
    rpc_id(1, "CreateAccountRequest", username, password.sha256_text())
    username = ""
    password = ""

Please help.

Godot version Godot 3.4.3 + Godot 3.4.2_linux_server.64
in Engine by (18 points)

My only suggestion is to open up an issue on Godot's Github issue tracker, and see what the developers say.

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.