|Title:||Add support for ALPN (required for HTTP/2)|
|Last Modified:||2021-08-26 12:24:56|
|Version Found In:||b5c41cdeb6|
schelte added on 2021-08-26 12:12:01:
It would be useful if the Application-Layer Protocol Negotiation (ALPN) could be added to tcltls. The ALPN extension to TLS includes the protocol negotiation within the exchange of hello messages. ALPN is able to negotiate which protocol should be handled over a secure connection in a way that is more efficient and avoids additional round trips. The HTTP/2 protocol requires the use of ALPN on secure connections.
schelte added on 2021-08-26 12:24:56: (text/x-fossil-wiki)
I have a patch for the client side, but I don't find the option to attach a file to the ticket. So I posted it [http://www.tclcode.com/patches/tls-b5c41cdeb6-alpn.diff|here]. This patch adds an -alpn option that takes a list of protocols to offer in the Client Hello message. When the connection is established, the protocol selected by the server, if any, can be determined by checking the "alpn" key in the response of the tls::status command.