From 447940cf365736707b656be46edd722b59831365 Mon Sep 17 00:00:00 2001 From: doteq Date: Mon, 8 May 2023 16:01:27 +0200 Subject: [PATCH] Add SSL handshake error message --- .../Ssl/SslService/SslManagedSocketConnection.cs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/Ryujinx.HLE/HOS/Services/Ssl/SslService/SslManagedSocketConnection.cs b/src/Ryujinx.HLE/HOS/Services/Ssl/SslService/SslManagedSocketConnection.cs index 47d3eddbe..2fd9d49ef 100644 --- a/src/Ryujinx.HLE/HOS/Services/Ssl/SslService/SslManagedSocketConnection.cs +++ b/src/Ryujinx.HLE/HOS/Services/Ssl/SslService/SslManagedSocketConnection.cs @@ -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;