1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-11-05 19:51:45 +00:00

spl: add spl:ssl/spl:es to main, fix cmd ids

This commit is contained in:
Michael Scire 2019-04-24 23:16:47 -07:00
parent f4a8124dc3
commit 0a194cb6a6
2 changed files with 8 additions and 2 deletions

View file

@ -25,6 +25,8 @@
#include "spl_random_service.hpp"
#include "spl_general_service.hpp"
#include "spl_crypto_service.hpp"
#include "spl_ssl_service.hpp"
#include "spl_es_service.hpp"
extern "C" {
extern u32 __start__;
@ -87,6 +89,8 @@ static SecureMonitorWrapper s_secmon_wrapper;
static const auto MakeRandomService = []() { return std::make_shared<RandomService>(&s_secmon_wrapper); };
static const auto MakeGeneralService = []() { return std::make_shared<GeneralService>(&s_secmon_wrapper); };
static const auto MakeCryptoService = []() { return std::make_shared<CryptoService>(&s_secmon_wrapper); };
static const auto MakeSslService = []() { return std::make_shared<SslService>(&s_secmon_wrapper); };
static const auto MakeEsService = []() { return std::make_shared<EsService>(&s_secmon_wrapper); };
int main(int argc, char **argv)
{
@ -103,6 +107,8 @@ int main(int argc, char **argv)
if (GetRuntimeFirmwareVersion() >= FirmwareVersion_400) {
s_server_manager.AddWaitable(new ServiceServer<GeneralService, +MakeGeneralService>("spl:", 9));
s_server_manager.AddWaitable(new ServiceServer<GeneralService, +MakeCryptoService>("spl:mig", 6));
s_server_manager.AddWaitable(new ServiceServer<GeneralService, +MakeCryptoService>("spl:ssl", 2));
s_server_manager.AddWaitable(new ServiceServer<GeneralService, +MakeCryptoService>("spl:es", 2));
/* TODO: Other services. */
} else {
/* TODO, DeprecatedGeneralService */

View file

@ -53,8 +53,8 @@ class SslService : public RsaService {
MakeServiceCommandMeta<Spl_Cmd_FreeAesKeyslot, &SslService::FreeAesKeyslot, FirmwareVersion_200>(),
MakeServiceCommandMeta<Spl_Cmd_GetAesKeyslotAvailableEvent, &SslService::GetAesKeyslotAvailableEvent, FirmwareVersion_200>(),
MakeServiceCommandMeta<Spl_Cmd_DecryptRsaPrivateKey, &SslService::DecryptRsaPrivateKey>(),
MakeServiceCommandMeta<Spl_Cmd_DecryptRsaPrivateKey, &SslService::ImportSslKey, FirmwareVersion_500>(),
MakeServiceCommandMeta<Spl_Cmd_DecryptRsaPrivateKey, &SslService::SslExpMod, FirmwareVersion_500>(),
MakeServiceCommandMeta<Spl_Cmd_ImportSslKey, &SslService::ImportSslKey, FirmwareVersion_500>(),
MakeServiceCommandMeta<Spl_Cmd_SslExpMod, &SslService::SslExpMod, FirmwareVersion_500>(),
};
};