Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boot: Change boot_enc_load to take slot number instead of image #2004

Merged
merged 1 commit into from
Jul 25, 2024

Conversation

de-nordic
Copy link
Collaborator

In all cases where boot_enc_load is called it is known what slot is addressed, so it is better to just pass the slot number instead of making the boot_enc_load figure out slot number from image index and provided flash area object.

In all cases where boot_enc_load is called it is known what slot
is addressed, so it is better to just pass the slot number
instead of making the boot_enc_load figure out slot number from
image index and provided flash area object.

Signed-off-by: Dominik Ermel <[email protected]>
@de-nordic de-nordic requested a review from nvlsianpu July 12, 2024 19:41
@de-nordic
Copy link
Collaborator Author

de-nordic commented Jul 16, 2024

Setting DNM as the function is replaced with boot_status_load_keys and also drops the struct enc_key_data *enc_state parameter and moves the boot_status *bs param as the primary one.
The encryption context validation and init has been moved outside.

@de-nordic de-nordic added the [DNM] Do Not Merge label Jul 16, 2024
@de-nordic de-nordic added crypto Encryption support and removed [DNM] Do Not Merge labels Jul 24, 2024
@de-nordic de-nordic requested a review from d3zd3z July 24, 2024 13:58
@@ -36,7 +36,7 @@ boot_image_validate_encrypted(const struct flash_area *fa_p,
memset(&boot_data, 0, sizeof(struct boot_loader_state));
image_index = BOOT_CURR_IMG(state);
if(IS_ENCRYPTED(hdr)) {
rc = boot_enc_load(BOOT_CURR_ENC(state), image_index, hdr, fa_p, bs);
rc = boot_enc_load(BOOT_CURR_ENC(state), 1, hdr, fa_p, bs);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note for me: I have to check whether this line is fine

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is fine

@nvlsianpu nvlsianpu merged commit 7f9ac97 into mcu-tools:main Jul 25, 2024
58 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crypto Encryption support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants