mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-04-01 04:20:45 +00:00
fix typo and spell issues
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
This commit is contained in:
parent
e5991328ff
commit
ea52ed91cf
@ -78,7 +78,7 @@
|
|||||||
#define MBEDTLS_SSL_TLS1_3_HS_HELLO_RETRY_REQUEST ( -MBEDTLS_SSL_HS_SERVER_HELLO )
|
#define MBEDTLS_SSL_TLS1_3_HS_HELLO_RETRY_REQUEST ( -MBEDTLS_SSL_HS_SERVER_HELLO )
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Inernal identity of handshake extensions
|
* Internal identity of handshake extensions
|
||||||
*/
|
*/
|
||||||
#define MBEDTLS_SSL_EXT_ID_UNRECOGNIZED 0
|
#define MBEDTLS_SSL_EXT_ID_UNRECOGNIZED 0
|
||||||
#define MBEDTLS_SSL_EXT_ID_SERVERNAME 1
|
#define MBEDTLS_SSL_EXT_ID_SERVERNAME 1
|
||||||
@ -138,8 +138,8 @@ uint32_t mbedtls_ssl_get_extension_mask( unsigned int extension_type );
|
|||||||
* with an "illegal_parameter" alert.
|
* with an "illegal_parameter" alert.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Extensions that not recognized by TLS 1.3 */
|
/* Extensions that are not recognized by TLS 1.3 */
|
||||||
#define MBEDTLS_SSL_TLS1_3_EXT_MASK_UNREOGNIZED \
|
#define MBEDTLS_SSL_TLS1_3_EXT_MASK_UNRECOGNIZED \
|
||||||
( MBEDTLS_SSL_EXT_MASK( SUPPORTED_POINT_FORMATS ) | \
|
( MBEDTLS_SSL_EXT_MASK( SUPPORTED_POINT_FORMATS ) | \
|
||||||
MBEDTLS_SSL_EXT_MASK( ENCRYPT_THEN_MAC ) | \
|
MBEDTLS_SSL_EXT_MASK( ENCRYPT_THEN_MAC ) | \
|
||||||
MBEDTLS_SSL_EXT_MASK( EXTENDED_MASTER_SECRET ) | \
|
MBEDTLS_SSL_EXT_MASK( EXTENDED_MASTER_SECRET ) | \
|
||||||
@ -169,7 +169,7 @@ uint32_t mbedtls_ssl_get_extension_mask( unsigned int extension_type );
|
|||||||
MBEDTLS_SSL_EXT_MASK( CERT_AUTH ) | \
|
MBEDTLS_SSL_EXT_MASK( CERT_AUTH ) | \
|
||||||
MBEDTLS_SSL_EXT_MASK( POST_HANDSHAKE_AUTH ) | \
|
MBEDTLS_SSL_EXT_MASK( POST_HANDSHAKE_AUTH ) | \
|
||||||
MBEDTLS_SSL_EXT_MASK( SIG_ALG_CERT ) | \
|
MBEDTLS_SSL_EXT_MASK( SIG_ALG_CERT ) | \
|
||||||
MBEDTLS_SSL_TLS1_3_EXT_MASK_UNREOGNIZED )
|
MBEDTLS_SSL_TLS1_3_EXT_MASK_UNRECOGNIZED )
|
||||||
|
|
||||||
/* RFC 8446 section 4.2. Allowed extensions for EncryptedExtensions */
|
/* RFC 8446 section 4.2. Allowed extensions for EncryptedExtensions */
|
||||||
#define MBEDTLS_SSL_TLS1_3_ALLOWED_EXTS_OF_EE \
|
#define MBEDTLS_SSL_TLS1_3_ALLOWED_EXTS_OF_EE \
|
||||||
@ -191,7 +191,7 @@ uint32_t mbedtls_ssl_get_extension_mask( unsigned int extension_type );
|
|||||||
MBEDTLS_SSL_EXT_MASK( CERT_AUTH ) | \
|
MBEDTLS_SSL_EXT_MASK( CERT_AUTH ) | \
|
||||||
MBEDTLS_SSL_EXT_MASK( OID_FILTERS ) | \
|
MBEDTLS_SSL_EXT_MASK( OID_FILTERS ) | \
|
||||||
MBEDTLS_SSL_EXT_MASK( SIG_ALG_CERT ) | \
|
MBEDTLS_SSL_EXT_MASK( SIG_ALG_CERT ) | \
|
||||||
MBEDTLS_SSL_TLS1_3_EXT_MASK_UNREOGNIZED )
|
MBEDTLS_SSL_TLS1_3_EXT_MASK_UNRECOGNIZED )
|
||||||
|
|
||||||
/* RFC 8446 section 4.2. Allowed extensions for Certificate */
|
/* RFC 8446 section 4.2. Allowed extensions for Certificate */
|
||||||
#define MBEDTLS_SSL_TLS1_3_ALLOWED_EXTS_OF_CT \
|
#define MBEDTLS_SSL_TLS1_3_ALLOWED_EXTS_OF_CT \
|
||||||
@ -213,7 +213,7 @@ uint32_t mbedtls_ssl_get_extension_mask( unsigned int extension_type );
|
|||||||
/* RFC 8446 section 4.2. Allowed extensions for NewSessionTicket */
|
/* RFC 8446 section 4.2. Allowed extensions for NewSessionTicket */
|
||||||
#define MBEDTLS_SSL_TLS1_3_ALLOWED_EXTS_OF_NST \
|
#define MBEDTLS_SSL_TLS1_3_ALLOWED_EXTS_OF_NST \
|
||||||
( MBEDTLS_SSL_EXT_MASK( EARLY_DATA ) | \
|
( MBEDTLS_SSL_EXT_MASK( EARLY_DATA ) | \
|
||||||
MBEDTLS_SSL_TLS1_3_EXT_MASK_UNREOGNIZED )
|
MBEDTLS_SSL_TLS1_3_EXT_MASK_UNRECOGNIZED )
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Helper macros for function call with return check.
|
* Helper macros for function call with return check.
|
||||||
@ -1950,7 +1950,7 @@ static inline int mbedtls_ssl_tls13_some_psk_enabled( mbedtls_ssl_context *ssl )
|
|||||||
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_SOME_PSK_ENABLED */
|
MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_SOME_PSK_ENABLED */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Helper functions for extensions checking and convert.
|
* Helper functions for extensions checking.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
MBEDTLS_CHECK_RETURN_CRITICAL
|
MBEDTLS_CHECK_RETURN_CRITICAL
|
||||||
|
@ -618,7 +618,7 @@ uint32_t mbedtls_ssl_get_extension_mask( unsigned int extension_type )
|
|||||||
|
|
||||||
#if defined(MBEDTLS_DEBUG_C)
|
#if defined(MBEDTLS_DEBUG_C)
|
||||||
static const char *extension_name_table[] = {
|
static const char *extension_name_table[] = {
|
||||||
[MBEDTLS_SSL_EXT_ID_UNRECOGNIZED] = "unreognized",
|
[MBEDTLS_SSL_EXT_ID_UNRECOGNIZED] = "unrecognized",
|
||||||
[MBEDTLS_SSL_EXT_ID_SERVERNAME] = "server_name",
|
[MBEDTLS_SSL_EXT_ID_SERVERNAME] = "server_name",
|
||||||
[MBEDTLS_SSL_EXT_ID_MAX_FRAGMENT_LENGTH] = "max_fragment_length",
|
[MBEDTLS_SSL_EXT_ID_MAX_FRAGMENT_LENGTH] = "max_fragment_length",
|
||||||
[MBEDTLS_SSL_EXT_ID_STATUS_REQUEST] = "status_request",
|
[MBEDTLS_SSL_EXT_ID_STATUS_REQUEST] = "status_request",
|
||||||
@ -648,7 +648,7 @@ static const char *extension_name_table[] = {
|
|||||||
[MBEDTLS_SSL_EXT_ID_SESSION_TICKET] = "session_ticket"
|
[MBEDTLS_SSL_EXT_ID_SESSION_TICKET] = "session_ticket"
|
||||||
};
|
};
|
||||||
|
|
||||||
static unsigned int extension_type_tbl[]={
|
static unsigned int extension_type_table[]={
|
||||||
[MBEDTLS_SSL_EXT_ID_UNRECOGNIZED] = 0xff,
|
[MBEDTLS_SSL_EXT_ID_UNRECOGNIZED] = 0xff,
|
||||||
[MBEDTLS_SSL_EXT_ID_SERVERNAME] = MBEDTLS_TLS_EXT_SERVERNAME,
|
[MBEDTLS_SSL_EXT_ID_SERVERNAME] = MBEDTLS_TLS_EXT_SERVERNAME,
|
||||||
[MBEDTLS_SSL_EXT_ID_MAX_FRAGMENT_LENGTH] = MBEDTLS_TLS_EXT_MAX_FRAGMENT_LENGTH,
|
[MBEDTLS_SSL_EXT_ID_MAX_FRAGMENT_LENGTH] = MBEDTLS_TLS_EXT_MAX_FRAGMENT_LENGTH,
|
||||||
@ -755,7 +755,7 @@ void mbedtls_ssl_print_extensions( const mbedtls_ssl_context *ssl,
|
|||||||
i++ )
|
i++ )
|
||||||
{
|
{
|
||||||
mbedtls_ssl_print_extension_type(
|
mbedtls_ssl_print_extension_type(
|
||||||
ssl, level, file, line, hs_msg_type, extension_type_tbl[i],
|
ssl, level, file, line, hs_msg_type, extension_type_table[i],
|
||||||
extensions_mask & ( 1 << i ) ? "was" : "was not", extra );
|
extensions_mask & ( 1 << i ) ? "was" : "was not", extra );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user