mirror of
https://github.com/jakcron/nstool.git
synced 2024-12-22 10:45:28 +00:00
[nx] Fix ACID RSA verification.
This commit is contained in:
parent
953a181180
commit
69c558923d
|
@ -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