diff --git a/app/src/main/cpp/skyline/services/ssl/ISslContext.cpp b/app/src/main/cpp/skyline/services/ssl/ISslContext.cpp new file mode 100644 index 00000000..03afb05f --- /dev/null +++ b/app/src/main/cpp/skyline/services/ssl/ISslContext.cpp @@ -0,0 +1,9 @@ +// SPDX-License-Identifier: MPL-2.0 +// Copyright © 2020 Skyline Team and Contributors (https://github.com/skyline-emu/) + +#include "ISslContext.h" + +namespace skyline::service::ssl { + ISslContext::ISslContext(const DeviceState &state, ServiceManager &manager) : BaseService(state, manager, Service::ssl_ISslContext, "ssl:ISslContext", { + }) {} +} diff --git a/app/src/main/cpp/skyline/services/ssl/ISslContext.h b/app/src/main/cpp/skyline/services/ssl/ISslContext.h new file mode 100644 index 00000000..f56487de --- /dev/null +++ b/app/src/main/cpp/skyline/services/ssl/ISslContext.h @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: MPL-2.0 +// Copyright © 2020 Skyline Team and Contributors (https://github.com/skyline-emu/) + +#pragma once + +#include +#include + +namespace skyline::service::ssl { + /** + * @brief ISslContext is used to manage SSL certificates (https://switchbrew.org/wiki/SSL_services#ISslContext) + */ + class ISslContext : public BaseService { + public: + ISslContext(const DeviceState &state, ServiceManager &manager); + }; +} diff --git a/app/src/main/cpp/skyline/services/ssl/ISslService.cpp b/app/src/main/cpp/skyline/services/ssl/ISslService.cpp index e3e9f3c4..459b0a72 100644 --- a/app/src/main/cpp/skyline/services/ssl/ISslService.cpp +++ b/app/src/main/cpp/skyline/services/ssl/ISslService.cpp @@ -1,12 +1,18 @@ // SPDX-License-Identifier: MPL-2.0 // Copyright © 2020 Skyline Team and Contributors (https://github.com/skyline-emu/) +#include "ISslContext.h" #include "ISslService.h" namespace skyline::service::ssl { ISslService::ISslService(const DeviceState &state, ServiceManager &manager) : BaseService(state, manager, Service::ssl_ISslService, "ssl:ISslService", { + {0x0, SFUNC(ISslService::CreateContext)}, {0x5, SFUNC(ISslService::SetInterfaceVersion)} }) {} + void ISslService::CreateContext(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) { + manager.RegisterService(SRVREG(ISslContext), session, response); + } + void ISslService::SetInterfaceVersion(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {} } diff --git a/app/src/main/cpp/skyline/services/ssl/ISslService.h b/app/src/main/cpp/skyline/services/ssl/ISslService.h index 6ed77acd..7b694f3a 100644 --- a/app/src/main/cpp/skyline/services/ssl/ISslService.h +++ b/app/src/main/cpp/skyline/services/ssl/ISslService.h @@ -14,6 +14,11 @@ namespace skyline::service::ssl { public: ISslService(const DeviceState &state, ServiceManager &manager); + /** + * @brief This creates an SSL context (https://switchbrew.org/wiki/SSL_services#CreateContext) + */ + void CreateContext(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); + /** * @brief This sets the SSL interface version (https://switchbrew.org/wiki/SSL_services#SetInterfaceVersion) */