1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-11-23 04:12:02 +00:00

Fix for 4.X units (new strato rework broke a method in spl) (#616)

* Fix for 4.X units (new strato rework broke a method in spl)

* Fixed formatting in spl
This commit is contained in:
Connor 2019-07-01 03:53:46 -07:00 committed by SciresM
parent e561919a52
commit 6f85b11fcc
6 changed files with 95 additions and 93 deletions

View file

@ -25,35 +25,36 @@ namespace sts::spl {
protected: protected:
enum class CommandId { enum class CommandId {
/* 1.0.0+ */ /* 1.0.0+ */
GetConfig = 0, GetConfig = 0,
ExpMod = 1, ExpMod = 1,
GenerateAesKek = 2, GenerateAesKek = 2,
LoadAesKey = 3, LoadAesKey = 3,
GenerateAesKey = 4, GenerateAesKey = 4,
SetConfig = 5, SetConfig = 5,
GenerateRandomBytes = 7, GenerateRandomBytes = 7,
ImportLotusKey = 9, ImportLotusKey = 9,
DecryptLotusMessage = 10, DecryptLotusMessage = 10,
IsDevelopment = 11, IsDevelopment = 11,
GenerateSpecificAesKey = 12, GenerateSpecificAesKey = 12,
DecryptRsaPrivateKey = 13, DecryptRsaPrivateKeyDeprecated = 13,
DecryptAesKey = 14, DecryptRsaPrivateKey = 13,
CryptAesCtrDeprecated = 15, DecryptAesKey = 14,
CryptAesCtr = 15, CryptAesCtrDeprecated = 15,
ComputeCmac = 16, CryptAesCtr = 15,
ImportEsKey = 17, ComputeCmac = 16,
UnwrapTitleKey = 18, ImportEsKey = 17,
LoadTitleKey = 19, UnwrapTitleKey = 18,
LoadTitleKey = 19,
/* 2.0.0+ */ /* 2.0.0+ */
UnwrapCommonTitleKey = 20, UnwrapCommonTitleKey = 20,
AllocateAesKeyslot = 21, AllocateAesKeyslot = 21,
FreeAesKeyslot = 22, FreeAesKeyslot = 22,
GetAesKeyslotAvailableEvent = 23, GetAesKeyslotAvailableEvent = 23,
/* 3.0.0+ */ /* 3.0.0+ */
SetBootReason = 24, SetBootReason = 24,
GetBootReason = 25, GetBootReason = 25,
}; };
public: public:
DeprecatedService() { /* ... */ } DeprecatedService() { /* ... */ }

View file

@ -43,26 +43,26 @@ namespace sts::spl {
MAKE_SERVICE_COMMAND_META(EsService, SetConfig), MAKE_SERVICE_COMMAND_META(EsService, SetConfig),
MAKE_SERVICE_COMMAND_META(EsService, GenerateRandomBytes), MAKE_SERVICE_COMMAND_META(EsService, GenerateRandomBytes),
MAKE_SERVICE_COMMAND_META(EsService, IsDevelopment), MAKE_SERVICE_COMMAND_META(EsService, IsDevelopment),
MAKE_SERVICE_COMMAND_META(EsService, SetBootReason, FirmwareVersion_300), MAKE_SERVICE_COMMAND_META(EsService, SetBootReason, FirmwareVersion_300),
MAKE_SERVICE_COMMAND_META(EsService, GetBootReason, FirmwareVersion_300), MAKE_SERVICE_COMMAND_META(EsService, GetBootReason, FirmwareVersion_300),
MAKE_SERVICE_COMMAND_META(EsService, GenerateAesKek), MAKE_SERVICE_COMMAND_META(EsService, GenerateAesKek),
MAKE_SERVICE_COMMAND_META(EsService, LoadAesKey), MAKE_SERVICE_COMMAND_META(EsService, LoadAesKey),
MAKE_SERVICE_COMMAND_META(EsService, GenerateAesKey), MAKE_SERVICE_COMMAND_META(EsService, GenerateAesKey),
MAKE_SERVICE_COMMAND_META(EsService, DecryptAesKey), MAKE_SERVICE_COMMAND_META(EsService, DecryptAesKey),
MAKE_SERVICE_COMMAND_META(EsService, CryptAesCtr), MAKE_SERVICE_COMMAND_META(EsService, CryptAesCtr),
MAKE_SERVICE_COMMAND_META(EsService, ComputeCmac), MAKE_SERVICE_COMMAND_META(EsService, ComputeCmac),
MAKE_SERVICE_COMMAND_META(EsService, AllocateAesKeyslot, FirmwareVersion_200), MAKE_SERVICE_COMMAND_META(EsService, AllocateAesKeyslot, FirmwareVersion_200),
MAKE_SERVICE_COMMAND_META(EsService, FreeAesKeyslot, FirmwareVersion_200), MAKE_SERVICE_COMMAND_META(EsService, FreeAesKeyslot, FirmwareVersion_200),
MAKE_SERVICE_COMMAND_META(EsService, GetAesKeyslotAvailableEvent, FirmwareVersion_200), MAKE_SERVICE_COMMAND_META(EsService, GetAesKeyslotAvailableEvent, FirmwareVersion_200),
MAKE_SERVICE_COMMAND_META(EsService, DecryptRsaPrivateKey, FirmwareVersion_400, FirmwareVersion_400), MAKE_SERVICE_COMMAND_META(EsService, DecryptRsaPrivateKeyDeprecated, FirmwareVersion_400, FirmwareVersion_400),
MAKE_SERVICE_COMMAND_META(EsService, DecryptRsaPrivateKey, FirmwareVersion_500), MAKE_SERVICE_COMMAND_META(EsService, DecryptRsaPrivateKey, FirmwareVersion_500),
MAKE_SERVICE_COMMAND_META(EsService, ImportEsKey), MAKE_SERVICE_COMMAND_META(EsService, ImportEsKey),
MAKE_SERVICE_COMMAND_META(EsService, UnwrapTitleKey), MAKE_SERVICE_COMMAND_META(EsService, UnwrapTitleKey),
MAKE_SERVICE_COMMAND_META(EsService, UnwrapCommonTitleKey, FirmwareVersion_200), MAKE_SERVICE_COMMAND_META(EsService, UnwrapCommonTitleKey, FirmwareVersion_200),
MAKE_SERVICE_COMMAND_META(EsService, ImportDrmKey, FirmwareVersion_500), MAKE_SERVICE_COMMAND_META(EsService, ImportDrmKey, FirmwareVersion_500),
MAKE_SERVICE_COMMAND_META(EsService, DrmExpMod, FirmwareVersion_500), MAKE_SERVICE_COMMAND_META(EsService, DrmExpMod, FirmwareVersion_500),
MAKE_SERVICE_COMMAND_META(EsService, UnwrapElicenseKey, FirmwareVersion_600), MAKE_SERVICE_COMMAND_META(EsService, UnwrapElicenseKey, FirmwareVersion_600),
MAKE_SERVICE_COMMAND_META(EsService, LoadElicenseKey, FirmwareVersion_600), MAKE_SERVICE_COMMAND_META(EsService, LoadElicenseKey, FirmwareVersion_600),
}; };
}; };

