From 88f9a6b90fea65a997568623b89d741b0a452de2 Mon Sep 17 00:00:00 2001 From: Laukik Hase Date: Wed, 15 Sep 2021 16:17:28 +0530 Subject: [PATCH] Update README.md: Added information about session ticket feature - Enabled client session tickets as default in https_request example --- examples/protocols/https_request/README.md | 16 ++++++++++++++++ .../protocols/https_request/sdkconfig.defaults | 1 + 2 files changed, 17 insertions(+) create mode 100644 examples/protocols/https_request/sdkconfig.defaults diff --git a/examples/protocols/https_request/README.md b/examples/protocols/https_request/README.md index 1b311892e1..05fed4de5a 100644 --- a/examples/protocols/https_request/README.md +++ b/examples/protocols/https_request/README.md @@ -4,6 +4,13 @@ Uses APIs from `esp-tls` component to make a very simple HTTPS request over a se (See the README.md file in the upper level 'examples' directory for more information about examples.) +### Session Tickets + +Session Tickets, specified in [RFC 5077](https://datatracker.ietf.org/doc/html/rfc5077) are a mechanism to distribute encrypted +session-state information to the client in the form of a ticket and a mechanism to present the ticket back to the server. The ticket is created by a TLS server and sent to a TLS client. The TLS client presents the ticket to the TLS server to resume a session. In TLS 1.2, this speeds up handshakes from two to one round-trip. + +In ESP-IDF, this feature is supported (for both server and client) when mbedTLS is used as the SSL library. + ## How to use example Before project configuration and build, be sure to set the correct chip target using `idf.py set-target `. @@ -19,6 +26,15 @@ idf.py menuconfig ``` Open the project configuration menu (`idf.py menuconfig`) to configure Wi-Fi or Ethernet. See "Establishing Wi-Fi or Ethernet Connection" section in [examples/protocols/README.md](../../README.md) for more details. +#### Configuring Client Session Tickets + +Note: This example has client session tickets enabled by default. + +* Open the project configuration menu (`idf.py menuconfig`) +* In the `Component Config` -> `ESP-TLS` submenu, select the `Enable client session tickets` option. + +Ensure that the server has the session tickets feature enabled. + ### Build and Flash Build the project and flash it to the board, then run monitor tool to view serial output: diff --git a/examples/protocols/https_request/sdkconfig.defaults b/examples/protocols/https_request/sdkconfig.defaults new file mode 100644 index 0000000000..9215c9b61b --- /dev/null +++ b/examples/protocols/https_request/sdkconfig.defaults @@ -0,0 +1 @@ +CONFIG_ESP_TLS_CLIENT_SESSION_TICKETS=y