Reintroduce PublicKey::new and PublicSubKey::new#705
Open
overhacked wants to merge 1 commit into
Open
Conversation
c4361f7 to
3a6bcf1
Compare
overhacked
added a commit
to overhacked/ssh-agent-lib
that referenced
this pull request
Jan 26, 2026
The `pgp` crate hasn't yet released a version compatible with upcoming RustCrypto >0.9.x (currently in pre-release). These changes are compatible with `pgp` crate API changes as well as pending pull requests rpgp/rpgp#573 and rpgp/rpgp#705. This commit has been tested against a merge of `pgp` main (as of rpgp/rpgp@21b56ad) and the above pull requests. If the `pgp` crate API changes before its next release, this commit will need to be modified. Signed-off-by: Ross Williams <ross@ross-williams.net>
3a6bcf1 to
228075f
Compare
To support proptest, commit 17c38b9, released in v0.16.0, removed the `PublicKey::new()` and `PublicSubKey::new()` methods, replacing them with `...::from_inner(PubKeyInner)`, but `PubKeyInner` was made `#[doc(hidden)]`. This change reintroduces the previous API, `PublicKey::new()` and `PublicSubKey::new()` methods, to regain the ability to construct PublicKey packets from key primitives, introduced in rpgp#142 and released in v0.8.0, rather than expose `struct PubKeyInner` and `PubKeyInner::new()` as new API surface.
228075f to
10443dd
Compare
Author
|
Rebased to main and fixed |
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.
To support proptest, commit 17c38b9, released in v0.16.0, removed the
PublicKey::new()andPublicSubKey::new()methods, replacing them with...::from_inner(PubKeyInner), butPubKeyInnerwas made#[doc(hidden)].This change reintroduces the previous API, the
PublicKey::new()andPublicSubKey::new()methods, to regain the ability to constructPublicKeypackets from key primitives, introduced in #142 and released in v0.8.0, rather than exposestruct PubKeyInnerandPubKeyInner::new()as new API surface.