View file

@ -25,46 +25,47 @@ namespace sts::spl {
protected: protected:
enum class CommandId { enum class CommandId {
/* 1.0.0+ */ /* 1.0.0+ */
GetConfig = 0, GetConfig = 0,
ExpMod = 1, ExpMod = 1,
GenerateAesKek = 2, GenerateAesKek = 2,
LoadAesKey = 3, LoadAesKey = 3,
GenerateAesKey = 4, GenerateAesKey = 4,
SetConfig = 5, SetConfig = 5,
GenerateRandomBytes = 7, GenerateRandomBytes = 7,
ImportLotusKey = 9, ImportLotusKey = 9,
DecryptLotusMessage = 10, DecryptLotusMessage = 10,
IsDevelopment = 11, IsDevelopment = 11,
GenerateSpecificAesKey = 12, GenerateSpecificAesKey = 12,
DecryptRsaPrivateKey = 13, DecryptRsaPrivateKeyDeprecated = 13,
DecryptAesKey = 14, DecryptRsaPrivateKey = 13,
CryptAesCtr = 15, DecryptAesKey = 14,
ComputeCmac = 16, CryptAesCtr = 15,
ImportEsKey = 17, ComputeCmac = 16,
UnwrapTitleKey = 18, ImportEsKey = 17,
LoadTitleKey = 19, UnwrapTitleKey = 18,
LoadTitleKey = 19,
/* 2.0.0+ */ /* 2.0.0+ */
UnwrapCommonTitleKey = 20, UnwrapCommonTitleKey = 20,
AllocateAesKeyslot = 21, AllocateAesKeyslot = 21,
FreeAesKeyslot = 22, FreeAesKeyslot = 22,
GetAesKeyslotAvailableEvent = 23, GetAesKeyslotAvailableEvent = 23,
/* 3.0.0+ */ /* 3.0.0+ */
SetBootReason = 24, SetBootReason = 24,
GetBootReason = 25, GetBootReason = 25,
/* 5.0.0+ */ /* 5.0.0+ */
ImportSslKey = 26, ImportSslKey = 26,
SslExpMod = 27, SslExpMod = 27,
ImportDrmKey = 28, ImportDrmKey = 28,
DrmExpMod = 29, DrmExpMod = 29,
ReEncryptRsaPrivateKey = 30, ReEncryptRsaPrivateKey = 30,
GetPackage2Hash = 31, GetPackage2Hash = 31,
/* 6.0.0+ */ /* 6.0.0+ */
UnwrapElicenseKey = 31, /* re-used command id :( */ UnwrapElicenseKey = 31, /* re-used command id :( */
LoadElicenseKey = 32, LoadElicenseKey = 32,
}; };
public: public:
GeneralService() { /* ... */ } GeneralService() { /* ... */ }

View file

@ -38,20 +38,20 @@ namespace sts::spl {
MAKE_SERVICE_COMMAND_META(ManuService, SetConfig), MAKE_SERVICE_COMMAND_META(ManuService, SetConfig),
MAKE_SERVICE_COMMAND_META(ManuService, GenerateRandomBytes), MAKE_SERVICE_COMMAND_META(ManuService, GenerateRandomBytes),
MAKE_SERVICE_COMMAND_META(ManuService, IsDevelopment), MAKE_SERVICE_COMMAND_META(ManuService, IsDevelopment),
MAKE_SERVICE_COMMAND_META(ManuService, SetBootReason, FirmwareVersion_300), MAKE_SERVICE_COMMAND_META(ManuService, SetBootReason, FirmwareVersion_300),
MAKE_SERVICE_COMMAND_META(ManuService, GetBootReason, FirmwareVersion_300), MAKE_SERVICE_COMMAND_META(ManuService, GetBootReason, FirmwareVersion_300),
MAKE_SERVICE_COMMAND_META(ManuService, GenerateAesKek), MAKE_SERVICE_COMMAND_META(ManuService, GenerateAesKek),
MAKE_SERVICE_COMMAND_META(ManuService, LoadAesKey), MAKE_SERVICE_COMMAND_META(ManuService, LoadAesKey),
MAKE_SERVICE_COMMAND_META(ManuService, GenerateAesKey), MAKE_SERVICE_COMMAND_META(ManuService, GenerateAesKey),
MAKE_SERVICE_COMMAND_META(ManuService, DecryptAesKey), MAKE_SERVICE_COMMAND_META(ManuService, DecryptAesKey),
MAKE_SERVICE_COMMAND_META(ManuService, CryptAesCtr), MAKE_SERVICE_COMMAND_META(ManuService, CryptAesCtr),
MAKE_SERVICE_COMMAND_META(ManuService, ComputeCmac), MAKE_SERVICE_COMMAND_META(ManuService, ComputeCmac),
MAKE_SERVICE_COMMAND_META(ManuService, AllocateAesKeyslot, FirmwareVersion_200), MAKE_SERVICE_COMMAND_META(ManuService, AllocateAesKeyslot, FirmwareVersion_200),
MAKE_SERVICE_COMMAND_META(ManuService, FreeAesKeyslot, FirmwareVersion_200), MAKE_SERVICE_COMMAND_META(ManuService, FreeAesKeyslot, FirmwareVersion_200),
MAKE_SERVICE_COMMAND_META(ManuService, GetAesKeyslotAvailableEvent, FirmwareVersion_200), MAKE_SERVICE_COMMAND_META(ManuService, GetAesKeyslotAvailableEvent, FirmwareVersion_200),
MAKE_SERVICE_COMMAND_META(ManuService, DecryptRsaPrivateKey, FirmwareVersion_400, FirmwareVersion_400), MAKE_SERVICE_COMMAND_META(ManuService, DecryptRsaPrivateKeyDeprecated, FirmwareVersion_400, FirmwareVersion_400),
MAKE_SERVICE_COMMAND_META(ManuService, DecryptRsaPrivateKey, FirmwareVersion_500), MAKE_SERVICE_COMMAND_META(ManuService, DecryptRsaPrivateKey, FirmwareVersion_500),
MAKE_SERVICE_COMMAND_META(ManuService, ReEncryptRsaPrivateKey, FirmwareVersion_500), MAKE_SERVICE_COMMAND_META(ManuService, ReEncryptRsaPrivateKey, FirmwareVersion_500),
}; };
}; };

