A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/ssl__misc_8h.html below:

NCBI C++ ToolKit: src/connect/mbedtls/ssl_misc.h File Reference

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...
  static int  mbedtls_ssl_transform_uses_aead (const mbedtls_ssl_transform *transform)   void  mbedtls_ssl_transform_free (mbedtls_ssl_transform *transform)   Free referenced items in an SSL transform context and clear memory. More...
  void  mbedtls_ssl_handshake_free (mbedtls_ssl_context *ssl)   Free referenced items in an SSL handshake context and clear memory. More...
  void  mbedtls_ssl_set_inbound_transform (mbedtls_ssl_context *ssl, mbedtls_ssl_transform *transform)   void  mbedtls_ssl_set_outbound_transform (mbedtls_ssl_context *ssl, mbedtls_ssl_transform *transform)   MBEDTLS_CHECK_RETURN_CRITICAL int  mbedtls_ssl_handshake_client_step (mbedtls_ssl_context *ssl)   MBEDTLS_CHECK_RETURN_CRITICAL int  mbedtls_ssl_handshake_server_step (mbedtls_ssl_context *ssl)   void  mbedtls_ssl_handshake_wrapup (mbedtls_ssl_context *ssl)   static void  mbedtls_ssl_handshake_set_state (mbedtls_ssl_context *ssl, mbedtls_ssl_states state)   static void  mbedtls_ssl_handshake_increment_state (mbedtls_ssl_context *ssl)   MBEDTLS_CHECK_RETURN_CRITICAL int  mbedtls_ssl_send_fatal_handshake_failure (mbedtls_ssl_context *ssl)   MBEDTLS_CHECK_RETURN_CRITICAL int  mbedtls_ssl_reset_checksum (mbedtls_ssl_context *ssl)   MBEDTLS_CHECK_RETURN_CRITICAL int  mbedtls_ssl_handle_message_type (mbedtls_ssl_context *ssl)   MBEDTLS_CHECK_RETURN_CRITICAL int  mbedtls_ssl_prepare_handshake_record (mbedtls_ssl_context *ssl)   MBEDTLS_CHECK_RETURN_CRITICAL int  mbedtls_ssl_update_handshake_status (mbedtls_ssl_context *ssl)   MBEDTLS_CHECK_RETURN_CRITICAL int  mbedtls_ssl_read_record (mbedtls_ssl_context *ssl, unsigned update_hs_digest)   Update record layer. More...
  MBEDTLS_CHECK_RETURN_CRITICAL int  mbedtls_ssl_fetch_input (mbedtls_ssl_context *ssl, size_t nb_want)   MBEDTLS_CHECK_RETURN_CRITICAL int  mbedtls_ssl_start_handshake_msg (mbedtls_ssl_context *ssl, unsigned char hs_type, unsigned char **buf, size_t *buf_len)   MBEDTLS_CHECK_RETURN_CRITICAL int  mbedtls_ssl_write_handshake_msg_ext (mbedtls_ssl_context *ssl, int update_checksum, int force_flush)   static int  mbedtls_ssl_write_handshake_msg (mbedtls_ssl_context *ssl)   MBEDTLS_CHECK_RETURN_CRITICAL int  mbedtls_ssl_finish_handshake_msg (mbedtls_ssl_context *ssl, size_t buf_len, size_t msg_len)   MBEDTLS_CHECK_RETURN_CRITICAL int  mbedtls_ssl_write_record (mbedtls_ssl_context *ssl, int force_flush)   MBEDTLS_CHECK_RETURN_CRITICAL int  mbedtls_ssl_flush_output (mbedtls_ssl_context *ssl)   MBEDTLS_CHECK_RETURN_CRITICAL int  mbedtls_ssl_parse_certificate (mbedtls_ssl_context *ssl)   MBEDTLS_CHECK_RETURN_CRITICAL int  mbedtls_ssl_write_certificate (mbedtls_ssl_context *ssl)   MBEDTLS_CHECK_RETURN_CRITICAL int  mbedtls_ssl_parse_change_cipher_spec (mbedtls_ssl_context *ssl)   MBEDTLS_CHECK_RETURN_CRITICAL int  mbedtls_ssl_write_change_cipher_spec (mbedtls_ssl_context *ssl)   MBEDTLS_CHECK_RETURN_CRITICAL int  mbedtls_ssl_parse_finished (mbedtls_ssl_context *ssl)   MBEDTLS_CHECK_RETURN_CRITICAL int  mbedtls_ssl_write_finished (mbedtls_ssl_context *ssl)   void  mbedtls_ssl_optimize_checksum (mbedtls_ssl_context *ssl, const mbedtls_ssl_ciphersuite_t *ciphersuite_info)   MBEDTLS_CHECK_RETURN_CRITICAL int  mbedtls_ssl_add_hs_msg_to_checksum (mbedtls_ssl_context *ssl, unsigned hs_type, unsigned char const *msg, size_t msg_len)   MBEDTLS_CHECK_RETURN_CRITICAL int  mbedtls_ssl_add_hs_hdr_to_checksum (mbedtls_ssl_context *ssl, unsigned hs_type, size_t total_hs_len)   mbedtls_md_type_t  mbedtls_ssl_md_alg_from_hash (unsigned char hash)   unsigned char  mbedtls_ssl_hash_from_md_alg (int md)   MBEDTLS_CHECK_RETURN_CRITICAL int  mbedtls_ssl_check_curve_tls_id (const mbedtls_ssl_context *ssl, uint16_t tls_id)   int  mbedtls_ssl_get_psa_curve_info_from_tls_id (uint16_t tls_id, psa_key_type_t *type, size_t *bits)   Return PSA EC info for the specified TLS ID. More...
  mbedtls_ecp_group_id  mbedtls_ssl_get_ecp_group_id_from_tls_id (uint16_t tls_id)   Return mbedtls_ecp_group_id for the specified TLS ID. More...
  uint16_t  mbedtls_ssl_get_tls_id_from_ecp_group_id (mbedtls_ecp_group_id grp_id)   Return TLS ID for the specified mbedtls_ecp_group_id. More...
  void  mbedtls_ssl_write_version (unsigned char version[2], int transport, mbedtls_ssl_protocol_version tls_version)   uint16_t  mbedtls_ssl_read_version (const unsigned char version[2], int transport)   static size_t  mbedtls_ssl_in_hdr_len (const mbedtls_ssl_context *ssl)   static size_t  mbedtls_ssl_out_hdr_len (const mbedtls_ssl_context *ssl)   static size_t  mbedtls_ssl_hs_hdr_len (const mbedtls_ssl_context *ssl)   MBEDTLS_CHECK_RETURN_CRITICAL int  mbedtls_ssl_session_copy (mbedtls_ssl_session *dst, const mbedtls_ssl_session *src)   void  mbedtls_ssl_transform_init (mbedtls_ssl_transform *transform)   MBEDTLS_CHECK_RETURN_CRITICAL int  mbedtls_ssl_encrypt_buf (mbedtls_ssl_context *ssl, mbedtls_ssl_transform *transform, mbedtls_record *rec, int(*f_rng)(void *, unsigned char *, size_t), void *p_rng)   MBEDTLS_CHECK_RETURN_CRITICAL int  mbedtls_ssl_decrypt_buf (mbedtls_ssl_context const *ssl, mbedtls_ssl_transform *transform, mbedtls_record *rec)   static size_t  mbedtls_ssl_ep_len (const mbedtls_ssl_context *ssl)   void  mbedtls_ssl_set_timer (mbedtls_ssl_context *ssl, uint32_t millisecs)   MBEDTLS_CHECK_RETURN_CRITICAL int  mbedtls_ssl_check_timer (mbedtls_ssl_context *ssl)   void  mbedtls_ssl_reset_in_pointers (mbedtls_ssl_context *ssl)   void  mbedtls_ssl_update_in_pointers (mbedtls_ssl_context *ssl)   void  mbedtls_ssl_reset_out_pointers (mbedtls_ssl_context *ssl)   void  mbedtls_ssl_update_out_pointers (mbedtls_ssl_context *ssl, mbedtls_ssl_transform *transform)   MBEDTLS_CHECK_RETURN_CRITICAL int  mbedtls_ssl_session_reset_int (mbedtls_ssl_context *ssl, int partial)   void  mbedtls_ssl_session_reset_msg_layer (mbedtls_ssl_context *ssl, int partial)   MBEDTLS_CHECK_RETURN_CRITICAL int  mbedtls_ssl_handle_pending_alert (mbedtls_ssl_context *ssl)   void  mbedtls_ssl_pend_fatal_alert (mbedtls_ssl_context *ssl, unsigned char alert_type, int alert_reason)   void  mbedtls_ssl_handshake_wrapup_free_hs_transform (mbedtls_ssl_context *ssl)   static int  mbedtls_ssl_conf_is_tls13_enabled (const mbedtls_ssl_config *conf)   ssl utils functions for checking configuration. More...
  static int  mbedtls_ssl_conf_is_tls12_enabled (const mbedtls_ssl_config *conf)   MBEDTLS_CHECK_RETURN_CRITICAL int  mbedtls_ssl_get_handshake_transcript (mbedtls_ssl_context *ssl, const mbedtls_md_type_t md, unsigned char *dst, size_t dst_len, size_t *olen)   static const void *  mbedtls_ssl_get_groups (const mbedtls_ssl_context *ssl)   static int  mbedtls_ssl_tls12_named_group_is_ecdhe (uint16_t named_group)   static int  mbedtls_ssl_tls13_named_group_is_ecdhe (uint16_t named_group)   static int  mbedtls_ssl_tls13_named_group_is_ffdh (uint16_t named_group)   static int  mbedtls_ssl_named_group_is_offered (const mbedtls_ssl_context *ssl, uint16_t named_group)   static int  mbedtls_ssl_named_group_is_supported (uint16_t named_group)   static const void *  mbedtls_ssl_get_sig_algs (const mbedtls_ssl_context *ssl)   mbedtls_ssl_mode_t  mbedtls_ssl_get_mode_from_transform (const mbedtls_ssl_transform *transform)   mbedtls_ssl_mode_t  mbedtls_ssl_get_mode_from_ciphersuite (const mbedtls_ssl_ciphersuite_t *suite)   static int  mbedtls_ssl_tls13_cipher_suite_is_offered (mbedtls_ssl_context *ssl, int cipher_suite)   MBEDTLS_CHECK_RETURN_CRITICAL int  mbedtls_ssl_validate_ciphersuite (const mbedtls_ssl_context *ssl, const mbedtls_ssl_ciphersuite_t *suite_info, mbedtls_ssl_protocol_version min_tls_version, mbedtls_ssl_protocol_version max_tls_version)   Validate cipher suite against config in SSL context. 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   32

