Add an empty ISslContext service

This commit is contained in:
Billy Laws 2020-08-09 14:44:33 +01:00 committed by ◱ PixelyIon
parent 7503496bb0
commit 94d1b40faf
4 changed files with 37 additions and 0 deletions

View File

@ -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", {
}) {}
}

View File

@ -0,0 +1,17 @@
// SPDX-License-Identifier: MPL-2.0
// Copyright © 2020 Skyline Team and Contributors (https://github.com/skyline-emu/)
#pragma once
#include <services/base_service.h>
#include <services/serviceman.h>
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);
};
}

View File

@ -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) {}
}

View File

@ -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)
*/