Added VERIFY_ALWAYS_SUCCEEDS conditional to allow signature verifiers to always succeed during fuzzing for maximum code coverage.

This commit is contained in:
Chad Fraleigh 2023-08-15 19:35:48 -07:00
parent acfa3938ba
commit 7c9c5ac12e
3 changed files with 17 additions and 1 deletions

View file

@ -34,7 +34,13 @@ namespace crypto
bool EDDSA25519Verifier::Verify (const uint8_t * buf, size_t len, const uint8_t * signature) const
{
return EVP_DigestVerify (m_MDCtx, signature, 64, buf, len);
bool ret = EVP_DigestVerify (m_MDCtx, signature, 64, buf, len);
#ifdef VERIFY_ALWAYS_SUCCEEDS
ret = true;
#endif
return ret;
}
#else