Refactor LoadFirmware() to avoid global variables, which don't work when running out of ROM

Review URL: http://codereview.chromium.org/2848006
This commit is contained in:
Randall Spangler
2010-06-15 18:45:09 -07:00
parent e3b4ac96bc
commit a55e5ca76c
11 changed files with 159 additions and 159 deletions

View File

@@ -33,21 +33,11 @@ VbPrivateKey* PrivateKeyRead(const char* filename, uint64_t algorithm);
void PrivateKeyFree(VbPrivateKey* key);
/* Initialize a public key to refer to [key_data]. */
void PublicKeyInit(VbPublicKey* key, uint8_t* key_data, uint64_t key_size);
/* 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);
/* Copy a public key from [src] to [dest].
*
* Returns 0 if success, non-zero if error. */
int PublicKeyCopy(VbPublicKey* dest, const VbPublicKey* src);
/* Read a public key from a .vbpubk file. Caller owns the returned
* pointer, and must free it with Free().
*