View file

@ -38,19 +38,19 @@ namespace sts::spl {
MAKE_SERVICE_COMMAND_META(RsaService, SetConfig), MAKE_SERVICE_COMMAND_META(RsaService, SetConfig),
MAKE_SERVICE_COMMAND_META(RsaService, GenerateRandomBytes), MAKE_SERVICE_COMMAND_META(RsaService, GenerateRandomBytes),
MAKE_SERVICE_COMMAND_META(RsaService, IsDevelopment), MAKE_SERVICE_COMMAND_META(RsaService, IsDevelopment),
MAKE_SERVICE_COMMAND_META(RsaService, SetBootReason, FirmwareVersion_300), MAKE_SERVICE_COMMAND_META(RsaService, SetBootReason, FirmwareVersion_300),
MAKE_SERVICE_COMMAND_META(RsaService, GetBootReason, FirmwareVersion_300), MAKE_SERVICE_COMMAND_META(RsaService, GetBootReason, FirmwareVersion_300),
MAKE_SERVICE_COMMAND_META(RsaService, GenerateAesKek), MAKE_SERVICE_COMMAND_META(RsaService, GenerateAesKek),
MAKE_SERVICE_COMMAND_META(RsaService, LoadAesKey), MAKE_SERVICE_COMMAND_META(RsaService, LoadAesKey),
MAKE_SERVICE_COMMAND_META(RsaService, GenerateAesKey), MAKE_SERVICE_COMMAND_META(RsaService, GenerateAesKey),
MAKE_SERVICE_COMMAND_META(RsaService, DecryptAesKey), MAKE_SERVICE_COMMAND_META(RsaService, DecryptAesKey),
MAKE_SERVICE_COMMAND_META(RsaService, CryptAesCtr), MAKE_SERVICE_COMMAND_META(RsaService, CryptAesCtr),
MAKE_SERVICE_COMMAND_META(RsaService, ComputeCmac), MAKE_SERVICE_COMMAND_META(RsaService, ComputeCmac),
MAKE_SERVICE_COMMAND_META(RsaService, AllocateAesKeyslot, FirmwareVersion_200), MAKE_SERVICE_COMMAND_META(RsaService, AllocateAesKeyslot, FirmwareVersion_200),
MAKE_SERVICE_COMMAND_META(RsaService, FreeAesKeyslot, FirmwareVersion_200), MAKE_SERVICE_COMMAND_META(RsaService, FreeAesKeyslot, FirmwareVersion_200),
MAKE_SERVICE_COMMAND_META(RsaService, GetAesKeyslotAvailableEvent, FirmwareVersion_200), MAKE_SERVICE_COMMAND_META(RsaService, GetAesKeyslotAvailableEvent, FirmwareVersion_200),
MAKE_SERVICE_COMMAND_META(RsaService, DecryptRsaPrivateKey, FirmwareVersion_400, FirmwareVersion_400), MAKE_SERVICE_COMMAND_META(RsaService, DecryptRsaPrivateKeyDeprecated, FirmwareVersion_400, FirmwareVersion_400),
MAKE_SERVICE_COMMAND_META(RsaService, DecryptRsaPrivateKey, FirmwareVersion_500), MAKE_SERVICE_COMMAND_META(RsaService, DecryptRsaPrivateKey, FirmwareVersion_500),
}; };
}; };

