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

Unified Diff: firmware/lib/cryptolib/rsa.c

Issue 2810026: Add VBDEBUG macro for debug output. (Closed) Base URL: ssh://gitrw.chromium.org/vboot_reference.git
Patch Set: Created 10 years, 6 months 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 | « firmware/lib/cgptlib/cgptlib.c ('k') | firmware/lib/rollback_index.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: firmware/lib/cryptolib/rsa.c
diff --git a/firmware/lib/cryptolib/rsa.c b/firmware/lib/cryptolib/rsa.c
index 2aef52cfa3d07ec6692d718d9c07de580c7b9df1..51fed7713585a4b19739d700cee9634ecabb63d8 100644
--- a/firmware/lib/cryptolib/rsa.c
+++ b/firmware/lib/cryptolib/rsa.c
@@ -135,17 +135,17 @@ int RSAVerify(const RSAPublicKey *key,
int success = 1;
if (sig_len != (key->len * sizeof(uint32_t))) {
- debug("Signature is of incorrect length!\n");
+ VBDEBUG(("Signature is of incorrect length!\n"));
return 0;
}
if (sig_type >= kNumAlgorithms) {
- debug("Invalid signature type!\n");
+ VBDEBUG(("Invalid signature type!\n"));
return 0;
}
if (key->len != siglen_map[sig_type] / sizeof(uint32_t)) {
- debug("Wrong key passed in!\n");
+ VBDEBUG(("Wrong key passed in!\n"));
return 0;
}
@@ -162,8 +162,7 @@ int RSAVerify(const RSAPublicKey *key,
if (buf[i] != padding[i]) {
#ifndef NDEBUG
/* TODO(gauravsh): Replace with a macro call for logging. */
- debug("Padding: Expecting = %02x Got = %02x\n", padding[i],
- buf[i]);
+ VBDEBUG(("Padding: Expecting = %02x Got = %02x\n", padding[i], buf[i]));
#endif
success = 0;
}
@@ -174,8 +173,7 @@ int RSAVerify(const RSAPublicKey *key,
if (buf[i] != *hash++) {
#ifndef NDEBUG
/* TODO(gauravsh): Replace with a macro call for logging. */
- debug("Digest: Expecting = %02x Got = %02x\n", padding[i],
- buf[i]);
+ VBDEBUG(("Digest: Expecting = %02x Got = %02x\n", padding[i], buf[i]));
#endif
success = 0;
}
« no previous file with comments | « firmware/lib/cgptlib/cgptlib.c ('k') | firmware/lib/rollback_index.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698