mirror of
https://github.com/Thealexbarney/LibHac.git
synced 2025-02-09 13:14:46 +01:00
Handle CryptographicExceptions when decrypting personalized tickets
This commit is contained in:
parent
7ee5aec746
commit
c667de1169
@ -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,7 +161,14 @@ public class Ticket
|
||||
if (keySet.ETicketRsaKey.PublicExponent.ItemsRo.IsZeros())
|
||||
return null;
|
||||
|
||||
return CryptoOld.DecryptRsaOaep(TitleKeyBlock, keySet.ETicketRsaKeyParams);
|
||||
try
|
||||
{
|
||||
return CryptoOld.DecryptRsaOaep(TitleKeyBlock, keySet.ETicketRsaKeyParams);
|
||||
}
|
||||
catch (CryptographicException)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user