From 3fa7ef21b43081a8f40ce76aafdb7cd0695dcda5 Mon Sep 17 00:00:00 2001
From: Mary <me@thog.eu>
Date: Thu, 13 Jan 2022 23:29:04 +0100
Subject: ssl: Implement SSL connectivity (#2961)

* implement certain servicessl functions

* ssl: Implement more of SSL connection and abstract it

This adds support to non blocking SSL operations and unlink the SSL
implementation from the IPC logic.

* Rename SslDefaultSocketConnection to SslManagedSocketConnection

* Fix regression on Pokemon TV

* Address gdkchan's comment

* Simplify value read from previous commit

* ssl: some changes

- Implement builtin certificates parsing and retrieving
- Fix issues with SSL version handling
- Improve managed SSL socket error handling
- Ensure to only return a certificate on DoHandshake when actually requested

* Add missing BuiltInCertificateManager initialization call

* Address gdkchan's comment

* Address Ack's comment

Co-authored-by: InvoxiPlayGames <webmaster@invoxiplaygames.uk>
---
 Ryujinx.HLE/FileSystem/Content/ContentManager.cs | 2 ++
 1 file changed, 2 insertions(+)

(limited to 'Ryujinx.HLE/FileSystem/Content/ContentManager.cs')

diff --git a/Ryujinx.HLE/FileSystem/Content/ContentManager.cs b/Ryujinx.HLE/FileSystem/Content/ContentManager.cs
index dbc18d85..9203f156 100644
--- a/Ryujinx.HLE/FileSystem/Content/ContentManager.cs
+++ b/Ryujinx.HLE/FileSystem/Content/ContentManager.cs
@@ -10,6 +10,7 @@ using LibHac.Tools.FsSystem.NcaUtils;
 using LibHac.Tools.Ncm;
 using Ryujinx.Common.Logging;
 using Ryujinx.HLE.Exceptions;
+using Ryujinx.HLE.HOS.Services.Ssl;
 using Ryujinx.HLE.HOS.Services.Time;
 using Ryujinx.HLE.Utilities;
 using System;
@@ -195,6 +196,7 @@ namespace Ryujinx.HLE.FileSystem.Content
                 if (device != null)
                 {
                     TimeManager.Instance.InitializeTimeZone(device);
+                    BuiltInCertificateManager.Instance.Initialize(device);
                     device.System.SharedFontManager.Initialize();
                 }
             }
-- 
cgit v1.2.3-70-g09d2