mirror of
https://github.com/jakcron/nstool
synced 2024-12-24 21:51:14 +00:00
[nx] Fix ACID RSA verification.
This commit is contained in:
parent
953a181180
commit
69c558923d
1 changed files with 2 additions and 2 deletions
|
@ -125,7 +125,7 @@ void nx::AcidBinary::importBinary(const byte_t * bytes, size_t len)
|
|||
memcpy(mEmbeddedPublicKey.modulus, bytes + crypto::rsa::kRsa2048Size, crypto::rsa::kRsa2048Size);
|
||||
}
|
||||
|
||||
void nx::AcidBinary::verifyBinary(const crypto::rsa::sRsa2048Key & key)
|
||||
void nx::AcidBinary::verifyBinary(const crypto::rsa::sRsa2048Key & key) const
|
||||
{
|
||||
if (mBinaryBlob.getSize() == 0)
|
||||
{
|
||||
|
@ -135,7 +135,7 @@ void nx::AcidBinary::verifyBinary(const crypto::rsa::sRsa2048Key & key)
|
|||
byte_t hash[crypto::sha::kSha256HashLen];
|
||||
crypto::sha::Sha256(mBinaryBlob.getBytes() + crypto::rsa::kRsa2048Size, mBinaryBlob.getSize() - crypto::rsa::kRsa2048Size, hash);
|
||||
|
||||
if (crypto::rsa::pkcs::rsaVerify(key, crypto::sha::HASH_SHA256, hash, mBinaryBlob.getBytes()) != 0)
|
||||
if (crypto::rsa::pss::rsaVerify(key, crypto::sha::HASH_SHA256, hash, mBinaryBlob.getBytes()) != 0)
|
||||
{
|
||||
throw fnd::Exception(kModuleName, "Failed to verify ACID");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue