-
Notifications
You must be signed in to change notification settings - Fork 102
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
Added support for custom-tlv-string #425
Conversation
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.
Thanks Jim for the PR. We'll review and test. We may need to sort out the contributor agreement details. We will followup in the ticket.
Contributor agreement approved. @danielinux over to you. |
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.
Looks good to me. I was able to test using ./tools/keytools/sign --custom-tlv-string 0x0030 "0.99.910(6)" --no-sign --sha256 test-app/image.bin 6
.
It would be nice to have documentation added to docs/Signing.md. It would also be nice to have a test case added to .github/workflows/test-custom-tlv-simulator.yml
.
Over to @danielinux to finalize.
I updated the documentation. I hope you don't mind. |
Thank you so much! |
@notronrj this looks good! Thanks for taking the time to update the doc as well! I think we should also add a non-regression test to the github workflow:
[edit: updated patch to include Tag] |
@notronrj could you please add a commit with the added test in the github workflow ? |
@danielinux taking care of that now. I'm having an issue pushing the github workflow commit. See below. The error is:
What am I missing? Thank you. |
@danielinux |
@dgarske @danielinux |
Thank you all for accepting the PR. |
Thank you! |
Added the ability to create a custom-tlv using an ASCII string to the keytools/sign tool.
Example usage:
sign --custom-tlv-string 0x0030 "0.99.910(6)" --no-sign --sha256 ${projectBaseDir}/release/zephyr.bin 6
This will create a custom TLV tag as if you'd used --custom-tlv-buffer 0x0030 302E39392E393130283629
Tag: 0030 Len: 11 Val: 302E39392E393130283629
The above invocation of the sign tool generates the following header in the binary:
Showing that the two commands are equivalent see the following:
Invocation:
sign --custom-tlv-string 0x0030 "0.99.910(6)" --custom-tlv-buffer 0x0031 302E39392E393130283629 --no-sign --sha256 ${projectBaseDir}/release/zephyr.bin 6
And the resulting header in the binary:
Note: This PR came out of a support ticket at https://wolfssl.zendesk.com/hc/en-us/requests/17637