2018-10-17 13:15:50 -04:00
|
|
|
using Ryujinx.Common.Logging;
|
2019-09-18 20:45:11 -04:00
|
|
|
using Ryujinx.HLE.HOS.Services.Ssl.SslService;
|
2018-02-27 22:31:52 -05:00
|
|
|
|
2018-08-16 19:47:36 -04:00
|
|
|
namespace Ryujinx.HLE.HOS.Services.Ssl
|
2018-02-27 22:31:52 -05:00
|
|
|
{
|
2019-07-10 11:59:54 -04:00
|
|
|
[Service("ssl")]
|
2018-04-06 00:01:52 -04:00
|
|
|
class ISslService : IpcService
|
2018-02-27 22:31:52 -05:00
|
|
|
{
|
2019-07-11 21:13:43 -04:00
|
|
|
public ISslService(ServiceCtx context) { }
|
2018-06-02 18:46:09 -04:00
|
|
|
|
2019-07-11 21:13:43 -04:00
|
|
|
[Command(0)]
|
2018-10-06 18:16:42 -04:00
|
|
|
// CreateContext(nn::ssl::sf::SslVersion, u64, pid) -> object<nn::ssl::sf::ISslContext>
|
2019-07-14 15:04:38 -04:00
|
|
|
public ResultCode CreateContext(ServiceCtx context)
|
2018-10-06 18:16:42 -04:00
|
|
|
{
|
2018-12-06 06:16:24 -05:00
|
|
|
int sslVersion = context.RequestData.ReadInt32();
|
|
|
|
long unknown = context.RequestData.ReadInt64();
|
2018-10-06 18:16:42 -04:00
|
|
|
|
2019-01-10 19:11:46 -05:00
|
|
|
Logger.PrintStub(LogClass.ServiceSsl, new { sslVersion, unknown });
|
2018-10-06 18:16:42 -04:00
|
|
|
|
2020-06-06 07:04:30 -04:00
|
|
|
MakeObject(context, new ISslContext(context));
|
2018-10-06 18:16:42 -04:00
|
|
|
|
2019-07-14 15:04:38 -04:00
|
|
|
return ResultCode.Success;
|
2018-10-06 18:16:42 -04:00
|
|
|
}
|
|
|
|
|
2019-07-11 21:13:43 -04:00
|
|
|
[Command(5)]
|
2018-10-06 18:16:42 -04:00
|
|
|
// SetInterfaceVersion(u32)
|
2019-07-14 15:04:38 -04:00
|
|
|
public ResultCode SetInterfaceVersion(ServiceCtx context)
|
2018-06-02 18:46:09 -04:00
|
|
|
{
|
2018-12-06 06:16:24 -05:00
|
|
|
int version = context.RequestData.ReadInt32();
|
2018-06-02 18:46:09 -04:00
|
|
|
|
2019-01-10 19:11:46 -05:00
|
|
|
Logger.PrintStub(LogClass.ServiceSsl, new { version });
|
2018-06-02 18:46:09 -04:00
|
|
|
|
2019-07-14 15:04:38 -04:00
|
|
|
return ResultCode.Success;
|
2018-06-02 18:46:09 -04:00
|
|
|
}
|
2018-02-27 22:31:52 -05:00
|
|
|
}
|
|
|
|
}
|