samples: http_server: add option to use ALPN for HTTP2 support
Add application level Kconfig option to enable ALPN usage for negotiating HTTP/2 connection with web browsers. Signed-off-by: Matt Rodgers <mrodgers@witekio.com>
This commit is contained in:
parent
bd83c19cc7
commit
f9b685d3fe
1 changed files with 17 additions and 0 deletions
|
@ -18,11 +18,28 @@ config NET_SAMPLE_HTTPS_SERVICE
|
||||||
bool "Enable https service"
|
bool "Enable https service"
|
||||||
depends on NET_SOCKETS_SOCKOPT_TLS || TLS_CREDENTIALS
|
depends on NET_SOCKETS_SOCKOPT_TLS || TLS_CREDENTIALS
|
||||||
|
|
||||||
|
if NET_SAMPLE_HTTPS_SERVICE
|
||||||
|
|
||||||
config NET_SAMPLE_HTTPS_SERVER_SERVICE_PORT
|
config NET_SAMPLE_HTTPS_SERVER_SERVICE_PORT
|
||||||
int "Port number for https service"
|
int "Port number for https service"
|
||||||
default 443
|
default 443
|
||||||
depends on NET_SAMPLE_HTTPS_SERVICE
|
depends on NET_SAMPLE_HTTPS_SERVICE
|
||||||
|
|
||||||
|
config NET_SAMPLE_HTTPS_USE_ALPN
|
||||||
|
bool "Allow HTTP2 connectivity with web browsers by using ALPN"
|
||||||
|
select MBEDTLS_SSL_ALPN
|
||||||
|
select HTTP_SERVER_TLS_USE_ALPN
|
||||||
|
help
|
||||||
|
Web browsers only use HTTP/2 over HTTPS, and use ALPN to determine if a
|
||||||
|
server supports HTTP/2. If this option is enabled, web browsers can use
|
||||||
|
HTTP/2 to communicate with the server. However web browsers are stricter
|
||||||
|
with security when using HTTP/2, at a minimum you will need to add the CA
|
||||||
|
certificate used to sign the server certificate into your web browser's
|
||||||
|
trusted authorities. Otherwise the connection can fail with a security
|
||||||
|
error, without giving an option to ignore this and proceed anyway.
|
||||||
|
|
||||||
|
endif # NET_SAMPLE_HTTPS_SERVICE
|
||||||
|
|
||||||
config NET_SAMPLE_PSK_HEADER_FILE
|
config NET_SAMPLE_PSK_HEADER_FILE
|
||||||
string "Header file containing PSK"
|
string "Header file containing PSK"
|
||||||
default "dummy_psk.h"
|
default "dummy_psk.h"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue