How to Http->CreateRequest() w/ self-signed cert

Hi, I’m getting this error when GETing my API. How can I accept this self-signed certificate? Is this possible in the UE implementation?

Thank you!

LogHttp: Warning: 000001BCE27B4100: request failed, libcurl error: 60 (Peer certificate cannot be authenticated with given CA certificates)
LogHttp: Warning: 000001BCE27B4100: libcurl info message cache 0 (Found bundle for host www.danger.team: 0x1bccf0b3eb0 [serially])
LogHttp: Warning: 000001BCE27B4100: libcurl info message cache 1 (Hostname 'www.danger.team' was found in DNS cache)
LogHttp: Warning: 000001BCE27B4100: libcurl info message cache 2 (  Trying 127.0.0.1...)
LogHttp: Warning: 000001BCE27B4100: libcurl info message cache 3 (TCP_NODELAY set)
LogHttp: Warning: 000001BCE27B4100: libcurl info message cache 4 (Connected to www.danger.team (127.0.0.1) port 80 (#1))
LogHttp: Warning: 000001BCE27B4100: libcurl info message cache 5 (Ignoring the response-body)
LogHttp: Warning: 000001BCE27B4100: libcurl info message cache 6 (Connection #1 to host www.danger.team left intact)
LogHttp: Warning: 000001BCE27B4100: libcurl info message cache 7 (Issue another request to this URL: 'https://www.danger.team/game-config-secret/hello-world')
LogHttp: Warning: 000001BCE27B4100: libcurl info message cache 8 (Found bundle for host www.danger.team: 0x1bccf0b3d30 [serially])
LogHttp: Warning: 000001BCE27B4100: libcurl info message cache 9 (Hostname 'www.danger.team' was found in DNS cache)
LogHttp: Warning: 000001BCE27B4100: libcurl info message cache 10 (  Trying 127.0.0.1...)
LogHttp: Warning: 000001BCE27B4100: libcurl info message cache 11 (TCP_NODELAY set)
LogHttp: Warning: 000001BCE27B4100: libcurl info message cache 12 (Connected to www.danger.team (127.0.0.1) port 443 (#3))
LogHttp: Warning: 000001BCE27B4100: libcurl info message cache 13 (ALPN, offering http/1.1)
LogHttp: Warning: 000001BCE27B4100: libcurl info message cache 14 (Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH)
LogHttp: Warning: 000001BCE27B4100: libcurl info message cache 15 (TLSv1.3 (OUT), TLS handshake, Client hello (1):)
LogHttp: Warning: 000001BCE27B4100: libcurl info message cache 16 (TLSv1.3 (IN), TLS handshake, Server hello (2):)
LogHttp: Warning: 000001BCE27B4100: libcurl info message cache 17 (TLSv1.3 (IN), TLS Unknown, Certificate Status (22):)
LogHttp: Warning: 000001BCE27B4100: libcurl info message cache 18 (TLSv1.3 (IN), TLS handshake, Unknown (8):)
LogHttp: Warning: 000001BCE27B4100: libcurl info message cache 19 (TLSv1.3 (IN), TLS Unknown, Certificate Status (22):)
LogHttp: Warning: 000001BCE27B4100: libcurl info message cache 20 (TLSv1.3 (IN), TLS handshake, Certificate (11):)
LogHttp: Warning: 000001BCE27B4100: libcurl info message cache 21 (TLSv1.3 (OUT), TLS alert, Server hello (2):)
LogHttp: Warning: 000001BCE27B4100: libcurl info message cache 22 (SSL certificate problem: self signed certificate)
LogHttp: Warning: 000001BCE27B4100: libcurl info message cache 23 (Closing connection 3)

Hey @FunAndFriendly, I just had this problem myself (again, for the second time) and had to remember how I solved it. Do the following - Edit->Project Settings. Under Engine → Network, make sure that “Verify Peer” under Libcurl is not checked.

Then, the most important part, restart UE4… If you don’t restart, it won’t take effect - the not restarting thing hung me up for a good half an hour :frowning:

ZOMG THANK YOU!

Saved me so much time, thought I needed to go the CA certificate route!

Disabling “Verify Peer” will disable all SSL checks and make the connection insecure.

Instead, you can generate a self-signed CA and sign your server certificate with it, then copy your CA certificate to /Content/Certificates/cacert.pem (and export it in packaged build).

To generate these two certificates yourself, see this tutorial .

im using windows 10 and the link says

The commands in this guide are based on macOS, but Linux commands should be similar.

how can I do this for windows 10

I use Cygwin on Windows to run linux commands.

This no longer works in UE 5.4.4

UE 5.3.2 also not work

thank you, it should be noted that the filename MUST be cacert.pem
And it’s a certificate bundle, so you can put several certificates into that file.

You can use the engine file as reference of how to compose your project specific cert bundle /path/to/UnrealEngine/Engine/Content/Certificates/cacert.pem

(tested in 5.7 btw., for those who thought this was broken in 5.x)