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()
378 const unsigned char *end) in ssl_tls13_parse_hrr_key_share_ext() argument
390 MBEDTLS_SSL_DEBUG_BUF(3, "key_share extension", p, end - buf); in ssl_tls13_parse_hrr_key_share_ext()
393 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, 2); in ssl_tls13_parse_hrr_key_share_ext()
447 (void) end; in ssl_tls13_parse_hrr_key_share_ext()
467 const unsigned char *end) in ssl_tls13_parse_key_share_ext() argument
477 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, 2); in ssl_tls13_parse_key_share_ext()
497 ret = mbedtls_ssl_tls13_read_public_xxdhe_share(ssl, p, end - p); in ssl_tls13_parse_key_share_ext()
531 const unsigned char *end) in ssl_tls13_parse_cookie_ext() argument
538 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, 2); in ssl_tls13_parse_cookie_ext()
542 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, cookie_len); in ssl_tls13_parse_cookie_ext()
564 unsigned char *end, in ssl_tls13_write_cookie_ext() argument
580 MBEDTLS_SSL_CHK_BUF_PTR(p, end, handshake->cookie_len + 6); in ssl_tls13_write_cookie_ext()
612 unsigned char *end, in ssl_tls13_write_psk_key_exchange_modes_ext() argument
632 MBEDTLS_SSL_CHK_BUF_PTR(p, end, 7); in ssl_tls13_write_psk_key_exchange_modes_ext()
795 unsigned char *end, in ssl_tls13_write_identity() argument
809 MBEDTLS_SSL_CHK_BUF_PTR(buf, end, 6 + identity_len); in ssl_tls13_write_identity()
825 unsigned char *end, in ssl_tls13_write_binder() argument
845 MBEDTLS_SSL_CHK_BUF_PTR(buf, end, 1 + binder_len); in ssl_tls13_write_binder()
895 mbedtls_ssl_context *ssl, unsigned char *buf, unsigned char *end, in mbedtls_ssl_tls13_write_identities_of_pre_shared_key_ext() argument
925 MBEDTLS_SSL_CHK_BUF_PTR(p, end, 6); in mbedtls_ssl_tls13_write_identities_of_pre_shared_key_ext()
942 ret = ssl_tls13_write_identity(ssl, p, end, in mbedtls_ssl_tls13_write_identities_of_pre_shared_key_ext()
947 ret = ssl_tls13_write_identity(ssl, p, end, identity, identity_len, in mbedtls_ssl_tls13_write_identities_of_pre_shared_key_ext()
962 ret = ssl_tls13_write_identity(ssl, p, end, identity, identity_len, 0, in mbedtls_ssl_tls13_write_identities_of_pre_shared_key_ext()
979 MBEDTLS_SSL_CHK_BUF_PTR(p, end, l_binders_len); in mbedtls_ssl_tls13_write_identities_of_pre_shared_key_ext()
999 mbedtls_ssl_context *ssl, unsigned char *buf, unsigned char *end) in mbedtls_ssl_tls13_write_binders_of_pre_shared_key_ext() argument
1011 MBEDTLS_SSL_CHK_BUF_PTR(p, end, 2); in mbedtls_ssl_tls13_write_binders_of_pre_shared_key_ext()
1017 ret = ssl_tls13_write_binder(ssl, p, end, in mbedtls_ssl_tls13_write_binders_of_pre_shared_key_ext()
1030 ret = ssl_tls13_write_binder(ssl, p, end, in mbedtls_ssl_tls13_write_binders_of_pre_shared_key_ext()
1076 const unsigned char *end) in ssl_tls13_parse_server_pre_shared_key_ext() argument
1084 MBEDTLS_SSL_CHK_BUF_READ_PTR(buf, end, 2); in ssl_tls13_parse_server_pre_shared_key_ext()
1135 unsigned char *end, in mbedtls_ssl_tls13_write_client_hello_exts() argument
1153 ret = ssl_tls13_write_supported_versions_ext(ssl, p, end, &ext_len); in mbedtls_ssl_tls13_write_client_hello_exts()
1162 ret = ssl_tls13_write_cookie_ext(ssl, p, end, &ext_len); in mbedtls_ssl_tls13_write_client_hello_exts()
1170 ssl, p, end, &ext_len); in mbedtls_ssl_tls13_write_client_hello_exts()
1179 ret = ssl_tls13_write_key_share_ext(ssl, p, end, &ext_len); in mbedtls_ssl_tls13_write_client_hello_exts()
1201 ssl, 0, p, end, &ext_len); in mbedtls_ssl_tls13_write_client_hello_exts()
1224 ret = ssl_tls13_write_psk_key_exchange_modes_ext(ssl, p, end, &ext_len); in mbedtls_ssl_tls13_write_client_hello_exts()
1336 const unsigned char *end) in ssl_tls13_is_supported_versions_ext_present() argument
1350 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, MBEDTLS_SERVER_HELLO_RANDOM_LEN + 3); in ssl_tls13_is_supported_versions_ext_present()
1360 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, legacy_session_id_echo_len + 4); in ssl_tls13_is_supported_versions_ext_present()
1364 ssl, p, end, in ssl_tls13_is_supported_versions_ext_present()
1376 const unsigned char *end) in ssl_tls13_is_downgrade_negotiation() argument
1384 MBEDTLS_SSL_CHK_BUF_READ_PTR(buf, end, MBEDTLS_SERVER_HELLO_RANDOM_LEN + 2); in ssl_tls13_is_downgrade_negotiation()
1408 const unsigned char *end) in ssl_server_hello_is_hrr() argument
1427 buf, end, 2 + sizeof(mbedtls_ssl_tls13_hello_retry_request_magic)); in ssl_server_hello_is_hrr()
1447 const unsigned char *end) in ssl_tls13_preprocess_server_hello() argument
1453 ssl, buf, end)); in ssl_tls13_preprocess_server_hello()
1457 ssl_tls13_is_downgrade_negotiation(ssl, buf, end)); in ssl_tls13_preprocess_server_hello()
1482 buf, (size_t) (end - buf))); in ssl_tls13_preprocess_server_hello()
1499 ret = ssl_server_hello_is_hrr(ssl, buf, end); in ssl_tls13_preprocess_server_hello()
1546 const unsigned char *end) in ssl_tls13_check_server_hello_session_id_echo() argument
1551 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, 1); in ssl_tls13_check_server_hello_session_id_echo()
1554 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, legacy_session_id_echo_len); in ssl_tls13_check_server_hello_session_id_echo()
1593 const unsigned char *end, in ssl_tls13_parse_server_hello() argument
1617 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, MBEDTLS_SERVER_HELLO_RANDOM_LEN + 6); in ssl_tls13_parse_server_hello()
1619 MBEDTLS_SSL_DEBUG_BUF(4, "server hello", p, end - p); in ssl_tls13_parse_server_hello()
1656 if (ssl_tls13_check_server_hello_session_id_echo(ssl, &p, end) != 0) { in ssl_tls13_parse_server_hello()
1667 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, 2); in ssl_tls13_parse_server_hello()
1714 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, 1); in ssl_tls13_parse_server_hello()
1730 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, 2); in ssl_tls13_parse_server_hello()
1735 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, extensions_len); in ssl_tls13_parse_server_hello()
2070 const unsigned char *end) in ssl_tls13_parse_encrypted_extensions() argument
2078 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, 2); in ssl_tls13_parse_encrypted_extensions()
2082 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, extensions_len); in ssl_tls13_parse_encrypted_extensions()
2178 if (p != end) { in ssl_tls13_parse_encrypted_extensions()
2399 const unsigned char *end) in ssl_tls13_parse_certificate_request() argument
2412 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, 1); in ssl_tls13_parse_certificate_request()
2417 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, certificate_request_context_len); in ssl_tls13_parse_certificate_request()
2436 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, 2); in ssl_tls13_parse_certificate_request()
2440 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, extensions_len); in ssl_tls13_parse_certificate_request()
2489 if (p != end) { in ssl_tls13_parse_certificate_request()
2749 const unsigned char *end) in ssl_tls13_parse_new_session_ticket_early_data_ext() argument
2753 MBEDTLS_SSL_CHK_BUF_READ_PTR(buf, end, 4); in ssl_tls13_parse_new_session_ticket_early_data_ext()
2769 const unsigned char *end) in ssl_tls13_parse_new_session_ticket_exts() argument
2777 while (p < end) { in ssl_tls13_parse_new_session_ticket_exts()
2782 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, 4); in ssl_tls13_parse_new_session_ticket_exts()
2787 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, extension_data_len); in ssl_tls13_parse_new_session_ticket_exts()
2840 unsigned char *end, in ssl_tls13_parse_new_session_ticket() argument
2858 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, 9); in ssl_tls13_parse_new_session_ticket()
2878 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, *ticket_nonce_len); in ssl_tls13_parse_new_session_ticket()
2884 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, 2); in ssl_tls13_parse_new_session_ticket()
2887 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, ticket_len); in ssl_tls13_parse_new_session_ticket()
2910 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, 2); in ssl_tls13_parse_new_session_ticket()
2913 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, extensions_len); in ssl_tls13_parse_new_session_ticket()