From 4ab8699cd436a1e66dda1dc2817b22c985751fcf Mon Sep 17 00:00:00 2001 From: Dima Date: Mon, 21 Nov 2022 16:42:29 +0300 Subject: [PATCH] Stub ImportServerPki --- .../main/cpp/skyline/services/ssl/ISslContext.cpp | 12 ++++++++++++ app/src/main/cpp/skyline/services/ssl/ISslContext.h | 9 +++++++++ 2 files changed, 21 insertions(+) diff --git a/app/src/main/cpp/skyline/services/ssl/ISslContext.cpp b/app/src/main/cpp/skyline/services/ssl/ISslContext.cpp index 4c4c6484..eb0adba7 100644 --- a/app/src/main/cpp/skyline/services/ssl/ISslContext.cpp +++ b/app/src/main/cpp/skyline/services/ssl/ISslContext.cpp @@ -5,4 +5,16 @@ namespace skyline::service::ssl { ISslContext::ISslContext(const DeviceState &state, ServiceManager &manager) : BaseService(state, manager) {} + + Result ISslContext::ImportServerPki(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) { + enum class CertificateFormat : u32 { + Pem = 1, + Der = 2, + } certificateFormat{request.Pop()}; + + Logger::Debug("Certificate format: {}", certificateFormat); + + response.Push(0); + return {}; + } } diff --git a/app/src/main/cpp/skyline/services/ssl/ISslContext.h b/app/src/main/cpp/skyline/services/ssl/ISslContext.h index 1d4eb5c4..15dd589c 100644 --- a/app/src/main/cpp/skyline/services/ssl/ISslContext.h +++ b/app/src/main/cpp/skyline/services/ssl/ISslContext.h @@ -13,5 +13,14 @@ namespace skyline::service::ssl { class ISslContext : public BaseService { public: ISslContext(const DeviceState &state, ServiceManager &manager); + + /** + * @url https://switchbrew.org/wiki/SSL_services#ImportServerPki + */ + Result ImportServerPki(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); + + SERVICE_DECL( + SFUNC(0x4, ISslContext, ImportServerPki) + ) }; }