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

Unified Diff: host/lib/file_keys.c

Issue 2871033: Switch to using .vbprivk for signing everything now. (Closed) Base URL: ssh://git@chromiumos-git//vboot_reference.git
Patch Set: Okay, now tests pass again. 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
Index: host/lib/file_keys.c
diff --git a/host/lib/file_keys.c b/host/lib/file_keys.c
index c77743062f095c319ca28ac77d187e1452f3583d..181879da6801d8078c09529380d01bb13835f706 100644
--- a/host/lib/file_keys.c
+++ b/host/lib/file_keys.c
@@ -25,12 +25,12 @@ uint8_t* BufferFromFile(const char* input_file, uint64_t* len) {
uint8_t* buf = NULL;
if ((fd = open(input_file, O_RDONLY)) == -1) {
- debug("Couldn't open file %s\n", input_file);
+ VBDEBUG(("Couldn't open file %s\n", input_file));
return NULL;
}
if (-1 == fstat(fd, &stat_fd)) {
- debug("Couldn't stat file %s\n", input_file);
+ VBDEBUG(("Couldn't stat file %s\n", input_file));
return NULL;
}
*len = stat_fd.st_size;
@@ -42,7 +42,7 @@ uint8_t* BufferFromFile(const char* input_file, uint64_t* len) {
}
if (*len != read(fd, buf, *len)) {
- debug("Couldn't read file %s into a buffer\n", input_file);
+ VBDEBUG(("Couldn't read file %s into a buffer\n", input_file));
return NULL;
}
@@ -67,7 +67,7 @@ uint8_t* DigestFile(char* input_file, int sig_algorithm) {
DigestContext ctx;
if( (input_fd = open(input_file, O_RDONLY)) == -1 ) {
- debug("Couldn't open %s\n", input_file);
+ VBDEBUG(("Couldn't open %s\n", input_file));
return NULL;
}
DigestInit(&ctx, sig_algorithm);
@@ -104,13 +104,13 @@ uint8_t* SignatureFile(const char* input_file, const char* key_file,
cmd_out = popen(cmd, "r");
Free(cmd);
if (!cmd_out) {
- debug("Couldn't execute: %s\n", cmd);
+ VBDEBUG(("Couldn't execute: %s\n", cmd));
return NULL;
}
signature = (uint8_t*) Malloc(signature_size);
if (fread(signature, signature_size, 1, cmd_out) != 1) {
- debug("Couldn't read signature.\n");
+ VBDEBUG(("Couldn't read signature.\n"));
pclose(cmd_out);
Free(signature);
return NULL;
« no previous file with comments | « host/include/host_key.h ('k') | host/lib/host_key.c » ('j') | utility/vbutil_key.c » ('J')

Powered by Google App Engine
This is Rietveld 408576698