Definition at line 412 of file ssl_misc.h.

◆ MBEDTLS_RECEIVED_SIG_ALGS_SIZE #define MBEDTLS_RECEIVED_SIG_ALGS_SIZE   20

Definition at line 353 of file ssl_misc.h.

◆ MBEDTLS_SERVER_HELLO_RANDOM_LEN #define MBEDTLS_SERVER_HELLO_RANDOM_LEN   32

Definition 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.

Parameters
cur Pointer to the current position in the buffer. end Pointer to one past the end of the buffer. need Needed space in bytes.

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.

Parameters
cur Pointer to the current position in the buffer. end Pointer to one past the end of the buffer. need Needed length in bytes.

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   8

Definition at line 85 of file ssl_misc.h.

◆ MBEDTLS_SSL_EXT_ID_CERT_AUTH #define MBEDTLS_SSL_EXT_ID_CERT_AUTH   18

Definition at line 95 of file ssl_misc.h.

◆ MBEDTLS_SSL_EXT_ID_CLI_CERT_TYPE #define MBEDTLS_SSL_EXT_ID_CLI_CERT_TYPE   10

Definition at line 87 of file ssl_misc.h.

◆ MBEDTLS_SSL_EXT_ID_COOKIE #define MBEDTLS_SSL_EXT_ID_COOKIE   16

