aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShrek5InTheatres2019 <liam@tannock.net>2020-06-06 04:04:30 -0700
committerGitHub <noreply@github.com>2020-06-06 13:04:30 +0200
commit4ef689c67dd6416cd2462bcd8e82a2ded6a81d4e (patch)
tree997b32b45e1641d3110624754362c465a68408bc
parentf8cd072b62808c8da06549807cc263003f0049b7 (diff)
Stubbing ImportServerPki (#1281)
* Stubbed ImportServerPki * thought it might be nice to name this variable properly * i really need to name variables better * Change Var Co-authored-by: Thog <thog@protonmail.com> * Change .ReadBytes(5) to IPC send buffer Co-authored-by: Thog <thog@protonmail.com> * Add description comment Co-authored-by: Thog <thog@protonmail.com> * fix build issue * Resolve final suggestion Co-authored-by: Thog <thog@protonmail.com> * uhh * it should work now shut up * aligned variables just look so much nicer :) * better variable alignment * aligned Co-authored-by: Thog <thog@protonmail.com>
-rw-r--r--Ryujinx.HLE/HOS/Services/Ssl/ISslService.cs2
-rw-r--r--Ryujinx.HLE/HOS/Services/Ssl/SslService/ISslContext.cs24
2 files changed, 23 insertions, 3 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Ssl/ISslService.cs b/Ryujinx.HLE/HOS/Services/Ssl/ISslService.cs
index 2f4b93ca..67656f06 100644
--- a/Ryujinx.HLE/HOS/Services/Ssl/ISslService.cs
+++ b/Ryujinx.HLE/HOS/Services/Ssl/ISslService.cs
@@ -17,7 +17,7 @@ namespace Ryujinx.HLE.HOS.Services.Ssl
Logger.PrintStub(LogClass.ServiceSsl, new { sslVersion, unknown });
- MakeObject(context, new ISslContext());
+ MakeObject(context, new ISslContext(context));
return ResultCode.Success;
}
diff --git a/Ryujinx.HLE/HOS/Services/Ssl/SslService/ISslContext.cs b/Ryujinx.HLE/HOS/Services/Ssl/SslService/ISslContext.cs
index ef788175..b0c8824a 100644
--- a/Ryujinx.HLE/HOS/Services/Ssl/SslService/ISslContext.cs
+++ b/Ryujinx.HLE/HOS/Services/Ssl/SslService/ISslContext.cs
@@ -1,7 +1,27 @@
+using Ryujinx.Common.Logging;
+using System;
+
namespace Ryujinx.HLE.HOS.Services.Ssl.SslService
{
class ISslContext : IpcService
{
- public ISslContext() { }
+ public ISslContext(ServiceCtx context) { }
+
+ [Command(4)]
+ // ImportServerPki(nn::ssl::sf::CertificateFormat certificateFormat, buffer<bytes, 5> certificate) -> u64 certificateId
+ public ResultCode ImportServerPki(ServiceCtx context)
+ {
+ int certificateFormat = context.RequestData.ReadInt32();
+ long certificateDataPosition = context.Request.SendBuff[0].Position;
+ long certificateDataSize = context.Request.SendBuff[0].Size;
+ ulong certificateId = 1;
+
+ context.ResponseData.Write(certificateId);
+
+ Logger.PrintStub(LogClass.ServiceSsl, new { certificateFormat, certificateDataPosition, certificateDataSize });
+
+ return ResultCode.Success;
+ }
+
}
-} \ No newline at end of file
+}