Problem: HttpClient connects to host and just freezes / keeps trying to connect to host; fails to connect / can't connect to host via HTTPS with certificate, did before regular HTTP.
Hello, I am having some difficulty getting SSL certificates / HTTPS connection to host to work. I am using a certbot / LetsEncrypt free certificate on my ubuntu 18.04 nginx server.
I have SSL certificate set in my Project>SSL settings to the .cert file that contains the certificates from my server under /etc/ssl/certs/ca-certificates.crt
on my ubuntu server.
I've tried changing the server name to contain https:// but that doesn't work either.
HTTPS works on the server, I've tested via browser.
This is how i connect to the host:
print("Connecting to host...")
IP.clear_cache()
http.close()
err = http.connect_to_host( "client.mydomain.com, 443,true,true)
if err != OK:
print("connection error: " + str(err))
bOffline = true
prompt_to_connect()
else:
while http.get_status() == HTTPClient.STATUS_CONNECTING or http.get_status() == HTTPClient.STATUS_RESOLVING:
print("Connecting to host...")
http.poll()
tries += 1
OS.delay_msec(10)
if tries == 10:
info_text("Failed to connect to server.")
prompt_to_connect()
print("status: " + str(http.get_status()))
if http.get_status() != 5:
print("response code: " + str(http.get_response_code()))
print("Connection to host failed.")
prompt_to_connect()
else:
bOffline = false
print("Connected to host.")
`
my log as it runs through connecting
Establishing connection...
Connecting to host... # try 1
Connecting to host...
Connecting to host...
Connecting to host...
Connecting to host...
Connecting to host... #...last try
status: 4 # failed.
response code: 0
Connection to host failed.
Am I supposed to do something else the .crt file? I just copied the certificates file and used that as my godot's SSL, is this correct? Thanks guys for the help.