mirror of
https://github.com/Thealexbarney/LibHac.git
synced 2024-11-14 10:49:41 +01:00
Properly pass the missing rights ID to MissingKeyException
This commit is contained in:
parent
d08e6b060c
commit
5d6dce7e1f
1 changed files with 4 additions and 2 deletions
|
@ -48,9 +48,11 @@ namespace LibHac.FsSystem.NcaUtils
|
||||||
int keyRevision = Util.GetMasterKeyRevision(Header.KeyGeneration);
|
int keyRevision = Util.GetMasterKeyRevision(Header.KeyGeneration);
|
||||||
byte[] titleKek = Keyset.TitleKeks[keyRevision];
|
byte[] titleKek = Keyset.TitleKeks[keyRevision];
|
||||||
|
|
||||||
if (Keyset.ExternalKeySet.Get(new RightsId(Header.RightsId), out AccessKey accessKey).IsFailure())
|
var rightsId = new RightsId(Header.RightsId);
|
||||||
|
|
||||||
|
if (Keyset.ExternalKeySet.Get(rightsId, out AccessKey accessKey).IsFailure())
|
||||||
{
|
{
|
||||||
throw new MissingKeyException("Missing NCA title key.", Header.RightsId.ToString(), KeyType.Title);
|
throw new MissingKeyException("Missing NCA title key.", rightsId.ToString(), KeyType.Title);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (titleKek.IsEmpty())
|
if (titleKek.IsEmpty())
|
||||||
|
|
Loading…
Reference in a new issue