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

Unified Diff: host/include/host_key.h

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/include/host_key.h
diff --git a/host/include/host_key.h b/host/include/host_key.h
index e7b18155f415ab73142af6b8479c09d79dfb9d5e..018c25d359fc8a546440b07d8fa7d501f980a0cd 100644
--- a/host/include/host_key.h
+++ b/host/include/host_key.h
@@ -30,6 +30,16 @@ VbPrivateKey* PrivateKeyReadPem(const char* filename, uint64_t algorithm);
/* Free a private key. */
void PrivateKeyFree(VbPrivateKey* key);
+/* Write a private key to a file in .vbprivk format. */
+int PrivateKeyWrite(const char* filename, const VbPrivateKey* key);
+
+/* Read a privake key from a .vbprivk file. Caller owns the returned
+ * pointer, and must free it with PrivateKeyFree().
+ *
+ * Returns NULL if error. */
+VbPrivateKey* PrivateKeyRead(const char* filename);
+
+
/* Allocate a new public key with space for a [key_size] byte key. */
VbPublicKey* PublicKeyAlloc(uint64_t key_size, uint64_t algorithm,
« no previous file with comments | « firmware/version.c ('k') | host/lib/file_keys.c » ('j') | utility/vbutil_key.c » ('J')

Powered by Google App Engine
This is Rietveld 408576698