mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-26 19:25:02 +00:00
vboot2: Add host lib support for bare hash keys
And use them in the other vboot2 unit tests. BUG=chromium:423882 BRANCH=none TEST=VBOOT2=1 make runtests Change-Id: I0c3590649a0acf792e41e295ca4279ccba17a41f Reviewed-on: https://chromium-review.googlesource.com/231345 Tested-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Bill Richardson <wfrichar@chromium.org> Commit-Queue: Randall Spangler <rspangler@chromium.org>
This commit is contained in:
committed by
chrome-internal-fetch
parent
59c29202d2
commit
fb9a216dd6
@@ -83,6 +83,17 @@ int vb2_private_key_set_desc(struct vb2_private_key *key, const char *desc);
|
||||
int vb2_private_key_write(const struct vb2_private_key *key,
|
||||
const char *filename);
|
||||
|
||||
/**
|
||||
* Get a private key for an unsigned hash
|
||||
*
|
||||
* @param key_ptr Destination for pointer to key. The key is statically
|
||||
* allocated and must not be freed.
|
||||
* @param hash_alg Hash algorithm to use
|
||||
* @return VB2_SUCCESS, or non-zero error code if error.
|
||||
*/
|
||||
int vb2_private_key_hash(const struct vb2_private_key **key_ptr,
|
||||
enum vb2_hash_algorithm hash_alg);
|
||||
|
||||
/**
|
||||
* Free a public key allocated by one of the functions below.
|
||||
*
|
||||
@@ -141,4 +152,15 @@ int vb2_packed_key2_read(struct vb2_packed_key2 **key_ptr,
|
||||
int vb2_public_key_pack(struct vb2_packed_key2 **key_ptr,
|
||||
const struct vb2_public_key *pubk);
|
||||
|
||||
/**
|
||||
* Get a public key for an unsigned hash.
|
||||
*
|
||||
* @param key Destination for key data.
|
||||
* @param hash_alg Hash algorithm to use
|
||||
* @return VB2_SUCCESS, or non-zero error code if error.
|
||||
*/
|
||||
int vb2_public_key_hash(struct vb2_public_key *key,
|
||||
enum vb2_hash_algorithm hash_alg);
|
||||
|
||||
|
||||
#endif /* VBOOT_REFERENCE_HOST_KEY2_H_ */
|
||||
|
||||
Reference in New Issue
Block a user