Definition at line 93 of file ssl_misc.h.

◆ MBEDTLS_SSL_EXT_ID_EARLY_DATA #define MBEDTLS_SSL_EXT_ID_EARLY_DATA   14

Definition at line 91 of file ssl_misc.h.

◆ MBEDTLS_SSL_EXT_ID_ENCRYPT_THEN_MAC #define MBEDTLS_SSL_EXT_ID_ENCRYPT_THEN_MAC   25

Definition at line 102 of file ssl_misc.h.

◆ MBEDTLS_SSL_EXT_ID_EXTENDED_MASTER_SECRET #define MBEDTLS_SSL_EXT_ID_EXTENDED_MASTER_SECRET   26

Definition at line 103 of file ssl_misc.h.

◆ MBEDTLS_SSL_EXT_ID_HEARTBEAT #define MBEDTLS_SSL_EXT_ID_HEARTBEAT   7

Definition at line 84 of file ssl_misc.h.

◆ MBEDTLS_SSL_EXT_ID_KEY_SHARE #define MBEDTLS_SSL_EXT_ID_KEY_SHARE   22

Definition at line 99 of file ssl_misc.h.

◆ MBEDTLS_SSL_EXT_ID_MAX_FRAGMENT_LENGTH #define MBEDTLS_SSL_EXT_ID_MAX_FRAGMENT_LENGTH   2