View file

@ -38,21 +38,21 @@ namespace sts::spl {
MAKE_SERVICE_COMMAND_META(SslService, SetConfig), MAKE_SERVICE_COMMAND_META(SslService, SetConfig),
MAKE_SERVICE_COMMAND_META(SslService, GenerateRandomBytes), MAKE_SERVICE_COMMAND_META(SslService, GenerateRandomBytes),
MAKE_SERVICE_COMMAND_META(SslService, IsDevelopment), MAKE_SERVICE_COMMAND_META(SslService, IsDevelopment),
MAKE_SERVICE_COMMAND_META(SslService, SetBootReason, FirmwareVersion_300), MAKE_SERVICE_COMMAND_META(SslService, SetBootReason, FirmwareVersion_300),
MAKE_SERVICE_COMMAND_META(SslService, GetBootReason, FirmwareVersion_300), MAKE_SERVICE_COMMAND_META(SslService, GetBootReason, FirmwareVersion_300),
MAKE_SERVICE_COMMAND_META(SslService, GenerateAesKek), MAKE_SERVICE_COMMAND_META(SslService, GenerateAesKek),
MAKE_SERVICE_COMMAND_META(SslService, LoadAesKey), MAKE_SERVICE_COMMAND_META(SslService, LoadAesKey),
MAKE_SERVICE_COMMAND_META(SslService, GenerateAesKey), MAKE_SERVICE_COMMAND_META(SslService, GenerateAesKey),
MAKE_SERVICE_COMMAND_META(SslService, DecryptAesKey), MAKE_SERVICE_COMMAND_META(SslService, DecryptAesKey),
MAKE_SERVICE_COMMAND_META(SslService, CryptAesCtr), MAKE_SERVICE_COMMAND_META(SslService, CryptAesCtr),
MAKE_SERVICE_COMMAND_META(SslService, ComputeCmac), MAKE_SERVICE_COMMAND_META(SslService, ComputeCmac),
MAKE_SERVICE_COMMAND_META(SslService, AllocateAesKeyslot, FirmwareVersion_200), MAKE_SERVICE_COMMAND_META(SslService, AllocateAesKeyslot, FirmwareVersion_200),
MAKE_SERVICE_COMMAND_META(SslService, FreeAesKeyslot, FirmwareVersion_200), MAKE_SERVICE_COMMAND_META(SslService, FreeAesKeyslot, FirmwareVersion_200),
MAKE_SERVICE_COMMAND_META(SslService, GetAesKeyslotAvailableEvent, FirmwareVersion_200), MAKE_SERVICE_COMMAND_META(SslService, GetAesKeyslotAvailableEvent, FirmwareVersion_200),
MAKE_SERVICE_COMMAND_META(SslService, DecryptRsaPrivateKey, FirmwareVersion_400, FirmwareVersion_400), MAKE_SERVICE_COMMAND_META(SslService, DecryptRsaPrivateKeyDeprecated, FirmwareVersion_400, FirmwareVersion_400),
MAKE_SERVICE_COMMAND_META(SslService, DecryptRsaPrivateKey, FirmwareVersion_500), MAKE_SERVICE_COMMAND_META(SslService, DecryptRsaPrivateKey, FirmwareVersion_500),
MAKE_SERVICE_COMMAND_META(SslService, ImportSslKey, FirmwareVersion_500), MAKE_SERVICE_COMMAND_META(SslService, ImportSslKey, FirmwareVersion_500),
MAKE_SERVICE_COMMAND_META(SslService, SslExpMod, FirmwareVersion_500), MAKE_SERVICE_COMMAND_META(SslService, SslExpMod, FirmwareVersion_500),
}; };
}; };