diff options
Diffstat (limited to 'src/core/hle/service/ssl/ssl.cpp')
| -rw-r--r-- | src/core/hle/service/ssl/ssl.cpp | 41 |
1 files changed, 22 insertions, 19 deletions
diff --git a/src/core/hle/service/ssl/ssl.cpp b/src/core/hle/service/ssl/ssl.cpp index 999efd4295..4f36aba2f8 100644 --- a/src/core/hle/service/ssl/ssl.cpp +++ b/src/core/hle/service/ssl/ssl.cpp @@ -636,7 +636,7 @@ class ISslServiceForSystem final : public ServiceFramework<ISslServiceForSystem> explicit ISslServiceForSystem(Core::System& system_) : ServiceFramework{system_, "ssl:s"} { // clang-format off static const FunctionInfo functions[] = { - {0, D<&ISslServiceForSystem::CreateContext>, "CreateContext"}, + {0, &ISslServiceForSystem::CreateContext, "CreateContext"}, {1, D<&ISslServiceForSystem::GetContextCount>, "GetContextCount"}, {2, D<&ISslServiceForSystem::GetCertificates>, "GetCertificates"}, {3, D<&ISslServiceForSystem::GetCertificateBufSize>, "GetCertificateBufSize"}, @@ -646,7 +646,7 @@ class ISslServiceForSystem final : public ServiceFramework<ISslServiceForSystem> {7, D<&ISslServiceForSystem::SetDebugOption>, "SetDebugOption"}, {8, D<&ISslServiceForSystem::GetDebugOption>, "GetDebugOption"}, {9, D<&ISslServiceForSystem::ClearTls12FallbackFlag>, "ClearTls12FallbackFlag"}, - {100, D<&ISslServiceForSystem::CreateContextForSystem>, "CreateContextForSystem"}, + {100, &ISslServiceForSystem::CreateContext, "CreateContextForSystem"}, {101, D<&ISslServiceForSystem::SetThreadCoreMask>, "SetThreadCoreMask"}, {102, D<&ISslServiceForSystem::GetThreadCoreMask>, "GetThreadCoreMask"}, {103, D<&ISslServiceForSystem::VerifySignature>, "VerifySignature"} @@ -656,13 +656,26 @@ class ISslServiceForSystem final : public ServiceFramework<ISslServiceForSystem> RegisterHandlers(functions); }; - Result CreateContext() { - LOG_DEBUG(Service_SSL, "(STUBBED) called."); + // 0 and 100(SslVersion, padding, u64 pid placeholder; pid): an ISslContext, like ssl's + // CreateContext. The empty reply returned no object, so the caller got handle 0 + // (Minecraft calls 100). + void CreateContext(HLERequestContext& ctx) { + struct Parameters { + SslVersion ssl_version; + INSERT_PADDING_BYTES(0x4); + u64 pid_placeholder; + }; + static_assert(sizeof(Parameters) == 0x10, "Parameters is an invalid size"); - // TODO (jarrodnorwell) + IPC::RequestParser rp{ctx}; + const auto parameters = rp.PopRaw<Parameters>(); + LOG_WARNING(Service_SSL, "(STUBBED) called, command={}, api_version={}", ctx.GetCommand(), + parameters.ssl_version.api_version); - return ResultSuccess; - }; + IPC::ResponseBuilder rb{ctx, 2, 0, 1}; + rb.Push(ResultSuccess); + rb.PushIpcInterface<ISslContext>(ctx, system, parameters.ssl_version); + } Result GetContextCount() { LOG_DEBUG(Service_SSL, "(STUBBED) called."); @@ -736,14 +749,6 @@ class ISslServiceForSystem final : public ServiceFramework<ISslServiceForSystem> return ResultSuccess; }; - Result CreateContextForSystem() { - LOG_DEBUG(Service_SSL, "(STUBBED) called."); - - // TODO (jarrodnorwell) - - return ResultSuccess; - }; - Result SetThreadCoreMask() { LOG_DEBUG(Service_SSL, "(STUBBED) called."); @@ -752,11 +757,9 @@ class ISslServiceForSystem final : public ServiceFramework<ISslServiceForSystem> return ResultSuccess; }; - Result GetThreadCoreMask() { + Result GetThreadCoreMask(Out<u64> out_mask) { LOG_DEBUG(Service_SSL, "(STUBBED) called."); - - // TODO (jarrodnorwell) - + *out_mask = 0; return ResultSuccess; }; |
