Search Issue Tracker

Won't Fix

Votes

0

Found in

2019.3.1f1

Issue ID

1238961

Regression

No

[Mono] Secure WebSockets connection setup with a self-signed certificate

Mono

-

Steps to reproduce:

1. Make a WebSocket server with a self-signed certificate
2. Try connecting using a ClientWebSocket

Expected: Allowing System.Net.ServicePointManager.ServerCertificateValidationCallback to possibly allow for trust.:
Actual: The client WebSocket fails to connect due to the cert not being trusted. Setting System.Net.ServicePointManager.ServerCertificateValidationCallback to accept all doesn't seem to affect this.

Comments (5)

  1. osdima1

    Oct 09, 2022 08:06

    Please don't forget to restart Unity after certificate installation...

  2. dimitroff

    Dec 16, 2021 13:37

    I am having the same problem with trying to connect to a Websocket Server. ServicePointManager.ServerCertificateValidationCallback does not register anything.

  3. mikaelle5000

    Oct 13, 2021 19:36

    https://unity3d.com/es/unity/beta/2020.1.0b12 says that

    Scripting: Fixed ServicePointManager.ServerCertificateValidationCallback not receiving any certificate data.

    but I'm still facing this issue with 2021.1.3f1

  4. unity_O58ezC8PpfP4bg

    Jan 10, 2021 22:48

    This should be fixed

  5. delphinius81

    Sep 30, 2020 19:32

    Why was this closed to not fix? It's impossible to perform certificate validation for secure connections that use self-signed certs. There are use cases for this, specifically for applications that run a LAN that do not connect to the Internet. I understand that this is a bug in mono itself, but this has been an issue for a couple years now.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.