ISslContext.cs 949 B

123456789101112131415161718192021222324252627
  1. using Ryujinx.Common.Logging;
  2. using System;
  3. namespace Ryujinx.HLE.HOS.Services.Ssl.SslService
  4. {
  5. class ISslContext : IpcService
  6. {
  7. public ISslContext(ServiceCtx context) { }
  8. [Command(4)]
  9. // ImportServerPki(nn::ssl::sf::CertificateFormat certificateFormat, buffer<bytes, 5> certificate) -> u64 certificateId
  10. public ResultCode ImportServerPki(ServiceCtx context)
  11. {
  12. int certificateFormat = context.RequestData.ReadInt32();
  13. long certificateDataPosition = context.Request.SendBuff[0].Position;
  14. long certificateDataSize = context.Request.SendBuff[0].Size;
  15. ulong certificateId = 1;
  16. context.ResponseData.Write(certificateId);
  17. Logger.Stub?.PrintStub(LogClass.ServiceSsl, new { certificateFormat, certificateDataPosition, certificateDataSize });
  18. return ResultCode.Success;
  19. }
  20. }
  21. }