SSL Issues

Hi,

I’m using UnityWebRequest to perform POST operations across HTTPS. I’ve tried and tested with HTTP, and it all works. When I switch to HTTPS, the UnityWebRequest returns an error with the text “Unable to complete SSL connection”.

There doesn’t seem to be any more helpful information than this in the error, and I can’t find anything on a Google. Can anyone help me out?

Cheers

Nick

If the destination uses https, the original sender needs https, too. How to do this in Unity? …no clue. Let me know if you find out :wink:

1 Like

Is it not possible to configure UnityWebRequest to use HTTPS?

Failing this, how can I communicate with a server from the WebGL client using HTTPS? I can’t just use HTTP, the traffic would all be viewable.

What protocol are you using on your server?

I had my server set to TLSv1.2 and TLSv1.1 and was receiving the same error message that you are getting. I weakened it to include TLSv1 as well (in the server configuration) and now I’m getting proper connects and responses using UnityWebRequest to create POST queries to my rest API

hope this helps

If you ever find a way which enables TLS 1.2 security in Unity please let me know too. I’ve already abandoned all hope…

So is there seriously NO WAY to send HTTPS requests from a WebGL program? How am I supposed to communicate with my server? :confused:

HTTPS works fine with UnityWebRequest, if you can change the ssl protocol on your server to TLSv1. SSL variants will probably work as well but are even less secure. I’m using Unity 5.2 where the UnityWebRequest class was first introduced.

Many thanks for your answer Nate! I was beginning to become seriously concerned about our project’s future!

If possible, can you provide any detail on TSL configuration, certificate configuration and/or the configuration of UnityWebRequest? As I said, I have our current application working across HTTP, but I haven’t configured HTTPS before, so any help would be gratefully received! :slight_smile:

Many Thanks,

Nick

OK, for starters are you using apache or nginx as your server? I can help with those. If you’re using IIS it’s probably still doable, but I don’t have as much experience with that.

The certificate is the same regardless of protocol used

I’m using IIS. I’ve had a tinker, but it seems non-obvious. Any help gratefully received!

Nick

(PS - Happy New Year!)

apparently (although I haven’t actually tried) it simply requires some minor tweaking in regedit TLS-SSL Settings | Microsoft Learn

rather than TLSv1 they use the key “TLS 1.0”

I’ve added keys for TLS 1.2 > Server > Enabled = 0, TLS 1.1 > Server > Enabled = 0, and TLS 1.0 > Server > Enabled = 1.

I’m still getting an Unknown SSL protocol error, so I’m not sure whether it worked and I have SSL set up incorrectly, or whether it didn’t work. :confused:

hmm, does the link work through your browser? to set up ssl in general you should just need to bind the https port on the server.

Success! I hadn’t registered the certificate successfully. I now have TLS 1.0 working from WebGL. Many thanks for your assistance Nate.

I see Unity 5.5.0 support TLSv1.1 and TLSv1.2

But do you guys know how to enable it for WWW request? Still i have suffered the bug using Android prior 5.0.