Definition at line 78 of file ssl_misc.h.

◆ MBEDTLS_SSL_EXT_ID_OID_FILTERS #define MBEDTLS_SSL_EXT_ID_OID_FILTERS   19

Definition at line 96 of file ssl_misc.h.

◆ MBEDTLS_SSL_EXT_ID_PADDING #define MBEDTLS_SSL_EXT_ID_PADDING   12

Definition at line 89 of file ssl_misc.h.

◆ MBEDTLS_SSL_EXT_ID_POST_HANDSHAKE_AUTH #define MBEDTLS_SSL_EXT_ID_POST_HANDSHAKE_AUTH   20

Definition at line 97 of file ssl_misc.h.

◆ MBEDTLS_SSL_EXT_ID_PRE_SHARED_KEY #define MBEDTLS_SSL_EXT_ID_PRE_SHARED_KEY   13

Definition 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   17

Definition at line 94 of file ssl_misc.h.

◆ MBEDTLS_SSL_EXT_ID_RECORD_SIZE_LIMIT #define MBEDTLS_SSL_EXT_ID_RECORD_SIZE_LIMIT   28

Definition at line 105 of file ssl_misc.h.

◆ MBEDTLS_SSL_EXT_ID_SCT #define MBEDTLS_SSL_EXT_ID_SCT   9

Definition at line 86 of file ssl_misc.h.

◆ MBEDTLS_SSL_EXT_ID_SERV_CERT_TYPE #define MBEDTLS_SSL_EXT_ID_SERV_CERT_TYPE   11

Definition at line 88 of file ssl_misc.h.

◆ MBEDTLS_SSL_EXT_ID_SERVERNAME #define MBEDTLS_SSL_EXT_ID_SERVERNAME   1

Definition at line 76 of file ssl_misc.h.

◆ MBEDTLS_SSL_EXT_ID_SERVERNAME_HOSTNAME #define MBEDTLS_SSL_EXT_ID_SERVERNAME_HOSTNAME   1

Definition at line 77 of file ssl_misc.h.

◆ MBEDTLS_SSL_EXT_ID_SESSION_TICKET #define MBEDTLS_SSL_EXT_ID_SESSION_TICKET   27

Definition at line 104 of file ssl_misc.h.

◆ MBEDTLS_SSL_EXT_ID_SIG_ALG #define MBEDTLS_SSL_EXT_ID_SIG_ALG   5

Definition at line 82 of file ssl_misc.h.

◆ MBEDTLS_SSL_EXT_ID_SIG_ALG_CERT #define MBEDTLS_SSL_EXT_ID_SIG_ALG_CERT   21

Definition at line 98 of file ssl_misc.h.

◆ MBEDTLS_SSL_EXT_ID_STATUS_REQUEST #define MBEDTLS_SSL_EXT_ID_STATUS_REQUEST   3

Definition at line 79 of file ssl_misc.h.

◆ MBEDTLS_SSL_EXT_ID_SUPPORTED_ELLIPTIC_CURVES #define MBEDTLS_SSL_EXT_ID_SUPPORTED_ELLIPTIC_CURVES   4

Definition at line 81 of file ssl_misc.h.

◆ MBEDTLS_SSL_EXT_ID_SUPPORTED_GROUPS #define MBEDTLS_SSL_EXT_ID_SUPPORTED_GROUPS   4

Definition at line 80 of file ssl_misc.h.

◆ MBEDTLS_SSL_EXT_ID_SUPPORTED_POINT_FORMATS #define MBEDTLS_SSL_EXT_ID_SUPPORTED_POINT_FORMATS   24

Definition at line 101 of file ssl_misc.h.

