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

Add support for server-side TLS "Server Name Indication" (SNI) #15

Open
rlebeau opened this issue Apr 25, 2023 · 0 comments
Open

Add support for server-side TLS "Server Name Indication" (SNI) #15

rlebeau opened this issue Apr 25, 2023 · 0 comments
Labels
Element: SSL/TLS Issues related to SSL/TLS handling, TIdSSLIOHandlerSocketBase and descendants Status: Deferred Issue to be re-reviewed in a future release Type: Enhancement Issue is proposing a new feature/enhancement

Comments

@rlebeau
Copy link
Member

rlebeau commented Apr 25, 2023

(Broken out from IndySockets/Indy#160)

http://en.wikipedia.org/wiki/Server_Name_Indication

Per http://stackoverflow.com/questions/5113333/:

On the client side, you use SSL_set_tlsext_host_name(ssl, servername) before initiating the SSL connection.

On the server side, it's a little more complicated:

  • Set up an additional SSL_CTX() for each different certificate;
  • Add a servername callback to each SSL_CTX() using SSL_CTX_set_tlsext_servername_callback();
  • In the callback, retrieve the client-supplied servername with SSL_get_servername(ssl, TLSEXT_NAMETYPE_host_name). Figure out the right SSL_CTX to go with that host name, then switch the SSL object to that SSL_CTX with SSL_set_SSL_CTX().

The s_client.c and s_server.c files in the apps/ directory of the OpenSSL source distribution implement this functionality, so they're a good resource to see how it should be done.

Client-side support for calling SSL_set_tlsext_host_name() when making an outbound SSL connection was added to TIdSSLIOHandlerSocketOpenSSL in SVN rev 5321. Server-side support when accepting an inbound SSL connection has not been implemented yet.

@rlebeau rlebeau added Type: Enhancement Issue is proposing a new feature/enhancement Element: SSL/TLS Issues related to SSL/TLS handling, TIdSSLIOHandlerSocketBase and descendants Status: Deferred Issue to be re-reviewed in a future release labels Apr 25, 2023
@rlebeau rlebeau transferred this issue from IndySockets/Indy Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Element: SSL/TLS Issues related to SSL/TLS handling, TIdSSLIOHandlerSocketBase and descendants Status: Deferred Issue to be re-reviewed in a future release Type: Enhancement Issue is proposing a new feature/enhancement
Projects
None yet
Development

No branches or pull requests

1 participant