Internal functions shared by the SSL modules. More...
Go to the source code of this file.
Go to the SVN repository for this file.
uint32_t mbedtls_ssl_get_extension_id (unsigned int extension_type) uint32_t mbedtls_ssl_get_extension_mask (unsigned int extension_type) static int mbedtls_ssl_chk_buf_ptr (const uint8_t *cur, const uint8_t *end, size_t need) This function checks if the remaining size in a buffer is greater or equal than a needed space. More...mbedtls_ecp_group_id
for the specified TLS ID. More...
mbedtls_ecp_group_id
. More...
Internal functions shared by the SSL modules.
Definition in file ssl_misc.h.
◆ MBEDTLS_CLIENT_HELLO_RANDOM_LEN #define MBEDTLS_CLIENT_HELLO_RANDOM_LEN 32Definition at line 412 of file ssl_misc.h.
◆ MBEDTLS_RECEIVED_SIG_ALGS_SIZE #define MBEDTLS_RECEIVED_SIG_ALGS_SIZE 20Definition at line 353 of file ssl_misc.h.
◆ MBEDTLS_SERVER_HELLO_RANDOM_LEN #define MBEDTLS_SERVER_HELLO_RANDOM_LEN 32Definition at line 413 of file ssl_misc.h.
◆ MBEDTLS_SSL_CHK_BUF_PTR #define MBEDTLS_SSL_CHK_BUF_PTR ( cur, end, need ) Value:do { \
{ \
} \
} while (0)
#define MBEDTLS_ERR_SSL_BUFFER_TOO_SMALL
A buffer is too small to receive or write a message.
static int mbedtls_ssl_chk_buf_ptr(const uint8_t *cur, const uint8_t *end, size_t need)
This function checks if the remaining size in a buffer is greater or equal than a needed space.
This macro checks if the remaining size in a buffer is greater or equal than a needed space.
If it is not the case, it returns an SSL_BUFFER_TOO_SMALL error.
Definition at line 547 of file ssl_misc.h.
◆ MBEDTLS_SSL_CHK_BUF_READ_PTR #define MBEDTLS_SSL_CHK_BUF_READ_PTR ( cur, end, need ) Value:do { \
{ \
MBEDTLS_SSL_DEBUG_MSG(1, \
("missing input data in %s", __func__)); \
} \
} while (0)
#define MBEDTLS_SSL_ALERT_MSG_DECODE_ERROR
#define MBEDTLS_ERR_SSL_DECODE_ERROR
A message could not be parsed due to a syntactic error.
This macro checks if the remaining length in an input buffer is greater or equal than a needed length.
If it is not the case, it returns MBEDTLS_ERR_SSL_DECODE_ERROR error and pends a MBEDTLS_SSL_ALERT_MSG_DECODE_ERROR alert message.
This is a function-like macro. It is guaranteed to evaluate each argument exactly once.
Definition at line 569 of file ssl_misc.h.
◆ MBEDTLS_SSL_CID_LEN_MAX ◆ MBEDTLS_SSL_EXT_ID_ALPN #define MBEDTLS_SSL_EXT_ID_ALPN 8Definition at line 85 of file ssl_misc.h.
◆ MBEDTLS_SSL_EXT_ID_CERT_AUTH #define MBEDTLS_SSL_EXT_ID_CERT_AUTH 18Definition at line 95 of file ssl_misc.h.
◆ MBEDTLS_SSL_EXT_ID_CLI_CERT_TYPE #define MBEDTLS_SSL_EXT_ID_CLI_CERT_TYPE 10Definition at line 87 of file ssl_misc.h.
◆ MBEDTLS_SSL_EXT_ID_COOKIE #define MBEDTLS_SSL_EXT_ID_COOKIE 16Definition at line 93 of file ssl_misc.h.
◆ MBEDTLS_SSL_EXT_ID_EARLY_DATA #define MBEDTLS_SSL_EXT_ID_EARLY_DATA 14Definition at line 91 of file ssl_misc.h.
◆ MBEDTLS_SSL_EXT_ID_ENCRYPT_THEN_MAC #define MBEDTLS_SSL_EXT_ID_ENCRYPT_THEN_MAC 25Definition at line 102 of file ssl_misc.h.
◆ MBEDTLS_SSL_EXT_ID_EXTENDED_MASTER_SECRET #define MBEDTLS_SSL_EXT_ID_EXTENDED_MASTER_SECRET 26Definition at line 103 of file ssl_misc.h.
◆ MBEDTLS_SSL_EXT_ID_HEARTBEAT #define MBEDTLS_SSL_EXT_ID_HEARTBEAT 7Definition at line 84 of file ssl_misc.h.
◆ MBEDTLS_SSL_EXT_ID_KEY_SHARE #define MBEDTLS_SSL_EXT_ID_KEY_SHARE 22Definition at line 99 of file ssl_misc.h.
◆ MBEDTLS_SSL_EXT_ID_MAX_FRAGMENT_LENGTH #define MBEDTLS_SSL_EXT_ID_MAX_FRAGMENT_LENGTH 2Definition at line 78 of file ssl_misc.h.
◆ MBEDTLS_SSL_EXT_ID_OID_FILTERS #define MBEDTLS_SSL_EXT_ID_OID_FILTERS 19Definition at line 96 of file ssl_misc.h.
◆ MBEDTLS_SSL_EXT_ID_PADDING #define MBEDTLS_SSL_EXT_ID_PADDING 12Definition at line 89 of file ssl_misc.h.
◆ MBEDTLS_SSL_EXT_ID_POST_HANDSHAKE_AUTH #define MBEDTLS_SSL_EXT_ID_POST_HANDSHAKE_AUTH 20Definition at line 97 of file ssl_misc.h.
◆ MBEDTLS_SSL_EXT_ID_PRE_SHARED_KEY #define MBEDTLS_SSL_EXT_ID_PRE_SHARED_KEY 13Definition at line 90 of file ssl_misc.h.
◆ MBEDTLS_SSL_EXT_ID_PSK_KEY_EXCHANGE_MODES #define MBEDTLS_SSL_EXT_ID_PSK_KEY_EXCHANGE_MODES 17Definition at line 94 of file ssl_misc.h.
◆ MBEDTLS_SSL_EXT_ID_RECORD_SIZE_LIMIT #define MBEDTLS_SSL_EXT_ID_RECORD_SIZE_LIMIT 28Definition at line 105 of file ssl_misc.h.
◆ MBEDTLS_SSL_EXT_ID_SCT #define MBEDTLS_SSL_EXT_ID_SCT 9Definition at line 86 of file ssl_misc.h.
◆ MBEDTLS_SSL_EXT_ID_SERV_CERT_TYPE #define MBEDTLS_SSL_EXT_ID_SERV_CERT_TYPE 11Definition at line 88 of file ssl_misc.h.
◆ MBEDTLS_SSL_EXT_ID_SERVERNAME #define MBEDTLS_SSL_EXT_ID_SERVERNAME 1Definition at line 76 of file ssl_misc.h.
◆ MBEDTLS_SSL_EXT_ID_SERVERNAME_HOSTNAME #define MBEDTLS_SSL_EXT_ID_SERVERNAME_HOSTNAME 1Definition at line 77 of file ssl_misc.h.
◆ MBEDTLS_SSL_EXT_ID_SESSION_TICKET #define MBEDTLS_SSL_EXT_ID_SESSION_TICKET 27Definition at line 104 of file ssl_misc.h.
◆ MBEDTLS_SSL_EXT_ID_SIG_ALG #define MBEDTLS_SSL_EXT_ID_SIG_ALG 5Definition at line 82 of file ssl_misc.h.
◆ MBEDTLS_SSL_EXT_ID_SIG_ALG_CERT #define MBEDTLS_SSL_EXT_ID_SIG_ALG_CERT 21Definition at line 98 of file ssl_misc.h.
◆ MBEDTLS_SSL_EXT_ID_STATUS_REQUEST #define MBEDTLS_SSL_EXT_ID_STATUS_REQUEST 3Definition at line 79 of file ssl_misc.h.
◆ MBEDTLS_SSL_EXT_ID_SUPPORTED_ELLIPTIC_CURVES #define MBEDTLS_SSL_EXT_ID_SUPPORTED_ELLIPTIC_CURVES 4Definition at line 81 of file ssl_misc.h.
◆ MBEDTLS_SSL_EXT_ID_SUPPORTED_GROUPS #define MBEDTLS_SSL_EXT_ID_SUPPORTED_GROUPS 4Definition at line 80 of file ssl_misc.h.
◆ MBEDTLS_SSL_EXT_ID_SUPPORTED_POINT_FORMATS #define MBEDTLS_SSL_EXT_ID_SUPPORTED_POINT_FORMATS 24Definition at line 101 of file ssl_misc.h.
◆ MBEDTLS_SSL_EXT_ID_SUPPORTED_VERSIONS #define MBEDTLS_SSL_EXT_ID_SUPPORTED_VERSIONS 15Definition at line 92 of file ssl_misc.h.
◆ MBEDTLS_SSL_EXT_ID_TRUNCATED_HMAC #define MBEDTLS_SSL_EXT_ID_TRUNCATED_HMAC 23Definition at line 100 of file ssl_misc.h.
◆ MBEDTLS_SSL_EXT_ID_UNRECOGNIZED #define MBEDTLS_SSL_EXT_ID_UNRECOGNIZED 0Definition at line 75 of file ssl_misc.h.
◆ MBEDTLS_SSL_EXT_ID_USE_SRTP #define MBEDTLS_SSL_EXT_ID_USE_SRTP 6Definition at line 83 of file ssl_misc.h.
◆ MBEDTLS_SSL_EXT_MASK #define MBEDTLS_SSL_EXT_MASK ( id ) (1ULL << (MBEDTLS_SSL_EXT_ID_##id))Definition at line 111 of file ssl_misc.h.
◆ MBEDTLS_SSL_EXT_MASK_NONE #define MBEDTLS_SSL_EXT_MASK_NONE 0Definition at line 113 of file ssl_misc.h.
◆ MBEDTLS_SSL_HEADER_LEN #define MBEDTLS_SSL_HEADER_LEN 13Definition at line 392 of file ssl_misc.h.
◆ MBEDTLS_SSL_IN_BUFFER_LEN ◆ MBEDTLS_SSL_IN_PAYLOAD_LEN #define MBEDTLS_SSL_IN_PAYLOAD_LEN Value:#define MBEDTLS_SSL_IN_CONTENT_LEN
Maximum length (in bytes) of incoming plaintext fragments.
#define MBEDTLS_SSL_PAYLOAD_OVERHEAD
Definition at line 325 of file ssl_misc.h.
◆ MBEDTLS_SSL_INITIAL_HANDSHAKE #define MBEDTLS_SSL_INITIAL_HANDSHAKE 0Definition at line 64 of file ssl_misc.h.
◆ MBEDTLS_SSL_MAC_ADD #define MBEDTLS_SSL_MAC_ADD 16Definition at line 304 of file ssl_misc.h.
◆ MBEDTLS_SSL_MAX_BLOCK_LENGTH #define MBEDTLS_SSL_MAX_BLOCK_LENGTH 16Definition at line 606 of file ssl_misc.h.
◆ MBEDTLS_SSL_MAX_BUFFERED_HS #define MBEDTLS_SSL_MAX_BUFFERED_HS 4Definition at line 332 of file ssl_misc.h.
◆ MBEDTLS_SSL_MAX_CID_EXPANSION #define MBEDTLS_SSL_MAX_CID_EXPANSION 0Definition at line 316 of file ssl_misc.h.
◆ MBEDTLS_SSL_MAX_CURVE_LIST_LEN #define MBEDTLS_SSL_MAX_CURVE_LIST_LEN 65535Definition at line 351 of file ssl_misc.h.
◆ MBEDTLS_SSL_MAX_IV_LENGTH #define MBEDTLS_SSL_MAX_IV_LENGTH 16Definition at line 607 of file ssl_misc.h.
◆ MBEDTLS_SSL_MAX_KEY_LENGTH #define MBEDTLS_SSL_MAX_KEY_LENGTH 32Definition at line 608 of file ssl_misc.h.
◆ MBEDTLS_SSL_MAX_SIG_ALG_LIST_LEN #define MBEDTLS_SSL_MAX_SIG_ALG_LIST_LEN 65534Definition at line 345 of file ssl_misc.h.
◆ MBEDTLS_SSL_MIN_SIG_ALG_LIST_LEN #define MBEDTLS_SSL_MIN_SIG_ALG_LIST_LEN 2Definition at line 348 of file ssl_misc.h.
◆ MBEDTLS_SSL_OUT_BUFFER_LEN ◆ MBEDTLS_SSL_OUT_PAYLOAD_LEN #define MBEDTLS_SSL_OUT_PAYLOAD_LEN Value:#define MBEDTLS_SSL_OUT_CONTENT_LEN
Maximum length (in bytes) of outgoing plaintext fragments.
Definition at line 328 of file ssl_misc.h.
◆ MBEDTLS_SSL_PADDING_ADD #define MBEDTLS_SSL_PADDING_ADD 0Definition at line 310 of file ssl_misc.h.
◆ MBEDTLS_SSL_PAYLOAD_OVERHEAD #define MBEDTLS_SSL_PAYLOAD_OVERHEAD Value:MBEDTLS_SSL_MAC_ADD + \
MBEDTLS_SSL_PADDING_ADD + \
MBEDTLS_SSL_MAX_CID_EXPANSION \
)
#define MBEDTLS_MAX_IV_LENGTH
Maximum length of any IV, in Bytes.
Definition at line 319 of file ssl_misc.h.
◆ MBEDTLS_SSL_PEND_FATAL_ALERT ◆ MBEDTLS_SSL_PROC_CHK #define MBEDTLS_SSL_PROC_CHK ( f ) Value:do { \
if (ret != 0) \
{ \
} \
} while (0)
static void cleanup(void)
Definition at line 220 of file ssl_misc.h.
◆ MBEDTLS_SSL_PROC_CHK_NEG #define MBEDTLS_SSL_PROC_CHK_NEG ( f ) Value:do { \
if (ret < 0) \
{ \
} \
} while (0)
Definition at line 231 of file ssl_misc.h.
◆ MBEDTLS_SSL_RENEGOTIATION_DONE #define MBEDTLS_SSL_RENEGOTIATION_DONE 2 /* Done or aborted */Definition at line 66 of file ssl_misc.h.
◆ MBEDTLS_SSL_RENEGOTIATION_IN_PROGRESS #define MBEDTLS_SSL_RENEGOTIATION_IN_PROGRESS 1 /* In progress */Definition at line 65 of file ssl_misc.h.
◆ MBEDTLS_SSL_RENEGOTIATION_PENDING #define MBEDTLS_SSL_RENEGOTIATION_PENDING 3 /* Requested (server only) */Definition at line 67 of file ssl_misc.h.
◆ MBEDTLS_SSL_RETRANS_FINISHED #define MBEDTLS_SSL_RETRANS_FINISHED 3Definition at line 251 of file ssl_misc.h.
◆ MBEDTLS_SSL_RETRANS_PREPARING #define MBEDTLS_SSL_RETRANS_PREPARING 0Definition at line 248 of file ssl_misc.h.
◆ MBEDTLS_SSL_RETRANS_SENDING #define MBEDTLS_SSL_RETRANS_SENDING 1Definition at line 249 of file ssl_misc.h.
◆ MBEDTLS_SSL_RETRANS_WAITING #define MBEDTLS_SSL_RETRANS_WAITING 2Definition at line 250 of file ssl_misc.h.
◆ MBEDTLS_SSL_TLS1_3_ALLOWED_EXTS_OF_CH #define MBEDTLS_SSL_TLS1_3_ALLOWED_EXTS_OF_CH Value:MBEDTLS_SSL_EXT_MASK(MAX_FRAGMENT_LENGTH) | \
MBEDTLS_SSL_EXT_MASK(STATUS_REQUEST) | \
MBEDTLS_SSL_EXT_MASK(SUPPORTED_GROUPS) | \
MBEDTLS_SSL_EXT_MASK(SIG_ALG) | \
MBEDTLS_SSL_EXT_MASK(USE_SRTP) | \
MBEDTLS_SSL_EXT_MASK(HEARTBEAT) | \
MBEDTLS_SSL_EXT_MASK(ALPN) | \
MBEDTLS_SSL_EXT_MASK(SCT) | \
MBEDTLS_SSL_EXT_MASK(CLI_CERT_TYPE) | \
MBEDTLS_SSL_EXT_MASK(SERV_CERT_TYPE) | \
MBEDTLS_SSL_EXT_MASK(PADDING) | \
MBEDTLS_SSL_EXT_MASK(KEY_SHARE) | \
MBEDTLS_SSL_EXT_MASK(PRE_SHARED_KEY) | \
MBEDTLS_SSL_EXT_MASK(PSK_KEY_EXCHANGE_MODES) | \
MBEDTLS_SSL_EXT_MASK(EARLY_DATA) | \
MBEDTLS_SSL_EXT_MASK(COOKIE) | \
MBEDTLS_SSL_EXT_MASK(SUPPORTED_VERSIONS) | \
MBEDTLS_SSL_EXT_MASK(CERT_AUTH) | \
MBEDTLS_SSL_EXT_MASK(POST_HANDSHAKE_AUTH) | \
MBEDTLS_SSL_EXT_MASK(SIG_ALG_CERT) | \
MBEDTLS_SSL_EXT_MASK(RECORD_SIZE_LIMIT) | \
MBEDTLS_SSL_TLS1_3_EXT_MASK_UNRECOGNIZED)
#define MBEDTLS_SSL_EXT_MASK(id)
Definition at line 144 of file ssl_misc.h.
◆ MBEDTLS_SSL_TLS1_3_ALLOWED_EXTS_OF_CR #define MBEDTLS_SSL_TLS1_3_ALLOWED_EXTS_OF_CR Value:MBEDTLS_SSL_EXT_MASK(SIG_ALG) | \
MBEDTLS_SSL_EXT_MASK(SCT) | \
MBEDTLS_SSL_EXT_MASK(CERT_AUTH) | \
MBEDTLS_SSL_EXT_MASK(OID_FILTERS) | \
MBEDTLS_SSL_EXT_MASK(SIG_ALG_CERT) | \
MBEDTLS_SSL_TLS1_3_EXT_MASK_UNRECOGNIZED)
Definition at line 183 of file ssl_misc.h.
◆ MBEDTLS_SSL_TLS1_3_ALLOWED_EXTS_OF_CT #define MBEDTLS_SSL_TLS1_3_ALLOWED_EXTS_OF_CT Value:MBEDTLS_SSL_EXT_MASK(SCT))
Definition at line 193 of file ssl_misc.h.
◆ MBEDTLS_SSL_TLS1_3_ALLOWED_EXTS_OF_EE #define MBEDTLS_SSL_TLS1_3_ALLOWED_EXTS_OF_EE Value:MBEDTLS_SSL_EXT_MASK(MAX_FRAGMENT_LENGTH) | \
MBEDTLS_SSL_EXT_MASK(SUPPORTED_GROUPS) | \
MBEDTLS_SSL_EXT_MASK(USE_SRTP) | \
MBEDTLS_SSL_EXT_MASK(HEARTBEAT) | \
MBEDTLS_SSL_EXT_MASK(ALPN) | \
MBEDTLS_SSL_EXT_MASK(CLI_CERT_TYPE) | \
MBEDTLS_SSL_EXT_MASK(SERV_CERT_TYPE) | \
MBEDTLS_SSL_EXT_MASK(EARLY_DATA) | \
MBEDTLS_SSL_EXT_MASK(RECORD_SIZE_LIMIT))
Definition at line 170 of file ssl_misc.h.
◆ MBEDTLS_SSL_TLS1_3_ALLOWED_EXTS_OF_HRR #define MBEDTLS_SSL_TLS1_3_ALLOWED_EXTS_OF_HRR Value:MBEDTLS_SSL_EXT_MASK(COOKIE) | \
MBEDTLS_SSL_EXT_MASK(SUPPORTED_VERSIONS))
Definition at line 204 of file ssl_misc.h.
◆ MBEDTLS_SSL_TLS1_3_ALLOWED_EXTS_OF_NST #define MBEDTLS_SSL_TLS1_3_ALLOWED_EXTS_OF_NST Value:MBEDTLS_SSL_TLS1_3_EXT_MASK_UNRECOGNIZED)
Definition at line 210 of file ssl_misc.h.
◆ MBEDTLS_SSL_TLS1_3_ALLOWED_EXTS_OF_SH #define MBEDTLS_SSL_TLS1_3_ALLOWED_EXTS_OF_SH Value:MBEDTLS_SSL_EXT_MASK(PRE_SHARED_KEY) | \
MBEDTLS_SSL_EXT_MASK(SUPPORTED_VERSIONS))
Definition at line 198 of file ssl_misc.h.
◆ MBEDTLS_SSL_TLS1_3_EXT_MASK_UNRECOGNIZED #define MBEDTLS_SSL_TLS1_3_EXT_MASK_UNRECOGNIZED Value:MBEDTLS_SSL_EXT_MASK(ENCRYPT_THEN_MAC) | \
MBEDTLS_SSL_EXT_MASK(EXTENDED_MASTER_SECRET) | \
MBEDTLS_SSL_EXT_MASK(SESSION_TICKET) | \
MBEDTLS_SSL_EXT_MASK(TRUNCATED_HMAC) | \
MBEDTLS_SSL_EXT_MASK(UNRECOGNIZED))
Definition at line 135 of file ssl_misc.h.
◆ MBEDTLS_SSL_TLS1_3_HS_HELLO_RETRY_REQUEST ◆ MBEDTLS_TLS_EXT_ADV_CONTENT_LEN #define MBEDTLS_TLS_EXT_ADV_CONTENT_LEN ◆ MBEDTLS_TLS_EXT_ECJPAKE_KKPP_OK #define MBEDTLS_TLS_EXT_ECJPAKE_KKPP_OK (1 << 1)Definition at line 493 of file ssl_misc.h.
◆ MBEDTLS_TLS_EXT_SUPPORTED_POINT_FORMATS_PRESENT #define MBEDTLS_TLS_EXT_SUPPORTED_POINT_FORMATS_PRESENT (1 << 0)Definition at line 492 of file ssl_misc.h.
◆ mbedtls_ssl_hs_buffer ◆ mbedtls_ssl_key_set ◆ mbedtls_ssl_tls_prf_cb typedef int mbedtls_ssl_tls_prf_cb(const unsigned char *secret, size_t slen, const char *label, const unsigned char *random, size_t rlen, unsigned char *dstbuf, size_t dlen)Definition at line 585 of file ssl_misc.h.
◆ mbedtls_ssl_mode_tTLS record protection modes.
Enumerator MBEDTLS_SSL_MODE_STREAM MBEDTLS_SSL_MODE_CBC MBEDTLS_SSL_MODE_CBC_ETM MBEDTLS_SSL_MODE_AEADDefinition at line 2798 of file ssl_misc.h.
◆ mbedtls_ssl_add_hs_hdr_to_checksum() ◆ mbedtls_ssl_add_hs_msg_to_checksum() ◆ mbedtls_ssl_check_curve_tls_id() ◆ mbedtls_ssl_check_timer() ◆ mbedtls_ssl_chk_buf_ptr()This function checks if the remaining size in a buffer is greater or equal than a needed space.
Definition at line 507 of file ssl_misc.h.
◆ mbedtls_ssl_conf_is_tls12_enabled() ◆ mbedtls_ssl_conf_is_tls13_enabled() ◆ mbedtls_ssl_decrypt_buf() ◆ mbedtls_ssl_encrypt_buf() ◆ mbedtls_ssl_ep_len() ◆ mbedtls_ssl_fetch_input() ◆ mbedtls_ssl_finish_handshake_msg() ◆ mbedtls_ssl_flush_output() ◆ mbedtls_ssl_get_ecp_group_id_from_tls_id()Return mbedtls_ecp_group_id
for the specified TLS ID.
mbedtls_ecp_group_id
if the TLS ID is supported, or MBEDTLS_ECP_DP_NONE otherwise
Referenced by mbedtls_ssl_named_group_is_supported().
◆ mbedtls_ssl_get_extension_id() uint32_t mbedtls_ssl_get_extension_id ( unsigned int extension_type ) ◆ mbedtls_ssl_get_extension_mask() uint32_t mbedtls_ssl_get_extension_mask ( unsigned int extension_type ) ◆ mbedtls_ssl_get_groups() ◆ mbedtls_ssl_get_handshake_transcript() ◆ mbedtls_ssl_get_mode_from_ciphersuite() ◆ mbedtls_ssl_get_mode_from_transform() ◆ mbedtls_ssl_get_psa_curve_info_from_tls_id()Return PSA EC info for the specified TLS ID.
psa_key_type_t
value is returned here. Can be NULL. bits If the TLD ID is supported, then proper bit size is returned here. Can be NULL.
family
or bits
parameters are NULL, then the corresponding value is not returned. The function can be called with both parameters as NULL simply to check if a specific TLS ID is supported.
Return TLS ID for the specified mbedtls_ecp_group_id
.
mbedtls_ecp_group_id
ID to look for
mbedtls_ecp_group_id
is supported, or 0 otherwise
Free referenced items in an SSL handshake context and clear memory.
Update record layer.
This function roughly separates the implementation of the logic of (D)TLS from the implementation of the secure transport.
The record layer takes as input an untrusted underlying transport (stream or datagram) and transforms it into a serially multiplexed, secure transport, which conceptually provides the following:
(1) Three datagram based, content-agnostic transports for handshake, alert and CCS messages. (2) One stream- or datagram-based transport for application data. (3) Functionality for changing the underlying transform securing the contents.
The interface to this functionality is given as follows:
a Updating [Currently implemented by mbedtls_ssl_read_record]
Check if and on which of the four 'ports' data is pending: Nothing, a controlling datagram of type (1), or application data (2). In any case data is present, internal buffers provide access to the data for the user to process it. Consumption of type (1) datagrams is done automatically on the next update, invalidating that the internal buffers for previous datagrams, while consumption of application data (2) is user-controlled.
b Reading of application data [Currently manual adaption of ssl->in_offt pointer]
As mentioned in the last paragraph, consumption of data is different from the automatic consumption of control datagrams (1) because application data is treated as a stream.
c Tracking availability of application data [Currently manually through decreasing ssl->in_msglen]
For efficiency and to retain datagram semantics for application data in case of DTLS, the record layer provides functionality for checking how much application data is still available in the internal buffer.
d Changing the transformation securing the communication.
Given an opaque implementation of the record layer in the above sense, it should be possible to implement the logic of (D)TLS on top of it without the need to know anything about the record layer's internals. This is done e.g. in all the handshake handling functions, and in the application data reading function mbedtls_ssl_read.
Definition at line 2353 of file ssl_misc.h.
References MBEDTLS_SSL_IANA_TLS_GROUP_BP256R1, MBEDTLS_SSL_IANA_TLS_GROUP_BP384R1, MBEDTLS_SSL_IANA_TLS_GROUP_BP512R1, MBEDTLS_SSL_IANA_TLS_GROUP_SECP192K1, MBEDTLS_SSL_IANA_TLS_GROUP_SECP192R1, MBEDTLS_SSL_IANA_TLS_GROUP_SECP224K1, MBEDTLS_SSL_IANA_TLS_GROUP_SECP224R1, MBEDTLS_SSL_IANA_TLS_GROUP_SECP256K1, MBEDTLS_SSL_IANA_TLS_GROUP_SECP256R1, MBEDTLS_SSL_IANA_TLS_GROUP_SECP384R1, MBEDTLS_SSL_IANA_TLS_GROUP_SECP521R1, MBEDTLS_SSL_IANA_TLS_GROUP_X25519, and MBEDTLS_SSL_IANA_TLS_GROUP_X448.
◆ mbedtls_ssl_tls13_cipher_suite_is_offered() ◆ mbedtls_ssl_tls13_named_group_is_ecdhe() ◆ mbedtls_ssl_tls13_named_group_is_ffdh() ◆ mbedtls_ssl_transform_free()Free referenced items in an SSL transform context and clear memory.
Validate cipher suite against config in SSL context.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4