HTTPRequest and HTTPS certificates.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By avencherus

I’m trying to do an HTTPRequest to a url that uses SLL. I’ve read over this: SSL certificates — Godot Engine (3.0) documentation in English

I’m not really understanding where to acquire the certificate it needs, I thought I exported it from the browser and added, but it still does not seem to work, reporting RESULT_CONNECTION_ERROR = 4 — Request failed due to connection(read/write) error.

If anyone has information or a more detailed explanation on the proper methods for acquiring and applying SSL certs that is compatible with a Godot project, please let me know. Thanks. X)

:bust_in_silhouette: Reply From: Calinou

The certificate bundle is currently not automatically included when exporting – this may change in a future release.

To enable support for SSL verification after exporting, you can save ca-certificates.crt from the Godot Git repository, place it somewhere in your project, specify its path in Project Settings → Network → Ssl → Certificates then export the project.

Note that the certificate bundle is never used when exporting to HTML5; the browser will handle SSL verification instead (since it relies on XMLHttpRequest to perform HTTP requests). There are a few other restrictions in this case as well.

Update: Starting from Godot 3.1, SSL certificates will be included in export templates.

Awesome, big thanks for that answer Calinou. Problem resolved. X)

I’m just starting to explore this stuff, and had no idea it was a bundle of certificates stored in the repo. Is making more sense now though.

avencherus | 2018-05-31 21:51