rboot: Add cryptographic digest support for OTA images & SHA256 example
This commit is contained in:
parent
03559de5cb
commit
53b2b50241
5 changed files with 88 additions and 6 deletions
|
|
@ -369,7 +369,9 @@ static err_t tftp_receive_data(struct netconn *nc, size_t write_offs, size_t lim
|
|||
it so the client gets an indication if things were successful.
|
||||
*/
|
||||
const char *err = "Unknown validation error";
|
||||
if(!rboot_verify_image(start_offs, *received_len, &err)) {
|
||||
uint32_t image_length;
|
||||
if(!rboot_verify_image(start_offs, &image_length, &err)
|
||||
|| image_length != *received_len) {
|
||||
tftp_send_error(nc, TFTP_ERR_ILLEGAL, err);
|
||||
return ERR_VAL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue