-
Notifications
You must be signed in to change notification settings - Fork 222
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
[nrf noup] boot: bootutil: Allow configuring number of KMU keys #383
Conversation
a2cf0e4
to
0e0e6f6
Compare
@@ -30,7 +30,6 @@ static psa_key_id_t kmu_key_ids[3] = { | |||
MAKE_PSA_KMU_KEY_ID(228), | |||
MAKE_PSA_KMU_KEY_ID(230) | |||
}; | |||
#define KMU_KEY_COUNT (sizeof(kmu_key_ids)/sizeof(kmu_key_ids[0])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we have assertion on limit CONFIG_BOOT_SIGNATURE_KMU_SLOTS value to KMU_KEY_COUNT as max?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The limit is enforced by Kconfig
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a build assert
0e0e6f6
to
7707f33
Compare
boot/bootutil/src/ed25519_psa.c
Outdated
@@ -30,7 +31,9 @@ static psa_key_id_t kmu_key_ids[3] = { | |||
MAKE_PSA_KMU_KEY_ID(228), | |||
MAKE_PSA_KMU_KEY_ID(230) | |||
}; | |||
#define KMU_KEY_COUNT (sizeof(kmu_key_ids)/sizeof(kmu_key_ids[0])) | |||
|
|||
BUILD_ASSERT(CONFIG_BOOT_SIGNATURE_KMU_SLOTS < ARRAY_SIZE(kmu_key_ids), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BUILD_ASSERT(CONFIG_BOOT_SIGNATURE_KMU_SLOTS <= ARRAY_SIZE(kmu_key_ids),
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
Adds a new Kconfig CONFIG_BOOT_SIGNATURE_KMU_SLOTS which allows specifying how many KMU key IDs are supported, the default is set to 1 instead of 3 which was set before NCSDK-30743 Signed-off-by: Jamie McCrae <[email protected]>
7707f33
to
2af4fb8
Compare
Adds a new Kconfig CONFIG_BOOT_SIGNATURE_KMU_SLOTS which allows specifying how many KMU key IDs are supported, the default is set to 1 instead of 3 which was set before