tls: add ALPN support 60/42960/7
authorMatus Fabian <[email protected]>
Wed, 14 May 2025 16:33:43 +0000 (12:33 -0400)
committerFlorin Coras <[email protected]>
Tue, 20 May 2025 18:19:43 +0000 (18:19 +0000)
commit0b039ae97659e8b14c729e8316c91062bb8cdb04
tree6cb71bdf0bec4ceffa6239925f63b6caa5411dba
parentceef3987aa2febaae9204ce3ef0718a78f95e849
tls: add ALPN support

App can pass ALPN protocols list via alpn_protos member of
transport_endpt_crypto_cfg_t. For server it should be ordered by
preference. If all set to zeros ALPN negotiation is disabled.
App can get selected protocol via tls_get_alpn_selected, it returns
TLS_ALPN_PROTO_NONE if no protocol has been selected (peer do not used
ALPN). In case that server supports no protocols that client
advertised, then server respond with fatal "no_application_protocol"
alert (TLS handshake fail).

Type: feature

Change-Id: If030672bfb7a6a9cc9a8d7b1fdd30e2776ae2c3f
Signed-off-by: Matus Fabian <[email protected]>
docs/spelling_wordlist.txt
extras/hs-test/tls_test.go [new file with mode: 0644]
src/plugins/hs_apps/CMakeLists.txt
src/plugins/hs_apps/alpn_client.c [new file with mode: 0644]
src/plugins/hs_apps/alpn_server.c [new file with mode: 0644]
src/plugins/tlsopenssl/tls_openssl.c
src/vnet/CMakeLists.txt
src/vnet/session/transport_types.h
src/vnet/tls/tls.c
src/vnet/tls/tls.h
src/vnet/tls/tls_types.h [new file with mode: 0644]