You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mac OS : PlatformNotSupportedException while doing certificate custom validation callback with WebSocketSharp at client side in a console application
#3
Open
vyomdixit19 opened this issue
Jan 31, 2018
· 1 comment
We have used WebSocketSharp Core library in our .netcore console application. We are also doing SSL handshaking and cert authentication/validation using WebSocket class SslConfiguration property - ServerCertificateValidationCallback assignment.
Code Block for Reference :
Securty.cs
public static bool ServerCertificateCustomValidation(object prmSender, X509Certificate prmCertificate, X509Chain prmChain, SslPolicyErrors prmSslPolicyErrors)
{
// for testing purpose..for signed CSR.
return true;
}
Usage :
var uriBuilder = new UriBuilder("ws" + (prmIsSecure ? "s" : ""), prmUri);
var objWsClient = new WebSocket(uriBuilder.Uri.AbsoluteUri)
{
SslConfiguration =
{
EnabledSslProtocols = SslProtocols.Tls12,
ServerCertificateValidationCallback = Security.ServerCertificateCustomValidation,
},
EnableRedirection = true
};
We are facing error while running published copy executable on Mac Sierra ( osx.10.12-x64).
Exception Detail :
Unhandled Exception: System.AggregateException: One or more errors occurred. (The handler does not support client authentication certificates with this combination of libcurl (7.54.0) and its SSL backend ("LibreSSL/2.0.20").) ---> System.PlatformNotSupportedException: The handler does not support client authentication certificates with this combination of libcurl (7.54.0) and its SSL backend ("LibreSSL/2.0.20").
at System.Net.Http.CurlHandler.SslProvider.SetSslOptions(EasyRequest easy, ClientCertificateOption clientCertOption)
at System.Net.Http.CurlHandler.EasyRequest.InitializeCurl()
at System.Net.Http.CurlHandler.MultiAgent.ActivateNewRequest(EasyRequest easy)
--- End of stack trace ---
The text was updated successfully, but these errors were encountered:
By using "DangerousAcceptAnyServerCertificateValidator" callback assignment on HttpClientHandler. Issue is resolved on MAC for HttpClient. But for WebSocket, it still exists. Is there any same work around for the WebSocket as well like HttpClient ?
Hi All,
Code Block for Reference :
Securty.cs
public static bool ServerCertificateCustomValidation(object prmSender, X509Certificate prmCertificate, X509Chain prmChain, SslPolicyErrors prmSslPolicyErrors)
{
// for testing purpose..for signed CSR.
return true;
}
Usage :
We are facing error while running published copy executable on Mac Sierra ( osx.10.12-x64).
Exception Detail :
Unhandled Exception: System.AggregateException: One or more errors occurred. (The handler does not support client authentication certificates with this combination of libcurl (7.54.0) and its SSL backend ("LibreSSL/2.0.20").) ---> System.PlatformNotSupportedException: The handler does not support client authentication certificates with this combination of libcurl (7.54.0) and its SSL backend ("LibreSSL/2.0.20").
at System.Net.Http.CurlHandler.SslProvider.SetSslOptions(EasyRequest easy, ClientCertificateOption clientCertOption)
at System.Net.Http.CurlHandler.EasyRequest.InitializeCurl()
at System.Net.Http.CurlHandler.MultiAgent.ActivateNewRequest(EasyRequest easy)
--- End of stack trace ---
The text was updated successfully, but these errors were encountered: