ISslService.cs 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. using Ryujinx.Common.Logging;
  2. using Ryujinx.HLE.HOS.Services.Ssl.SslService;
  3. using Ryujinx.HLE.HOS.Services.Ssl.Types;
  4. namespace Ryujinx.HLE.HOS.Services.Ssl
  5. {
  6. [Service("ssl")]
  7. class ISslService : IpcService
  8. {
  9. // NOTE: The SSL service is used by games to connect it to various official online services, which we do not intend to support.
  10. // In this case it is acceptable to stub all calls of the service.
  11. public ISslService(ServiceCtx context) { }
  12. [CommandHipc(0)]
  13. // CreateContext(nn::ssl::sf::SslVersion, u64, pid) -> object<nn::ssl::sf::ISslContext>
  14. public ResultCode CreateContext(ServiceCtx context)
  15. {
  16. SslVersion sslVersion = (SslVersion)context.RequestData.ReadUInt32();
  17. ulong pidPlaceholder = context.RequestData.ReadUInt64();
  18. MakeObject(context, new ISslContext(context));
  19. Logger.Stub?.PrintStub(LogClass.ServiceSsl, new { sslVersion });
  20. return ResultCode.Success;
  21. }
  22. [CommandHipc(5)]
  23. // SetInterfaceVersion(u32)
  24. public ResultCode SetInterfaceVersion(ServiceCtx context)
  25. {
  26. // 1 = 3.0.0+, 2 = 5.0.0+, 3 = 6.0.0+
  27. uint interfaceVersion = context.RequestData.ReadUInt32();
  28. Logger.Stub?.PrintStub(LogClass.ServiceSsl, new { interfaceVersion });
  29. return ResultCode.Success;
  30. }
  31. }
  32. }