Lines Matching refs:end

48                                                   unsigned char *end,  in ssl_tls13_write_supported_versions_ext()  argument
65 MBEDTLS_SSL_CHK_BUF_PTR(p, end, 5 + versions_len); in ssl_tls13_write_supported_versions_ext()
100 const unsigned char *end) in ssl_tls13_parse_supported_versions_ext() argument
104 MBEDTLS_SSL_CHK_BUF_READ_PTR(buf, end, 2); in ssl_tls13_parse_supported_versions_ext()
114 if (&buf[2] != end) { in ssl_tls13_parse_supported_versions_ext()
131 const unsigned char *end = buf + len; in ssl_tls13_parse_alpn_ext() local
150 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, 2); in ssl_tls13_parse_alpn_ext()
154 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, protocol_name_list_len); in ssl_tls13_parse_alpn_ext()
266 unsigned char *end, in ssl_tls13_write_key_share_ext() argument
282 MBEDTLS_SSL_CHK_BUF_PTR(p, end, 6); in ssl_tls13_write_key_share_ext()
316 MBEDTLS_SSL_CHK_BUF_PTR(p, end, 4); in ssl_tls13_write_key_share_ext()
319 ssl, group_id, p, end, &key_exchange_len); in ssl_tls13_write_key_share_ext()
379 const unsigned char *end) in ssl_tls13_parse_hrr_key_share_ext() argument
391 MBEDTLS_SSL_DEBUG_BUF(3, "key_share extension", p, end - buf); in ssl_tls13_parse_hrr_key_share_ext()
394 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, 2); in ssl_tls13_parse_hrr_key_share_ext()
448 (void) end; in ssl_tls13_parse_hrr_key_share_ext()
468 const unsigned char *end) in ssl_tls13_parse_key_share_ext() argument
478 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, 2); in ssl_tls13_parse_key_share_ext()
498 ret = mbedtls_ssl_tls13_read_public_xxdhe_share(ssl, p, end - p); in ssl_tls13_parse_key_share_ext()
532 const unsigned char *end) in ssl_tls13_parse_cookie_ext() argument
539 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, 2); in ssl_tls13_parse_cookie_ext()
543 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, cookie_len); in ssl_tls13_parse_cookie_ext()
565 unsigned char *end, in ssl_tls13_write_cookie_ext() argument
581 MBEDTLS_SSL_CHK_BUF_PTR(p, end, handshake->cookie_len + 6); in ssl_tls13_write_cookie_ext()
613 unsigned char *end, in ssl_tls13_write_psk_key_exchange_modes_ext() argument
633 MBEDTLS_SSL_CHK_BUF_PTR(p, end, 7); in ssl_tls13_write_psk_key_exchange_modes_ext()
796 unsigned char *end, in ssl_tls13_write_identity() argument
810 MBEDTLS_SSL_CHK_BUF_PTR(buf, end, 6 + identity_len); in ssl_tls13_write_identity()
826 unsigned char *end, in ssl_tls13_write_binder() argument
846 MBEDTLS_SSL_CHK_BUF_PTR(buf, end, 1 + binder_len); in ssl_tls13_write_binder()
896 mbedtls_ssl_context *ssl, unsigned char *buf, unsigned char *end, in mbedtls_ssl_tls13_write_identities_of_pre_shared_key_ext() argument
926 MBEDTLS_SSL_CHK_BUF_PTR(p, end, 6); in mbedtls_ssl_tls13_write_identities_of_pre_shared_key_ext()
943 ret = ssl_tls13_write_identity(ssl, p, end, in mbedtls_ssl_tls13_write_identities_of_pre_shared_key_ext()
948 ret = ssl_tls13_write_identity(ssl, p, end, identity, identity_len, in mbedtls_ssl_tls13_write_identities_of_pre_shared_key_ext()
963 ret = ssl_tls13_write_identity(ssl, p, end, identity, identity_len, 0, in mbedtls_ssl_tls13_write_identities_of_pre_shared_key_ext()
980 MBEDTLS_SSL_CHK_BUF_PTR(p, end, l_binders_len); in mbedtls_ssl_tls13_write_identities_of_pre_shared_key_ext()
1000 mbedtls_ssl_context *ssl, unsigned char *buf, unsigned char *end) in mbedtls_ssl_tls13_write_binders_of_pre_shared_key_ext() argument
1012 MBEDTLS_SSL_CHK_BUF_PTR(p, end, 2); in mbedtls_ssl_tls13_write_binders_of_pre_shared_key_ext()
1018 ret = ssl_tls13_write_binder(ssl, p, end, in mbedtls_ssl_tls13_write_binders_of_pre_shared_key_ext()
1031 ret = ssl_tls13_write_binder(ssl, p, end, in mbedtls_ssl_tls13_write_binders_of_pre_shared_key_ext()
1077 const unsigned char *end) in ssl_tls13_parse_server_pre_shared_key_ext() argument
1085 MBEDTLS_SSL_CHK_BUF_READ_PTR(buf, end, 2); in ssl_tls13_parse_server_pre_shared_key_ext()
1136 unsigned char *end, in mbedtls_ssl_tls13_write_client_hello_exts() argument
1154 ret = ssl_tls13_write_supported_versions_ext(ssl, p, end, &ext_len); in mbedtls_ssl_tls13_write_client_hello_exts()
1163 ret = ssl_tls13_write_cookie_ext(ssl, p, end, &ext_len); in mbedtls_ssl_tls13_write_client_hello_exts()
1171 ssl, p, end, &ext_len); in mbedtls_ssl_tls13_write_client_hello_exts()
1180 ret = ssl_tls13_write_key_share_ext(ssl, p, end, &ext_len); in mbedtls_ssl_tls13_write_client_hello_exts()
1202 ssl, 0, p, end, &ext_len); in mbedtls_ssl_tls13_write_client_hello_exts()
1225 ret = ssl_tls13_write_psk_key_exchange_modes_ext(ssl, p, end, &ext_len); in mbedtls_ssl_tls13_write_client_hello_exts()
1337 const unsigned char *end) in ssl_tls13_is_supported_versions_ext_present() argument
1351 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, MBEDTLS_SERVER_HELLO_RANDOM_LEN + 3); in ssl_tls13_is_supported_versions_ext_present()
1361 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, legacy_session_id_echo_len + 4); in ssl_tls13_is_supported_versions_ext_present()
1365 ssl, p, end, in ssl_tls13_is_supported_versions_ext_present()
1377 const unsigned char *end) in ssl_tls13_is_downgrade_negotiation() argument
1385 MBEDTLS_SSL_CHK_BUF_READ_PTR(buf, end, MBEDTLS_SERVER_HELLO_RANDOM_LEN + 2); in ssl_tls13_is_downgrade_negotiation()
1409 const unsigned char *end) in ssl_server_hello_is_hrr() argument
1428 buf, end, 2 + sizeof(mbedtls_ssl_tls13_hello_retry_request_magic)); in ssl_server_hello_is_hrr()
1448 const unsigned char *end) in ssl_tls13_preprocess_server_hello() argument
1454 ssl, buf, end)); in ssl_tls13_preprocess_server_hello()
1458 ssl_tls13_is_downgrade_negotiation(ssl, buf, end)); in ssl_tls13_preprocess_server_hello()
1483 buf, (size_t) (end - buf))); in ssl_tls13_preprocess_server_hello()
1500 ret = ssl_server_hello_is_hrr(ssl, buf, end); in ssl_tls13_preprocess_server_hello()
1547 const unsigned char *end) in ssl_tls13_check_server_hello_session_id_echo() argument
1552 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, 1); in ssl_tls13_check_server_hello_session_id_echo()
1555 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, legacy_session_id_echo_len); in ssl_tls13_check_server_hello_session_id_echo()
1594 const unsigned char *end, in ssl_tls13_parse_server_hello() argument
1618 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, MBEDTLS_SERVER_HELLO_RANDOM_LEN + 6); in ssl_tls13_parse_server_hello()
1620 MBEDTLS_SSL_DEBUG_BUF(4, "server hello", p, end - p); in ssl_tls13_parse_server_hello()
1657 if (ssl_tls13_check_server_hello_session_id_echo(ssl, &p, end) != 0) { in ssl_tls13_parse_server_hello()
1668 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, 2); in ssl_tls13_parse_server_hello()
1715 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, 1); in ssl_tls13_parse_server_hello()
1731 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, 2); in ssl_tls13_parse_server_hello()
1736 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, extensions_len); in ssl_tls13_parse_server_hello()
2071 const unsigned char *end) in ssl_tls13_parse_encrypted_extensions() argument
2079 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, 2); in ssl_tls13_parse_encrypted_extensions()
2083 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, extensions_len); in ssl_tls13_parse_encrypted_extensions()
2179 if (p != end) { in ssl_tls13_parse_encrypted_extensions()
2400 const unsigned char *end) in ssl_tls13_parse_certificate_request() argument
2413 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, 1); in ssl_tls13_parse_certificate_request()
2418 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, certificate_request_context_len); in ssl_tls13_parse_certificate_request()
2437 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, 2); in ssl_tls13_parse_certificate_request()
2441 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, extensions_len); in ssl_tls13_parse_certificate_request()
2490 if (p != end) { in ssl_tls13_parse_certificate_request()
2750 const unsigned char *end) in ssl_tls13_parse_new_session_ticket_early_data_ext() argument
2754 MBEDTLS_SSL_CHK_BUF_READ_PTR(buf, end, 4); in ssl_tls13_parse_new_session_ticket_early_data_ext()
2770 const unsigned char *end) in ssl_tls13_parse_new_session_ticket_exts() argument
2778 while (p < end) { in ssl_tls13_parse_new_session_ticket_exts()
2783 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, 4); in ssl_tls13_parse_new_session_ticket_exts()
2788 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, extension_data_len); in ssl_tls13_parse_new_session_ticket_exts()
2841 unsigned char *end, in ssl_tls13_parse_new_session_ticket() argument
2859 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, 9); in ssl_tls13_parse_new_session_ticket()
2879 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, *ticket_nonce_len); in ssl_tls13_parse_new_session_ticket()
2885 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, 2); in ssl_tls13_parse_new_session_ticket()
2888 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, ticket_len); in ssl_tls13_parse_new_session_ticket()
2911 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, 2); in ssl_tls13_parse_new_session_ticket()
2914 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, extensions_len); in ssl_tls13_parse_new_session_ticket()