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

[feature] Allow configuring Supported in SNI server hook #479

Open
epoberezkin opened this issue Sep 22, 2024 · 3 comments
Open

[feature] Allow configuring Supported in SNI server hook #479

epoberezkin opened this issue Sep 22, 2024 · 3 comments

Comments

@epoberezkin
Copy link
Contributor

epoberezkin commented Sep 22, 2024

Currently it is possible to supply server credentials in SNI hook. But Supported should cover all possible credentials. It is probably better to allow overriding or extending Supported in SNI hook?

@epoberezkin epoberezkin changed the title [feature [feature] Allow configuring Supported in SNI server hook Sep 22, 2024
@dpwiz
Copy link

dpwiz commented Sep 22, 2024

BTW, protocols available in ALPN can also depend on proposed server name. This basically enables full "virtual hosts" for TLS.

@epoberezkin
Copy link
Contributor Author

@kazu-yamamoto let us know what you think. We are currently working on serving both HTTPS and SMP on the same port (many networks block 5223), and we're already supplying different credentials based on SNI and covering Supported and ALPN, and it probably would be better to completely split server parameters based on SNI.

So if it sounds like reasonable thing for a library to support we could add two more hooks that would return Supported and ALPN, and they will be called in sequence - this would be a backwards compatible change, as servers that don't define the new hooks will continue working as usual.

So in addition to onServerNameIndication, the server would be able to configure onServerNameIndicationSupported and onServerNameIndicationALPN.

Or maybe you disagree it's needed, or have another design idea. Let us know.

@kazu-yamamoto
Copy link
Collaborator

As usual, feature requests based on real experience are always welcome.
Would you show your code via a PR?

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

3 participants