◆ MBEDTLS_SSL_EXT_ID_SUPPORTED_VERSIONS #define MBEDTLS_SSL_EXT_ID_SUPPORTED_VERSIONS   15

Definition at line 92 of file ssl_misc.h.

◆ MBEDTLS_SSL_EXT_ID_TRUNCATED_HMAC #define MBEDTLS_SSL_EXT_ID_TRUNCATED_HMAC   23

Definition at line 100 of file ssl_misc.h.

◆ MBEDTLS_SSL_EXT_ID_UNRECOGNIZED #define MBEDTLS_SSL_EXT_ID_UNRECOGNIZED   0

Definition at line 75 of file ssl_misc.h.

◆ MBEDTLS_SSL_EXT_ID_USE_SRTP #define MBEDTLS_SSL_EXT_ID_USE_SRTP   6

Definition 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   0

Definition at line 113 of file ssl_misc.h.

◆ MBEDTLS_SSL_HEADER_LEN #define MBEDTLS_SSL_HEADER_LEN   13

Definition 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   0

Definition at line 64 of file ssl_misc.h.

◆ MBEDTLS_SSL_MAC_ADD #define MBEDTLS_SSL_MAC_ADD   16

Definition at line 304 of file ssl_misc.h.

◆ MBEDTLS_SSL_MAX_BLOCK_LENGTH #define MBEDTLS_SSL_MAX_BLOCK_LENGTH   16

Definition at line 606 of file ssl_misc.h.

◆ MBEDTLS_SSL_MAX_BUFFERED_HS #define MBEDTLS_SSL_MAX_BUFFERED_HS   4

Definition at line 332 of file ssl_misc.h.

◆ MBEDTLS_SSL_MAX_CID_EXPANSION #define MBEDTLS_SSL_MAX_CID_EXPANSION   0

Definition at line 316 of file ssl_misc.h.

◆ MBEDTLS_SSL_MAX_CURVE_LIST_LEN #define MBEDTLS_SSL_MAX_CURVE_LIST_LEN   65535

Definition at line 351 of file ssl_misc.h.

◆ MBEDTLS_SSL_MAX_IV_LENGTH #define MBEDTLS_SSL_MAX_IV_LENGTH   16

Definition at line 607 of file ssl_misc.h.

◆ MBEDTLS_SSL_MAX_KEY_LENGTH #define MBEDTLS_SSL_MAX_KEY_LENGTH   32

Definition at line 608 of file ssl_misc.h.

◆ MBEDTLS_SSL_MAX_SIG_ALG_LIST_LEN #define MBEDTLS_SSL_MAX_SIG_ALG_LIST_LEN   65534

Definition at line 345 of file ssl_misc.h.

◆ MBEDTLS_SSL_MIN_SIG_ALG_LIST_LEN #define MBEDTLS_SSL_MIN_SIG_ALG_LIST_LEN   2

Definition 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   0

Definition 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   3

Definition at line 251 of file ssl_misc.h.

◆ MBEDTLS_SSL_RETRANS_PREPARING #define MBEDTLS_SSL_RETRANS_PREPARING   0

Definition at line 248 of file ssl_misc.h.

◆ MBEDTLS_SSL_RETRANS_SENDING #define MBEDTLS_SSL_RETRANS_SENDING   1

Definition at line 249 of file ssl_misc.h.

◆ MBEDTLS_SSL_RETRANS_WAITING #define MBEDTLS_SSL_RETRANS_WAITING   2

Definition 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_t

TLS record protection modes.

Enumerator MBEDTLS_SSL_MODE_STREAM  MBEDTLS_SSL_MODE_CBC  MBEDTLS_SSL_MODE_CBC_ETM  MBEDTLS_SSL_MODE_AEAD 

Definition 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.

Parameters
cur Pointer to the current position in the buffer. end Pointer to one past the end of the buffer. need Needed space in bytes.
Returns
Zero if the needed space is available in the buffer, non-zero otherwise.

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.

Parameters
tls_id The TLS ID to look for
Returns
Proper 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.

Parameters
tls_id The TLS ID to look for type If the TLD ID is supported, then proper 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.
Returns
PSA_SUCCESS if the TLS ID is supported, PSA_ERROR_NOT_SUPPORTED otherwise
Note
If either 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.
◆ mbedtls_ssl_get_sig_algs() ◆ mbedtls_ssl_get_tls_id_from_ecp_group_id()

