Index: src/platform/vboot_reference/crypto/rsa.c |
diff --git a/src/platform/vboot_reference/crypto/rsa.c b/src/platform/vboot_reference/crypto/rsa.c |
index bfc644690e615d64c2f068bb1bef123afd6f32c2..c84ae4e8da8094d2080f7c43ff842fc9ae267fb3 100644 |
--- a/src/platform/vboot_reference/crypto/rsa.c |
+++ b/src/platform/vboot_reference/crypto/rsa.c |
@@ -8,7 +8,10 @@ |
* support multiple RSA key lengths and hash digest algorithms. |
*/ |
-#include "cryptolib.h" |
+#include <stdio.h> |
+ |
+#include "padding.h" |
+#include "rsa.h" |
#include "utility.h" |
/* a[] -= mod */ |
@@ -135,17 +138,17 @@ int RSAVerify(const RSAPublicKey *key, |
int success = 1; |
if (sig_len != (key->len * sizeof(uint32_t))) { |
- debug("Signature is of incorrect length!\n"); |
+ fprintf(stderr, "Signature is of incorrect length!\n"); |
return 0; |
} |
if (sig_type >= kNumAlgorithms) { |
- debug("Invalid signature type!\n"); |
+ fprintf(stderr, "Invalid signature type!\n"); |
return 0; |
} |
if (key->len != siglen_map[sig_type] / sizeof(uint32_t)) { |
- debug("Wrong key passed in!\n"); |
+ fprintf(stderr, "Wrong key passed in!\n"); |
return 0; |
} |
@@ -162,7 +165,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], |
+ fprintf(stderr, "Padding: Expecting = %02x Got = %02x\n", padding[i], |
buf[i]); |
#endif |
success = 0; |
@@ -174,7 +177,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], |
+ fprintf(stderr, "Digest: Expecting = %02x Got = %02x\n", padding[i], |
buf[i]); |
#endif |
success = 0; |