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

Unified Diff: host/include/host_key.h

Issue 2762009: Add vbutil_key (Closed) Base URL: ssh://gitrw.chromium.org/vboot_reference.git
Patch Set: Util to pack/unpack .vbpubk files 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 | « host/include/host_common.h ('k') | host/include/host_misc.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: host/include/host_key.h
diff --git a/host/include/host_key.h b/host/include/host_key.h
index b71db8f88d42e3afd516cc31e54d0aa65d3963e7..6d964a0f3ea1f96df08e29105ff7a73c743c5461 100644
--- a/host/include/host_key.h
+++ b/host/include/host_key.h
@@ -48,12 +48,23 @@ VbPublicKey* PublicKeyAlloc(uint64_t key_size, uint64_t algorithm,
int PublicKeyCopy(VbPublicKey* dest, const VbPublicKey* src);
-/* Read a public key from a file. Caller owns the returned pointer,
- * and must free it with Free().
+/* Read a public key from a .vbpubk file. Caller owns the returned
+ * pointer, and must free it with Free().
*
* Returns NULL if error. */
-/* TODO: should really store public keys in files as VbPublicKey */
-VbPublicKey* PublicKeyRead(const char* filename, uint64_t algorithm,
- uint64_t version);
+VbPublicKey* PublicKeyRead(const char* filename);
+
+
+/* Read a public key from a .keyb file. Caller owns the returned
+ * pointer, and must free it with Free().
+ *
+ * Returns NULL if error. */
+VbPublicKey* PublicKeyReadKeyb(const char* filename, uint64_t algorithm,
+ uint64_t version);
+
+
+/* Write a public key to a file in .vbpubk format. */
+int PublicKeyWrite(const char* filename, const VbPublicKey* key);
+
#endif /* VBOOT_REFERENCE_HOST_KEY_H_ */
« no previous file with comments | « host/include/host_common.h ('k') | host/include/host_misc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698