Skip to content

Commit

Permalink
Review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
tmael authored and danielinux committed Aug 22, 2023
1 parent c1ccb5c commit 498c702
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
19 changes: 10 additions & 9 deletions src/image.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,12 @@ static void wolfBoot_verify_signature(uint8_t key_slot,
#endif

/**
* @brief Verify the ECC signature of the image using the provided key slot
* @brief Verify the signature of the image using the provided key slot
* and signature.
*
* @param key_slot The key slot ID to use for verification.
* @param img The image to verify.
* @param sig The ECC signature to use for verification.
* @param sig The signature to use for verification.
*/
static void wolfBoot_verify_signature(uint8_t key_slot,
struct wolfBoot_image *img, uint8_t *sig)
Expand Down Expand Up @@ -394,7 +394,7 @@ static void wolfBoot_verify_signature(uint8_t key_slot,
* WOLFBOOT_SIGN_RSA4096 */

/**
* @brief Get the specified header type from the extended flash image.
* @brief Get the specified header type from the external flash image.
*
* @param img The image to retrieve the header from.
* @param type The type of header to retrieve.
Expand All @@ -405,12 +405,13 @@ static uint16_t get_header_ext(struct wolfBoot_image *img, uint16_t type,
uint8_t **ptr);

/**
* @brief Get the specified header type from the image.
* @brief This function searches for the TLV entry in the header and provides
* a pointer to the corresponding data.
*
* @param img The image to retrieve the header from.
* @param img The image to retrieve the data from.
* @param type The type of header to retrieve.
* @param ptr A pointer to the header data.
* @return The size of the header if found, otherwise 0.
* @param ptr A pointer to store the position of the header.
* @return The size of the data if found, otherwise 0.
*/
static uint16_t get_header(struct wolfBoot_image *img, uint16_t type,
uint8_t **ptr)
Expand All @@ -425,7 +426,7 @@ static uint16_t get_header(struct wolfBoot_image *img, uint16_t type,
static uint8_t ext_hash_block[WOLFBOOT_SHA_BLOCK_SIZE];
#endif
/**
* @brief Get a block of data from the SHA256 hash of the image.
* @brief Get a block of data to be hashed.
*
* @param img The image to retrieve the data from.
* @param offset The offset to start reading the data from.
Expand Down Expand Up @@ -572,7 +573,7 @@ static int image_sha256(struct wolfBoot_image *img, uint8_t *hash)
#ifndef WOLFBOOT_NO_SIGN

/**
* @brief Calculate the SHA256 hash of the RSA key.
* @brief Calculate the SHA256 hash of the key.
*
* @param key_slot The key slot ID to calculate the hash for.
* @param hash A pointer to store the resulting SHA256 hash.
Expand Down
2 changes: 1 addition & 1 deletion src/update_disk.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@

#define IMAGE_PRELOAD_ADDRESS 0x5000100
/**
* @brief RAM function for starting the boot process.
* @brief function for starting the boot process.
*
* This function starts the boot process by attempting to read and load
* the OS image from disk partitions. It then verifies the integrity and
Expand Down

0 comments on commit 498c702

Please sign in to comment.