Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions boot/bootutil/include/bootutil/sign_key.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,15 @@ extern struct bootutil_key bootutil_keys[];
* Retrieve the hash of the corresponding public key for image authentication.
*
* @param[in] image_index Index of the image to be authenticated.
* @param[in] actual_key_hash hash of the key to test
* @param[out] public_key_hash Buffer to store the key-hash in.
* @param[in,out] key_hash_size As input the size of the buffer. As output
* the actual key-hash length.
*
* @return 0 on success; nonzero on failure.
*/
int boot_retrieve_public_key_hash(uint8_t image_index,
const uint8_t *actual_key_hash,
uint8_t *public_key_hash,
size_t *key_hash_size);
#endif /* !MCUBOOT_HW_KEY */
Expand Down
2 changes: 1 addition & 1 deletion boot/bootutil/src/image_validate.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ bootutil_find_key(uint8_t image_index, uint8_t *key, uint16_t key_len)
bootutil_sha_finish(&sha_ctx, hash);
bootutil_sha_drop(&sha_ctx);

rc = boot_retrieve_public_key_hash(image_index, key_hash, &key_hash_size);
rc = boot_retrieve_public_key_hash(image_index, hash, key_hash, &key_hash_size);
if (rc) {
return -1;
}
Expand Down