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

Unified Diff: host/lib/host_key.c

Issue 2848006: Refactor LoadFrmware() to avoid global variables, which don't work when running out of ROM (Closed) Base URL: ssh://gitrw.chromium.org/vboot_reference.git
Patch Set: Undo change to vboot_struct 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_key.h ('k') | host/linktest/main.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: host/lib/host_key.c
diff --git a/host/lib/host_key.c b/host/lib/host_key.c
index c5f49d3171ba263fcb5374ac735ea5dad64be0b2..da350fd46c2561c63701fff2d9152071eda986c4 100644
--- a/host/lib/host_key.c
+++ b/host/lib/host_key.c
@@ -72,14 +72,6 @@ void PrivateKeyFree(VbPrivateKey* key) {
}
-void PublicKeyInit(VbPublicKey* key, uint8_t* key_data, uint64_t key_size) {
- key->key_offset = OffsetOf(key, key_data);
- key->key_size = key_size;
- key->algorithm = kNumAlgorithms; /* Key not present yet */
- key->key_version = 0;
-}
-
-
/* Allocate a new public key with space for a [key_size] byte key. */
VbPublicKey* PublicKeyAlloc(uint64_t key_size, uint64_t algorithm,
uint64_t version) {
@@ -95,21 +87,6 @@ VbPublicKey* PublicKeyAlloc(uint64_t key_size, uint64_t algorithm,
}
-/* Copy a public key from [src] to [dest].
- *
- * Returns zero if success, non-zero if error. */
-int PublicKeyCopy(VbPublicKey* dest, const VbPublicKey* src) {
- if (dest->key_size < src->key_size)
- return 1;
-
- dest->key_size = src->key_size;
- dest->algorithm = src->algorithm;
- dest->key_version = src->key_version;
- Memcpy(GetPublicKeyData(dest), GetPublicKeyDataC(src), src->key_size);
- return 0;
-}
-
-
VbPublicKey* PublicKeyReadKeyb(const char* filename, uint64_t algorithm,
uint64_t version) {
VbPublicKey* key;
« no previous file with comments | « host/include/host_key.h ('k') | host/linktest/main.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698