ams-libs: AMS_ASSERT no longer invokes expression

This commit is contained in:
Michael Scire
2021-09-29 21:32:40 -07:00
parent 5dc64bc1f7
commit 9b04ff0f54
38 changed files with 82 additions and 23 deletions

View File

@@ -65,6 +65,7 @@ namespace ams::crypto {
bool Verify(const void *signature, size_t size) {
AMS_ASSERT(this->state == State::Initialized);
AMS_ASSERT(size == SignatureSize);
AMS_UNUSED(size);
ON_SCOPE_EXIT { this->state = State::Done; };
impl::RsaPssImpl<Hash> impl;
@@ -85,6 +86,7 @@ namespace ams::crypto {
bool Verify(const void *signature, size_t size, void *work_buf, size_t work_buf_size) {
AMS_ASSERT(this->state == State::Initialized);
AMS_ASSERT(size == SignatureSize);
AMS_UNUSED(size);
ON_SCOPE_EXIT { this->state = State::Done; };
impl::RsaPssImpl<Hash> impl;
@@ -105,6 +107,7 @@ namespace ams::crypto {
bool VerifyWithHash(const void *signature, size_t size, const void *hash, size_t hash_size) {
AMS_ASSERT(this->state == State::Initialized);
AMS_ASSERT(size == SignatureSize);
AMS_UNUSED(size);
ON_SCOPE_EXIT { this->state = State::Done; };
impl::RsaPssImpl<Hash> impl;
@@ -121,6 +124,7 @@ namespace ams::crypto {
bool VerifyWithHash(const void *signature, size_t size, const void *hash, size_t hash_size, void *work_buf, size_t work_buf_size) {
AMS_ASSERT(this->state == State::Initialized);
AMS_ASSERT(size == SignatureSize);
AMS_UNUSED(size);
ON_SCOPE_EXIT { this->state = State::Done; };
impl::RsaPssImpl<Hash> impl;