Add SSL handshake error message

This commit is contained in:
doteq 2023-05-08 16:01:27 +02:00
parent f2d8c11c15
commit 447940cf36

View file

@ -1,4 +1,5 @@
using Ryujinx.HLE.HOS.Services.Sockets.Bsd;
using Ryujinx.Common.Logging;
using Ryujinx.HLE.HOS.Services.Sockets.Bsd;
using Ryujinx.HLE.HOS.Services.Sockets.Bsd.Impl;
using Ryujinx.HLE.HOS.Services.Ssl.Types;
using System;
@ -93,7 +94,17 @@ namespace Ryujinx.HLE.HOS.Services.Ssl.SslService
{
StartSslOperation();
_stream = new SslStream(new NetworkStream(((ManagedSocket)Socket).Socket, false), false, null, null);
_stream.AuthenticateAsClient(hostName, null, TranslateSslVersion(_sslVersion), false);
try
{
_stream.AuthenticateAsClient(hostName, null, TranslateSslVersion(_sslVersion), false);
}
catch (Exception e)
{
Logger.Error?.Print(LogClass.ServiceSsl, "SSL handshake error. If proxy is enabled try adding a certificate in your OS settings.");
throw;
}
EndSslOperation();
return ResultCode.Success;