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

Server boilerplate #176

Open
andrewbaxter opened this issue Sep 10, 2022 · 2 comments
Open

Server boilerplate #176

andrewbaxter opened this issue Sep 10, 2022 · 2 comments

Comments

@andrewbaxter
Copy link

Is there a reason beyond "nobody's done it yet" that TlsAcceptor and TlsStream from the server example aren't published by this library? As it is hyper-rustls doesn't directly connect hyper and rustls.

Also it looks like the HTTP2 ALPN negotiation is on by default for the client per #95 but not the server (by the example) -- is there a reason for this?

@andrewbaxter
Copy link
Author

Excuse me, it looks like TlsAcceptor + is provided by this library, but it looks fairly different. I'm still trying to connect things together. Is this functionally the same TlsAcceptor as in the server example?

@djc
Copy link
Member

djc commented Sep 19, 2022

Lots of people have done it. I think the main reason is that the server has to provide certificates somehow, and there often isn't one obvious way to do this -- the certificates probably need to be renewed as they expire and a server might need to provide certificates for multiple host names, which have to come from somewhere. There's just more degrees of freedom in a server implementation, so providing a generically useful API isn't quite straightforward and/or quite a bit of work.

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

No branches or pull requests

2 participants