-
-
Notifications
You must be signed in to change notification settings - Fork 404
Add secure boot support for compile command. #1686
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
Conversation
I have not been involved with any development leading up to this, but at first glance it seems these extra options added are a bit arbitrary. Various platforms support all kinds of options in their IOW, I wonder:
|
Hi @matthijskooijman, first off, thanks for the points you brought up.
The flags introduced to override the default security keys IMHO are generic enough secureboot-wise. As long as a platform uses this approach of signing and/or encrypting a binary, they should work just fine.
Yes, an update to the docs is definitely needed. And I'm doing it right now. If you have further questions/observations/feedback I will be pleased to answer |
1b1767c
to
69a309f
Compare
|
b924cae
to
acdc565
Compare
ab57e78
to
e325b16
Compare
Docs updated |
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.
My opinion is that we should postpone the merge of this.
Start out by using the existing mechanism, as suggested by @matthijskooijman:
arduino-cli compile --build-property build.keys.sign_key=<some path> --build-property build.keys.encrypt_key=<some path>
I really don't think it is so much more difficult for the advanced users who will use Arduino CLI and secure boot.
Once the first platform providing "secure boot" capability has been released and in use by the users, any requirements for facilitating its use may become more clear.
In my opinion, as we offer facilities to burn a bootloader, we should enhance Although the use of Once we provide support for our preferred way of doing key generation to support MCUboot, developers of other platforms and boards flavours might decide to implement other secure bootloaders and use the same commands which will leverage their own scripts and tools. The idea of providing a local keychain is in my opinion valuable as more advanced use cases present themselves, hence we might end up implementing some form of keychain management through the CLI. |
0dba986
to
4912d48
Compare
…a binary for the boards that support the secure boot
…re checking is not a good idea
Co-authored-by: per1234 <[email protected]>
…" properties: The "build.keys.type" is no longer mandatory, and the default is "public_keys" We also check if the secureboot keys are all defined or none of them is.
…bility to check if they are valid
Co-authored-by: per1234 <[email protected]>
…eason for an Arduino boards platform developer to add a "secure boot" capability
The property had the same form as the special `tools.TOOL_NAME.ACTION.pattern` properties However, there is not a `build` action, the form of the property gives the impression that it is one that has special treatment by the build system. It looks like the convention is `*.flags`
Co-authored-by: per1234 <[email protected]>
Co-authored-by: per1234 <[email protected]>
162e73c
to
c40e6cb
Compare
Please check if the PR fulfills these requirements
before creating one)
our contributing guidelines
UPGRADING.md
has been updated with a migration guide (for breaking changes)feature
The secure boot is now supported in the compile command
I've added three flags to support the override of the default security keys used to sign and encrypt a binary:
--keys-keychain
allows specifying the directory used to search for the security keys--sign-key
indicates the name+extension of the sign key to use--encrypt-key
indicates the name+extension of the encryption key to useThe keys are red from the properties.Map representing the
platform.txt
file and are overwritten, even ifsecurity=sien
board option is not used. Because we don't know if it will be the standard for secure boot.titled accordingly?
See how to contribute