From b3317e1a01d2754e7ca1a9fbfb1566a8b5798d83 Mon Sep 17 00:00:00 2001 From: Jerry Yu Date: Thu, 26 Aug 2021 14:30:22 +0800 Subject: [PATCH] Add extension types in rfc8446 Signed-off-by: Jerry Yu --- include/mbedtls/ssl.h | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/include/mbedtls/ssl.h b/include/mbedtls/ssl.h index f988c0d8f..b7b22c20d 100644 --- a/include/mbedtls/ssl.h +++ b/include/mbedtls/ssl.h @@ -472,31 +472,37 @@ #define MBEDTLS_TLS_EXT_MAX_FRAGMENT_LENGTH 1 #define MBEDTLS_TLS_EXT_TRUNCATED_HMAC 4 +#define MBEDTLS_TLS_EXT_STATUS_REQUEST 5 /* RFC 8446 TLS 1.3 */ #define MBEDTLS_TLS_EXT_SUPPORTED_ELLIPTIC_CURVES 10 -#define MBEDTLS_TLS_EXT_SUPPORTED_GROUPS 10 /* Renamed in TLS 1.3 */ - +#define MBEDTLS_TLS_EXT_SUPPORTED_GROUPS 10 /* RFC 8446 TLS 1.3 */ #define MBEDTLS_TLS_EXT_SUPPORTED_POINT_FORMATS 11 -#define MBEDTLS_TLS_EXT_SIG_ALG 13 - +#define MBEDTLS_TLS_EXT_SIG_ALG 13 /* RFC 8446 TLS 1.3 */ #define MBEDTLS_TLS_EXT_USE_SRTP 14 - +#define MBEDTLS_TLS_EXT_HEARTBEAT 15 /* RFC 8446 TLS 1.3 */ #define MBEDTLS_TLS_EXT_ALPN 16 +#define MBEDTLS_TLS_EXT_SCT 18 /* RFC 8446 TLS 1.3 */ +#define MBEDTLS_TLS_EXT_SERV_CERT_TYPE 19 /* RFC 8446 TLS 1.3 */ +#define MBEDTLS_TLS_EXT_CLI_CERT_TYPE 20 /* RFC 8446 TLS 1.3 */ +#define MBEDTLS_TLS_EXT_PADDING 21 /* RFC 8446 TLS 1.3 */ #define MBEDTLS_TLS_EXT_ENCRYPT_THEN_MAC 22 /* 0x16 */ #define MBEDTLS_TLS_EXT_EXTENDED_MASTER_SECRET 0x0017 /* 23 */ #define MBEDTLS_TLS_EXT_SESSION_TICKET 35 -/* TLS 1.3 */ -#define MBEDTLS_TLS_EXT_PRE_SHARED_KEY 41 -#define MBEDTLS_TLS_EXT_EARLY_DATA 42 -#define MBEDTLS_TLS_EXT_SUPPORTED_VERSIONS 43 -#define MBEDTLS_TLS_EXT_COOKIE 44 -#define MBEDTLS_TLS_EXT_PSK_KEY_EXCHANGE_MODES 45 +#define MBEDTLS_TLS_EXT_PRE_SHARED_KEY 41 /* RFC 8446 TLS 1.3 */ +#define MBEDTLS_TLS_EXT_EARLY_DATA 42 /* RFC 8446 TLS 1.3 */ +#define MBEDTLS_TLS_EXT_SUPPORTED_VERSIONS 43 /* RFC 8446 TLS 1.3 */ +#define MBEDTLS_TLS_EXT_COOKIE 44 /* RFC 8446 TLS 1.3 */ +#define MBEDTLS_TLS_EXT_PSK_KEY_EXCHANGE_MODES 45 /* RFC 8446 TLS 1.3 */ -#define MBEDTLS_TLS_EXT_KEY_SHARES 51 +#define MBEDTLS_TLS_EXT_CERT_AUTH 47 /* RFC 8446 TLS 1.3 */ +#define MBEDTLS_TLS_EXT_OID_FILTERS 48 /* RFC 8446 TLS 1.3 */ +#define MBEDTLS_TLS_EXT_POST_HANDSHAKE_AUTH 49 /* RFC 8446 TLS 1.3 */ +#define MBEDTLS_TLS_EXT_SIG_ALG_CERT 50 /* RFC 8446 TLS 1.3 */ +#define MBEDTLS_TLS_EXT_KEY_SHARE 51 /* RFC 8446 TLS 1.3 */ /* The value of the CID extension is still TBD as of * draft-ietf-tls-dtls-connection-id-05