Skip to content

Reintroduce PublicKey::new and PublicSubKey::new#705

Open
overhacked wants to merge 1 commit into
rpgp:mainfrom
overhacked:overhacked/reintroduce-publickey-new
Open

Reintroduce PublicKey::new and PublicSubKey::new#705
overhacked wants to merge 1 commit into
rpgp:mainfrom
overhacked:overhacked/reintroduce-publickey-new

Conversation

@overhacked

@overhacked overhacked commented Jan 19, 2026

Copy link
Copy Markdown

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, the PublicKey::new() and PublicSubKey::new() methods, to regain the ability to construct PublicKey packets from key primitives, introduced in #142 and released in v0.8.0, rather than expose struct PubKeyInner and PubKeyInner::new() as new API surface.

@overhacked overhacked force-pushed the overhacked/reintroduce-publickey-new branch from c4361f7 to 3a6bcf1 Compare January 19, 2026 20:10
@overhacked overhacked marked this pull request as ready for review January 19, 2026 20:11
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>
@hko-s hko-s added this to the 0.19.1 milestone Feb 2, 2026
@overhacked overhacked force-pushed the overhacked/reintroduce-publickey-new branch from 3a6bcf1 to 228075f Compare February 2, 2026 14:11
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.
@overhacked overhacked force-pushed the overhacked/reintroduce-publickey-new branch from 228075f to 10443dd Compare February 2, 2026 14:26
@overhacked

Copy link
Copy Markdown
Author

Rebased to main and fixed cargo fmt error.

@hko-s hko-s modified the milestones: 0.20.0, v0.20.1 May 5, 2026
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