freebsd / poudriere

Port/Package build and test system
https://github.com/freebsd/poudriere/wiki
BSD 2-Clause "Simplified" License
394 stars 163 forks source link

Add support for non-rsa PUBKEY signatures #1176

Closed kevans91 closed 1 month ago

kevans91 commented 1 month ago

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 commented 1 month ago

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