aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAc_K <Acoustik666@gmail.com>2018-10-07 00:16:42 +0200
committerThomas Guillemard <thog@protonmail.com>2018-10-07 00:16:42 +0200
commit5b8ccb717f225234ae97a2ef1673ca42833bd836 (patch)
tree3dcbed0dda8b27b251a2c20908eeedec18a2a17d
parent5821ff675dba32458193ea0a4d9b4657dfe949c2 (diff)
Implement ISslContext (#440)
This PR implement an empty `ISslContext` and update `CreateContext` and `SetInterfaceVersion` inside `ISslService`
-rw-r--r--Ryujinx.HLE/HOS/Services/Ssl/ISslContext.cs20
-rw-r--r--Ryujinx.HLE/HOS/Services/Ssl/ISslService.cs17
2 files changed, 36 insertions, 1 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Ssl/ISslContext.cs b/Ryujinx.HLE/HOS/Services/Ssl/ISslContext.cs
new file mode 100644
index 00000000..8f3a0649
--- /dev/null
+++ b/Ryujinx.HLE/HOS/Services/Ssl/ISslContext.cs
@@ -0,0 +1,20 @@
+using Ryujinx.HLE.HOS.Ipc;
+using System.Collections.Generic;
+
+namespace Ryujinx.HLE.HOS.Services.Ssl
+{
+ class ISslContext : IpcService
+ {
+ private Dictionary<int, ServiceProcessRequest> m_Commands;
+
+ public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;
+
+ public ISslContext()
+ {
+ m_Commands = new Dictionary<int, ServiceProcessRequest>()
+ {
+ //...
+ };
+ }
+ }
+} \ No newline at end of file
diff --git a/Ryujinx.HLE/HOS/Services/Ssl/ISslService.cs b/Ryujinx.HLE/HOS/Services/Ssl/ISslService.cs
index b59527f7..5affc636 100644
--- a/Ryujinx.HLE/HOS/Services/Ssl/ISslService.cs
+++ b/Ryujinx.HLE/HOS/Services/Ssl/ISslService.cs
@@ -14,15 +14,30 @@ namespace Ryujinx.HLE.HOS.Services.Ssl
{
m_Commands = new Dictionary<int, ServiceProcessRequest>()
{
+ { 0, CreateContext },
{ 5, SetInterfaceVersion }
};
}
+ // CreateContext(nn::ssl::sf::SslVersion, u64, pid) -> object<nn::ssl::sf::ISslContext>
+ public long CreateContext(ServiceCtx Context)
+ {
+ int SslVersion = Context.RequestData.ReadInt32();
+ long Unknown = Context.RequestData.ReadInt64();
+
+ Context.Device.Log.PrintStub(LogClass.ServiceSsl, $"Stubbed. SslVersion: {SslVersion} - Unknown: {Unknown}");
+
+ MakeObject(Context, new ISslContext());
+
+ return 0;
+ }
+
+ // SetInterfaceVersion(u32)
public long SetInterfaceVersion(ServiceCtx Context)
{
int Version = Context.RequestData.ReadInt32();
- Context.Device.Log.PrintStub(LogClass.ServiceSsl, "Stubbed.");
+ Context.Device.Log.PrintStub(LogClass.ServiceSsl, $"Stubbed. Version: {Version}");
return 0;
}