mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-11-09 22:56:35 +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:
parent
e561919a52
commit
6f85b11fcc
6 changed files with 95 additions and 93 deletions
|
@ -25,35 +25,36 @@ namespace sts::spl {
|
|||
protected:
|
||||
enum class CommandId {
|
||||
/* 1.0.0+ */
|
||||
GetConfig = 0,
|
||||
ExpMod = 1,
|
||||
GenerateAesKek = 2,
|
||||
LoadAesKey = 3,
|
||||
GenerateAesKey = 4,
|
||||
SetConfig = 5,
|
||||
GenerateRandomBytes = 7,
|
||||
ImportLotusKey = 9,
|
||||
DecryptLotusMessage = 10,
|
||||
IsDevelopment = 11,
|
||||
GenerateSpecificAesKey = 12,
|
||||
DecryptRsaPrivateKey = 13,
|
||||
DecryptAesKey = 14,
|
||||
CryptAesCtrDeprecated = 15,
|
||||
CryptAesCtr = 15,
|
||||
ComputeCmac = 16,
|
||||
ImportEsKey = 17,
|
||||
UnwrapTitleKey = 18,
|
||||
LoadTitleKey = 19,
|
||||
GetConfig = 0,
|
||||
ExpMod = 1,
|
||||
GenerateAesKek = 2,
|
||||
LoadAesKey = 3,
|
||||
GenerateAesKey = 4,
|
||||
SetConfig = 5,
|
||||
GenerateRandomBytes = 7,
|
||||
ImportLotusKey = 9,
|
||||
DecryptLotusMessage = 10,
|
||||
IsDevelopment = 11,
|
||||
GenerateSpecificAesKey = 12,
|
||||
DecryptRsaPrivateKeyDeprecated = 13,
|
||||
DecryptRsaPrivateKey = 13,
|
||||
DecryptAesKey = 14,
|
||||
CryptAesCtrDeprecated = 15,
|
||||
CryptAesCtr = 15,
|
||||
ComputeCmac = 16,
|
||||
ImportEsKey = 17,
|
||||
UnwrapTitleKey = 18,
|
||||
LoadTitleKey = 19,
|
||||
|
||||
/* 2.0.0+ */
|
||||
UnwrapCommonTitleKey = 20,
|
||||
AllocateAesKeyslot = 21,
|
||||
FreeAesKeyslot = 22,
|
||||
GetAesKeyslotAvailableEvent = 23,
|
||||
UnwrapCommonTitleKey = 20,
|
||||
AllocateAesKeyslot = 21,
|
||||
FreeAesKeyslot = 22,
|
||||
GetAesKeyslotAvailableEvent = 23,
|
||||
|
||||
/* 3.0.0+ */
|
||||
SetBootReason = 24,
|
||||
GetBootReason = 25,
|
||||
SetBootReason = 24,
|
||||
GetBootReason = 25,
|
||||
};
|
||||
public:
|
||||
DeprecatedService() { /* ... */ }
|
||||
|
|
|
@ -43,26 +43,26 @@ namespace sts::spl {
|
|||
MAKE_SERVICE_COMMAND_META(EsService, SetConfig),
|
||||
MAKE_SERVICE_COMMAND_META(EsService, GenerateRandomBytes),
|
||||
MAKE_SERVICE_COMMAND_META(EsService, IsDevelopment),
|
||||
MAKE_SERVICE_COMMAND_META(EsService, SetBootReason, FirmwareVersion_300),
|
||||
MAKE_SERVICE_COMMAND_META(EsService, GetBootReason, FirmwareVersion_300),
|
||||
MAKE_SERVICE_COMMAND_META(EsService, SetBootReason, FirmwareVersion_300),
|
||||
MAKE_SERVICE_COMMAND_META(EsService, GetBootReason, FirmwareVersion_300),
|
||||
MAKE_SERVICE_COMMAND_META(EsService, GenerateAesKek),
|
||||
MAKE_SERVICE_COMMAND_META(EsService, LoadAesKey),
|
||||
MAKE_SERVICE_COMMAND_META(EsService, GenerateAesKey),
|
||||
MAKE_SERVICE_COMMAND_META(EsService, DecryptAesKey),
|
||||
MAKE_SERVICE_COMMAND_META(EsService, CryptAesCtr),
|
||||
MAKE_SERVICE_COMMAND_META(EsService, ComputeCmac),
|
||||
MAKE_SERVICE_COMMAND_META(EsService, AllocateAesKeyslot, FirmwareVersion_200),
|
||||
MAKE_SERVICE_COMMAND_META(EsService, FreeAesKeyslot, 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, DecryptRsaPrivateKey, FirmwareVersion_500),
|
||||
MAKE_SERVICE_COMMAND_META(EsService, AllocateAesKeyslot, FirmwareVersion_200),
|
||||
MAKE_SERVICE_COMMAND_META(EsService, FreeAesKeyslot, FirmwareVersion_200),
|
||||
MAKE_SERVICE_COMMAND_META(EsService, GetAesKeyslotAvailableEvent, FirmwareVersion_200),
|
||||
MAKE_SERVICE_COMMAND_META(EsService, DecryptRsaPrivateKeyDeprecated, FirmwareVersion_400, FirmwareVersion_400),
|
||||
MAKE_SERVICE_COMMAND_META(EsService, DecryptRsaPrivateKey, FirmwareVersion_500),
|
||||
MAKE_SERVICE_COMMAND_META(EsService, ImportEsKey),
|
||||
MAKE_SERVICE_COMMAND_META(EsService, UnwrapTitleKey),
|
||||
MAKE_SERVICE_COMMAND_META(EsService, UnwrapCommonTitleKey, FirmwareVersion_200),
|
||||
MAKE_SERVICE_COMMAND_META(EsService, ImportDrmKey, FirmwareVersion_500),
|
||||
MAKE_SERVICE_COMMAND_META(EsService, DrmExpMod, FirmwareVersion_500),
|
||||
MAKE_SERVICE_COMMAND_META(EsService, UnwrapElicenseKey, FirmwareVersion_600),
|
||||
MAKE_SERVICE_COMMAND_META(EsService, LoadElicenseKey, FirmwareVersion_600),
|
||||
MAKE_SERVICE_COMMAND_META(EsService, UnwrapCommonTitleKey, FirmwareVersion_200),
|
||||
MAKE_SERVICE_COMMAND_META(EsService, ImportDrmKey, FirmwareVersion_500),
|
||||
MAKE_SERVICE_COMMAND_META(EsService, DrmExpMod, FirmwareVersion_500),
|
||||
MAKE_SERVICE_COMMAND_META(EsService, UnwrapElicenseKey, FirmwareVersion_600),
|
||||
MAKE_SERVICE_COMMAND_META(EsService, LoadElicenseKey, FirmwareVersion_600),
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -25,46 +25,47 @@ namespace sts::spl {
|
|||
protected:
|
||||
enum class CommandId {
|
||||
/* 1.0.0+ */
|
||||
GetConfig = 0,
|
||||
ExpMod = 1,
|
||||
GenerateAesKek = 2,
|
||||
LoadAesKey = 3,
|
||||
GenerateAesKey = 4,
|
||||
SetConfig = 5,
|
||||
GenerateRandomBytes = 7,
|
||||
ImportLotusKey = 9,
|
||||
DecryptLotusMessage = 10,
|
||||
IsDevelopment = 11,
|
||||
GenerateSpecificAesKey = 12,
|
||||
DecryptRsaPrivateKey = 13,
|
||||
DecryptAesKey = 14,
|
||||
CryptAesCtr = 15,
|
||||
ComputeCmac = 16,
|
||||
ImportEsKey = 17,
|
||||
UnwrapTitleKey = 18,
|
||||
LoadTitleKey = 19,
|
||||
GetConfig = 0,
|
||||
ExpMod = 1,
|
||||
GenerateAesKek = 2,
|
||||
LoadAesKey = 3,
|
||||
GenerateAesKey = 4,
|
||||
SetConfig = 5,
|
||||
GenerateRandomBytes = 7,
|
||||
ImportLotusKey = 9,
|
||||
DecryptLotusMessage = 10,
|
||||
IsDevelopment = 11,
|
||||
GenerateSpecificAesKey = 12,
|
||||
DecryptRsaPrivateKeyDeprecated = 13,
|
||||
DecryptRsaPrivateKey = 13,
|
||||
DecryptAesKey = 14,
|
||||
CryptAesCtr = 15,
|
||||
ComputeCmac = 16,
|
||||
ImportEsKey = 17,
|
||||
UnwrapTitleKey = 18,
|
||||
LoadTitleKey = 19,
|
||||
|
||||
/* 2.0.0+ */
|
||||
UnwrapCommonTitleKey = 20,
|
||||
AllocateAesKeyslot = 21,
|
||||
FreeAesKeyslot = 22,
|
||||
GetAesKeyslotAvailableEvent = 23,
|
||||
UnwrapCommonTitleKey = 20,
|
||||
AllocateAesKeyslot = 21,
|
||||
FreeAesKeyslot = 22,
|
||||
GetAesKeyslotAvailableEvent = 23,
|
||||
|
||||
/* 3.0.0+ */
|
||||
SetBootReason = 24,
|
||||
GetBootReason = 25,
|
||||
SetBootReason = 24,
|
||||
GetBootReason = 25,
|
||||
|
||||
/* 5.0.0+ */
|
||||
ImportSslKey = 26,
|
||||
SslExpMod = 27,
|
||||
ImportDrmKey = 28,
|
||||
DrmExpMod = 29,
|
||||
ReEncryptRsaPrivateKey = 30,
|
||||
GetPackage2Hash = 31,
|
||||
ImportSslKey = 26,
|
||||
SslExpMod = 27,
|
||||
ImportDrmKey = 28,
|
||||
DrmExpMod = 29,
|
||||
ReEncryptRsaPrivateKey = 30,
|
||||
GetPackage2Hash = 31,
|
||||
|
||||
/* 6.0.0+ */
|
||||
UnwrapElicenseKey = 31, /* re-used command id :( */
|
||||
LoadElicenseKey = 32,
|
||||
UnwrapElicenseKey = 31, /* re-used command id :( */
|
||||
LoadElicenseKey = 32,
|
||||
};
|
||||
public:
|
||||
GeneralService() { /* ... */ }
|
||||
|
|
|
@ -38,20 +38,20 @@ namespace sts::spl {
|
|||
MAKE_SERVICE_COMMAND_META(ManuService, SetConfig),
|
||||
MAKE_SERVICE_COMMAND_META(ManuService, GenerateRandomBytes),
|
||||
MAKE_SERVICE_COMMAND_META(ManuService, IsDevelopment),
|
||||
MAKE_SERVICE_COMMAND_META(ManuService, SetBootReason, FirmwareVersion_300),
|
||||
MAKE_SERVICE_COMMAND_META(ManuService, GetBootReason, FirmwareVersion_300),
|
||||
MAKE_SERVICE_COMMAND_META(ManuService, SetBootReason, FirmwareVersion_300),
|
||||
MAKE_SERVICE_COMMAND_META(ManuService, GetBootReason, FirmwareVersion_300),
|
||||
MAKE_SERVICE_COMMAND_META(ManuService, GenerateAesKek),
|
||||
MAKE_SERVICE_COMMAND_META(ManuService, LoadAesKey),
|
||||
MAKE_SERVICE_COMMAND_META(ManuService, GenerateAesKey),
|
||||
MAKE_SERVICE_COMMAND_META(ManuService, DecryptAesKey),
|
||||
MAKE_SERVICE_COMMAND_META(ManuService, CryptAesCtr),
|
||||
MAKE_SERVICE_COMMAND_META(ManuService, ComputeCmac),
|
||||
MAKE_SERVICE_COMMAND_META(ManuService, AllocateAesKeyslot, FirmwareVersion_200),
|
||||
MAKE_SERVICE_COMMAND_META(ManuService, FreeAesKeyslot, 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, DecryptRsaPrivateKey, FirmwareVersion_500),
|
||||
MAKE_SERVICE_COMMAND_META(ManuService, ReEncryptRsaPrivateKey, FirmwareVersion_500),
|
||||
MAKE_SERVICE_COMMAND_META(ManuService, AllocateAesKeyslot, FirmwareVersion_200),
|
||||
MAKE_SERVICE_COMMAND_META(ManuService, FreeAesKeyslot, FirmwareVersion_200),
|
||||
MAKE_SERVICE_COMMAND_META(ManuService, GetAesKeyslotAvailableEvent, FirmwareVersion_200),
|
||||
MAKE_SERVICE_COMMAND_META(ManuService, DecryptRsaPrivateKeyDeprecated, FirmwareVersion_400, FirmwareVersion_400),
|
||||
MAKE_SERVICE_COMMAND_META(ManuService, DecryptRsaPrivateKey, FirmwareVersion_500),
|
||||
MAKE_SERVICE_COMMAND_META(ManuService, ReEncryptRsaPrivateKey, FirmwareVersion_500),
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -38,19 +38,19 @@ namespace sts::spl {
|
|||
MAKE_SERVICE_COMMAND_META(RsaService, SetConfig),
|
||||
MAKE_SERVICE_COMMAND_META(RsaService, GenerateRandomBytes),
|
||||
MAKE_SERVICE_COMMAND_META(RsaService, IsDevelopment),
|
||||
MAKE_SERVICE_COMMAND_META(RsaService, SetBootReason, FirmwareVersion_300),
|
||||
MAKE_SERVICE_COMMAND_META(RsaService, GetBootReason, FirmwareVersion_300),
|
||||
MAKE_SERVICE_COMMAND_META(RsaService, SetBootReason, FirmwareVersion_300),
|
||||
MAKE_SERVICE_COMMAND_META(RsaService, GetBootReason, FirmwareVersion_300),
|
||||
MAKE_SERVICE_COMMAND_META(RsaService, GenerateAesKek),
|
||||
MAKE_SERVICE_COMMAND_META(RsaService, LoadAesKey),
|
||||
MAKE_SERVICE_COMMAND_META(RsaService, GenerateAesKey),
|
||||
MAKE_SERVICE_COMMAND_META(RsaService, DecryptAesKey),
|
||||
MAKE_SERVICE_COMMAND_META(RsaService, CryptAesCtr),
|
||||
MAKE_SERVICE_COMMAND_META(RsaService, ComputeCmac),
|
||||
MAKE_SERVICE_COMMAND_META(RsaService, AllocateAesKeyslot, FirmwareVersion_200),
|
||||
MAKE_SERVICE_COMMAND_META(RsaService, FreeAesKeyslot, 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, DecryptRsaPrivateKey, FirmwareVersion_500),
|
||||
MAKE_SERVICE_COMMAND_META(RsaService, AllocateAesKeyslot, FirmwareVersion_200),
|
||||
MAKE_SERVICE_COMMAND_META(RsaService, FreeAesKeyslot, FirmwareVersion_200),
|
||||
MAKE_SERVICE_COMMAND_META(RsaService, GetAesKeyslotAvailableEvent, FirmwareVersion_200),
|
||||
MAKE_SERVICE_COMMAND_META(RsaService, DecryptRsaPrivateKeyDeprecated, FirmwareVersion_400, FirmwareVersion_400),
|
||||
MAKE_SERVICE_COMMAND_META(RsaService, DecryptRsaPrivateKey, FirmwareVersion_500),
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -38,21 +38,21 @@ namespace sts::spl {
|
|||
MAKE_SERVICE_COMMAND_META(SslService, SetConfig),
|
||||
MAKE_SERVICE_COMMAND_META(SslService, GenerateRandomBytes),
|
||||
MAKE_SERVICE_COMMAND_META(SslService, IsDevelopment),
|
||||
MAKE_SERVICE_COMMAND_META(SslService, SetBootReason, FirmwareVersion_300),
|
||||
MAKE_SERVICE_COMMAND_META(SslService, GetBootReason, FirmwareVersion_300),
|
||||
MAKE_SERVICE_COMMAND_META(SslService, SetBootReason, FirmwareVersion_300),
|
||||
MAKE_SERVICE_COMMAND_META(SslService, GetBootReason, FirmwareVersion_300),
|
||||
MAKE_SERVICE_COMMAND_META(SslService, GenerateAesKek),
|
||||
MAKE_SERVICE_COMMAND_META(SslService, LoadAesKey),
|
||||
MAKE_SERVICE_COMMAND_META(SslService, GenerateAesKey),
|
||||
MAKE_SERVICE_COMMAND_META(SslService, DecryptAesKey),
|
||||
MAKE_SERVICE_COMMAND_META(SslService, CryptAesCtr),
|
||||
MAKE_SERVICE_COMMAND_META(SslService, ComputeCmac),
|
||||
MAKE_SERVICE_COMMAND_META(SslService, AllocateAesKeyslot, FirmwareVersion_200),
|
||||
MAKE_SERVICE_COMMAND_META(SslService, FreeAesKeyslot, 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, DecryptRsaPrivateKey, FirmwareVersion_500),
|
||||
MAKE_SERVICE_COMMAND_META(SslService, ImportSslKey, FirmwareVersion_500),
|
||||
MAKE_SERVICE_COMMAND_META(SslService, SslExpMod, FirmwareVersion_500),
|
||||
MAKE_SERVICE_COMMAND_META(SslService, AllocateAesKeyslot, FirmwareVersion_200),
|
||||
MAKE_SERVICE_COMMAND_META(SslService, FreeAesKeyslot, FirmwareVersion_200),
|
||||
MAKE_SERVICE_COMMAND_META(SslService, GetAesKeyslotAvailableEvent, FirmwareVersion_200),
|
||||
MAKE_SERVICE_COMMAND_META(SslService, DecryptRsaPrivateKeyDeprecated, FirmwareVersion_400, FirmwareVersion_400),
|
||||
MAKE_SERVICE_COMMAND_META(SslService, DecryptRsaPrivateKey, FirmwareVersion_500),
|
||||
MAKE_SERVICE_COMMAND_META(SslService, ImportSslKey, FirmwareVersion_500),
|
||||
MAKE_SERVICE_COMMAND_META(SslService, SslExpMod, FirmwareVersion_500),
|
||||
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue