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

Pass ClientHello by reference to ResolvesServerCert #1908

Open
1 task done
blind-oracle opened this issue Apr 19, 2024 · 2 comments
Open
1 task done

Pass ClientHello by reference to ResolvesServerCert #1908

blind-oracle opened this issue Apr 19, 2024 · 2 comments
Labels
next-major-release breaking changes put off until next major release

Comments

@blind-oracle
Copy link

Checklist

  • I've searched the issue tracker for similar requests

Is your feature request related to a problem? Please describe.

I'm doing some complex TLS certificate resolving logic and the fact that ResolvesServerCert trait takes ClientHello by value rather than by reference is a bit annoying. Since it also does not implement Clone and cannot be created (new is private to crate) I cannot pass it to more than one other implementer of ResolvesServerCert and that's sometimes needed.

I understand that it's minor issue and would break API, but maybe in some future versions it can be improved.

Thanks!

Describe the solution you'd like
Pass ClientHello by reference / make it Clone / wrap in Arc

@djc
Copy link
Member

djc commented Apr 19, 2024

Have you looked at the Acceptor API? It is quite a bit more powerful and could probably handle your use case.

@blind-oracle
Copy link
Author

@djc Yes, thanks, I know about it, but for me ResolvesServerCert is mostly enough. I solved my case by adding my own internal trait that takes ClientHello by ref, so at least for now it's not a problem.

Just an idea for future releases that it might make people's life a bit easier.

Thanks!

@cpu cpu added the next-major-release breaking changes put off until next major release label Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
next-major-release breaking changes put off until next major release
Projects
None yet
Development

No branches or pull requests

3 participants