ssl_server2: Add usage string for TLS 1.3 key exchange modes
Signed-off-by: Hanno Becker <hanno.becker@arm.com>
diff --git a/programs/ssl/ssl_server2.c b/programs/ssl/ssl_server2.c
index 25cdb40..87558f5 100644
--- a/programs/ssl/ssl_server2.c
+++ b/programs/ssl/ssl_server2.c
@@ -433,6 +433,15 @@
#define USAGE_SERIALIZATION ""
#endif
+#if defined(MBEDTLS_SSL_PROTO_TLS1_3_EXPERIMENTAL)
+#define USAGE_TLS13_KEY_EXCHANGE_MODES \
+ " tls13_kex_modes=%%s default: all\n" \
+ " options: psk_pure, psk_ephemeral, ephemeral_pure, ephemeral_all, psk_all, all\n"
+#else
+#define USAGE_TLS13_KEY_EXCHANGE_MODES ""
+#endif /* MBEDTLS_SSL_PROTO_TLS1_3_EXPERIMENTAL */
+
+
/* USAGE is arbitrarily split to stay under the portable string literal
* length limit: 4095 bytes in C99. */
#define USAGE1 \
@@ -496,18 +505,19 @@
#define USAGE4 \
USAGE_SSL_ASYNC \
USAGE_SNI \
- " allow_sha1=%%d default: 0\n" \
- " min_version=%%s default: (library default: tls1_2)\n" \
- " max_version=%%s default: (library default: tls1_2)\n" \
- " force_version=%%s default: \"\" (none)\n" \
+ " allow_sha1=%%d default: 0\n" \
+ " min_version=%%s default: (library default: tls1_2)\n" \
+ " max_version=%%s default: (library default: tls1_2)\n" \
+ " force_version=%%s default: \"\" (none)\n" \
" options: tls1_2, dtls1_2" TLS1_3_VERSION_OPTIONS \
- "\n\n" \
- " force_ciphersuite=<name> default: all enabled\n" \
- " query_config=<name> return 0 if the specified\n" \
+ "\n\n" \
+ " force_ciphersuite=<name> default: all enabled\n" \
+ USAGE_TLS13_KEY_EXCHANGE_MODES \
+ " query_config=<name> return 0 if the specified\n" \
" configuration macro is defined and 1\n" \
" otherwise. The expansion of the macro\n" \
- " is printed if it is defined\n" \
- USAGE_SERIALIZATION \
+ " is printed if it is defined\n" \
+ USAGE_SERIALIZATION \
" acceptable ciphersuite names:\n"
#define ALPN_LIST_SIZE 10