Skip to content
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

Add support for non-rsa PUBKEY signatures #1176

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kevans91
Copy link
Contributor

@kevans91 kevans91 commented Oct 3, 2024

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.

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.
@kevans91
Copy link
Contributor Author

kevans91 commented Oct 5, 2024

Closing for now; I'll finish up pkg(7) support first, then reopen

@kevans91 kevans91 closed this Oct 5, 2024
@kevans91 kevans91 reopened this Dec 16, 2024
@kevans91
Copy link
Contributor Author

pkg(7) support stack starting at https://reviews.freebsd.org/D48104

@bdrewery bdrewery self-assigned this Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants