Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(999)

Unified Diff: crypto/signature_verifier_openssl.cc

Issue 707973007: Cleanup: Don't check for negative values from EVP_DigestVerifyFinal. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: change dcheck Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: crypto/signature_verifier_openssl.cc
diff --git a/crypto/signature_verifier_openssl.cc b/crypto/signature_verifier_openssl.cc
index 53637ebb60a269eb90f34e69e57d847498a3eef8..84aa2ea3912017178120df4bc9ee52354edd284f 100644
--- a/crypto/signature_verifier_openssl.cc
+++ b/crypto/signature_verifier_openssl.cc
@@ -122,8 +122,7 @@ bool SignatureVerifier::VerifyFinal() {
int rv = EVP_DigestVerifyFinal(verify_context_->ctx.get(),
vector_as_array(&signature_),
signature_.size());
- // rv is -1 if a DER-encoded ECDSA signature cannot be decoded correctly.
- DCHECK_GE(rv, -1);
+ DCHECK_EQ(!!rv, rv);
Reset();
return rv == 1;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698