mirror of
https://github.com/Thealexbarney/LibHac.git
synced 2024-11-14 10:49:41 +01:00
Handle CryptographicExceptions when decrypting personalized tickets
This commit is contained in:
parent
7ee5aec746
commit
c667de1169
1 changed files with 9 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Security.Cryptography;
|
||||
using LibHac.Common;
|
||||
using LibHac.Common.Keys;
|
||||
using LibHac.Tools.Crypto;
|
||||
|
@ -160,8 +161,15 @@ public class Ticket
|
|||
if (keySet.ETicketRsaKey.PublicExponent.ItemsRo.IsZeros())
|
||||
return null;
|
||||
|
||||
try
|
||||
{
|
||||
return CryptoOld.DecryptRsaOaep(TitleKeyBlock, keySet.ETicketRsaKeyParams);
|
||||
}
|
||||
catch (CryptographicException)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public enum TicketSigType
|
||||
|
|
Loading…
Reference in a new issue