Skip to content

Support for borrowed RemoteKeyPair#212

Closed
corrideat wants to merge 6 commits into
rustls:mainfrom
ApelegHQ:borrowed-remote-key
Closed

Support for borrowed RemoteKeyPair#212
corrideat wants to merge 6 commits into
rustls:mainfrom
ApelegHQ:borrowed-remote-key

Conversation

@corrideat

Copy link
Copy Markdown
Contributor

This implements #211

@corrideat corrideat force-pushed the borrowed-remote-key branch from ccdfaf3 to f334ef6 Compare January 17, 2024 11:34
@djc djc mentioned this pull request Jan 17, 2024
@djc

djc commented Jan 17, 2024

Copy link
Copy Markdown
Member

I've submitted #213 which I think provides a simpler way to satisfy your use case. Would be happy to get your feedback.

@est31

est31 commented Jan 21, 2024

Copy link
Copy Markdown
Member

Yeah I also prefer #213 I think.

github-merge-queue Bot pushed a commit that referenced this pull request Jan 23, 2024
As an alternative to #212, this goes further in the direction of #205,
removing `alg` and `key_pair` from `CertificateParams` and requiring the
caller to pass in a reference to them when signing. This seems to have a
number of nice properties:

* `alg` is derived from the passed in `KeyPair`, so key algorithm
mismatch errors can no longer occur
* No need for passing in a signing algorithm when parsing from
pre-existing parameters or key pairs
* Should make it easy to support long-lived (remote) key pairs

The main downside as far as I can see is that the top-level API gets a
bit more complicated, because generating a `KeyPair` must now be done by
the caller, and for now we force them to pick a signing algorithm. I
think we might mitigate this by adding a no-argument constructor like
`generate_default()` (or use `generate()` for the no-argument variant
and `generate_for()` for the variant that requires an argument).

Generally, this feels like a clear improvement in the API's design to
me.
@cpu

cpu commented Jan 23, 2024

Copy link
Copy Markdown
Member

@corrideat Does #213 meet your needs? Can this PR be closed?

@cpu

cpu commented Jan 31, 2024

Copy link
Copy Markdown
Member

Since there are conflicts and I believe #213 meets the required need I'm going to close this PR. Feel free to re-open with the conflicts resolved if you think there's an outstanding need to be addressed.

Thanks for the PR!

@cpu cpu closed this Jan 31, 2024
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.

4 participants