mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-26 19:25:02 +00:00
futility: add separate check function for VPbublicKey
Provide a PublicKeyLooksOkay() function to sanity-check VbPublicKey structs. This was just part of PublicKeyRead(), but I want to separate the reading from the checking. BUG=chromium:224734 BRANCH=ToT TEST=make runtests Change-Id: I1dd808e623e2a7fdc2789e02305619111a7b01e6 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/214621 Reviewed-by: Randall Spangler <rspangler@chromium.org>
This commit is contained in:
committed by
chrome-internal-fetch
parent
0e6ae29eec
commit
f16ed87879
@@ -52,6 +52,8 @@ VbPublicKey* PublicKeyAlloc(uint64_t key_size, uint64_t algorithm,
|
||||
* Returns NULL if error. */
|
||||
VbPublicKey* PublicKeyRead(const char* filename);
|
||||
|
||||
/* Return true if the public key struct appears correct. */
|
||||
int PublicKeyLooksOkay(VbPublicKey *key, uint64_t file_size);
|
||||
|
||||
/* Read a public key from a .keyb file. Caller owns the returned
|
||||
* pointer, and must free it with Free().
|
||||
|
||||
Reference in New Issue
Block a user