-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed
Labels
area-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions
Milestone
Description
If you believe you have an issue that affects the security of the platform please do NOT create an issue and instead email your issue details to secure@microsoft.com. Your report may be eligible for our bug bounty but ONLY if it is reported through email.
Describe the bug
A clear and concise description of what the bug is.
Hi, I'm trying to connect to a server which uses self-signed certificates.
The clients on the tablets are unable to do so, but the clients I deployed on laptops are able to.
This is the error I get when I run my clients on a tablet:
The SSL connection could not be established, see inner exception. --> System.Security.AuthenticationException: The remote certificate is invalid according to the validation procedure
https://stackoverflow.com/questions/48560175/signalr-aspnetcore-unable-to-connect-to-the-remote-server-system-net-webexc
The thread above mentioned .WithWebSocketsOptions, but I am able to access it. What can I do to accept self-signed certificates?
_connection = new HubConnectionBuilder()
.WithUrl(_hubRoot, Microsoft.AspNetCore.Http.Connections.HttpTransportType.WebSockets, options =>
{
options.WebSocketConfiguration = sockets =>
{
sockets.RemoteCertificateValidationCallback += new RemoteCertificateValidationCallback((sender, certificate, chain, policyErrors) => { return true; });
};
})
.Build();
I have tried to do set a RemoteCertificationValidationCallBack, however it did not solve the issue.
Metadata
Metadata
Assignees
Labels
area-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions