MINOR: ssl: add a get_alpn() method to ssl_sock
authorWilly Tarreau <w@1wt.eu>
Sun, 4 Dec 2016 17:44:29 +0000 (18:44 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 27 Jun 2017 12:38:02 +0000 (14:38 +0200)
commit8743f7e56763be2eef31443facbfd8afd0642166
tree44a340d34dc0e1e188c52153b2ea280c5f4116a1
parenta9c1741820830ea47d4ebfbc7a87fac902e764bf
MINOR: ssl: add a get_alpn() method to ssl_sock

This is used to retrieve the TLS ALPN information from a connection. We
also support a fallback to NPN if ALPN doesn't find anything or is not
available on the existing implementation. It happens that depending on
the library version, either one or the other is available. NPN was
present in openssl 1.0.1 (very common) while ALPN is in 1.0.2 and onwards
(still uncommon at the time of writing). Clients are used to send either
one or the other to ensure a smooth transition.
src/ssl_sock.c