Return TLS ID for the specified mbedtls_ecp_group_id.

Parameters
grp_id The mbedtls_ecp_group_id ID to look for
Returns
Proper TLS ID if the mbedtls_ecp_group_id is supported, or 0 otherwise
◆ mbedtls_ssl_handle_message_type() ◆ mbedtls_ssl_handle_pending_alert() ◆ mbedtls_ssl_handshake_client_step() ◆ mbedtls_ssl_handshake_free()

Free referenced items in an SSL handshake context and clear memory.

Parameters
◆ mbedtls_ssl_handshake_increment_state() ◆ mbedtls_ssl_handshake_server_step() ◆ mbedtls_ssl_handshake_set_state() ◆ mbedtls_ssl_handshake_wrapup() ◆ mbedtls_ssl_handshake_wrapup_free_hs_transform() ◆ mbedtls_ssl_hash_from_md_alg() unsigned char mbedtls_ssl_hash_from_md_alg ( int  md ) ◆ mbedtls_ssl_hs_hdr_len() ◆ mbedtls_ssl_in_hdr_len() ◆ mbedtls_ssl_md_alg_from_hash() ◆ mbedtls_ssl_named_group_is_offered() ◆ mbedtls_ssl_named_group_is_supported() ◆ mbedtls_ssl_optimize_checksum() ◆ mbedtls_ssl_out_hdr_len() ◆ mbedtls_ssl_parse_certificate() ◆ mbedtls_ssl_parse_change_cipher_spec() ◆ mbedtls_ssl_parse_finished() ◆ mbedtls_ssl_pend_fatal_alert() ◆ mbedtls_ssl_prepare_handshake_record() ◆ mbedtls_ssl_read_record()

Update record layer.

This function roughly separates the implementation of the logic of (D)TLS from the implementation of the secure transport.

Parameters
ssl The SSL context to use. update_hs_digest This indicates if the handshake digest should be automatically updated in case a handshake message is found.
Returns
0 or non-zero error code.
Note
A clarification on what is called 'record layer' here is in order, as many sensible definitions are possible:

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.

Note
The above tries to give a conceptual picture of the record layer, but the current implementation deviates from it in some places. For example, our implementation of the update functionality through mbedtls_ssl_read_record discards datagrams depending on the current state, which wouldn't fall under the record layer's responsibility following the above definition.
◆ mbedtls_ssl_read_version() uint16_t mbedtls_ssl_read_version ( const unsigned char  version[2], int  transport  ) ◆ mbedtls_ssl_reset_checksum() ◆ mbedtls_ssl_reset_in_pointers() ◆ mbedtls_ssl_reset_out_pointers() ◆ mbedtls_ssl_send_fatal_handshake_failure() ◆ mbedtls_ssl_session_copy() ◆ mbedtls_ssl_session_reset_int() ◆ mbedtls_ssl_session_reset_msg_layer() ◆ mbedtls_ssl_set_inbound_transform() ◆ mbedtls_ssl_set_outbound_transform() ◆ mbedtls_ssl_set_timer() ◆ mbedtls_ssl_start_handshake_msg() ◆ mbedtls_ssl_tls12_named_group_is_ecdhe()

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.

Parameters
transform SSL transform context
◆ mbedtls_ssl_transform_init() ◆ mbedtls_ssl_transform_uses_aead() ◆ mbedtls_ssl_update_handshake_status() ◆ mbedtls_ssl_update_in_pointers() ◆ mbedtls_ssl_update_out_pointers() ◆ mbedtls_ssl_validate_ciphersuite()

Validate cipher suite against config in SSL context.

Parameters
ssl SSL context suite_info Cipher suite to validate min_tls_version Minimal TLS version to accept a cipher suite max_tls_version Maximal TLS version to accept a cipher suite
Returns
0 if valid, negative value otherwise.
◆ mbedtls_ssl_write_certificate() ◆ mbedtls_ssl_write_change_cipher_spec() ◆ mbedtls_ssl_write_finished() ◆ mbedtls_ssl_write_handshake_msg() ◆ mbedtls_ssl_write_handshake_msg_ext() ◆ mbedtls_ssl_write_record() ◆ mbedtls_ssl_write_version()

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