Add support for non-rsa PUBKEY signatures #1176
Open
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.
Recent pkg accepts keys in the format "/path" or "${type}:/path", where the latter incurs a lookup in the pkgsign table for a supported signer to use the key. Unprefixed paths are assumed to be RSA to maintain a semblance of backwards compatibility.
Add a pair of functions to parse out the components of the PKG_REPO_SIGNING_KEY so that one can just use the same key spec that pkg would accept. We don't try to do any validation here so that we can just leave the source of truth of what's accepted in pkg to offer some flexibility in the future.
This is carefully designed to avoid using pkg-key(8) or a keyfile prefix if we're just using rsa, so that we don't force a new pkg version on the user until they want ecc support.