Add --custom-tlv-pubkey-der option to signing tool#834
Open
mattia-moffa wants to merge 2 commits into
Open
Conversation
Allows extracting a public key from a DER file and adding it in the same format as the keystore: - `X||Y` for ECC - Raw for Ed25519/Ed448 - Public key DER for RSA
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new signing-tool CLI option to populate custom manifest TLVs from a DER-encoded public key file, converting the key material into the same byte format used by wolfBoot’s keystore. This supports embedding application-level public keys into the signed manifest without manual ASN.1 manipulation.
Changes:
- Add
--custom-tlv-pubkey-der tag filenametotools/keytools/sign, including DER parsing for ECC/Ed25519/Ed448/RSA. - Extract and store public key material in keystore-compatible formats (ECC
X||Y, EdDSA raw pubkey, RSA public key DER). - Document the new option and its behavior in
docs/Signing.md.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tools/keytools/sign.c | Implements DER public-key import/extraction and adds the new CLI option to create custom TLVs from it. |
| docs/Signing.md | Documents --custom-tlv-pubkey-der, its tag constraints, and the stored-value formats per algorithm. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allows extracting a public key from a DER file and adding it in the same format as the keystore:
X||Yfor ECCFixes #828 (comment)