Lines Matching refs:buf

47                                                   unsigned char *buf,  in ssl_tls13_write_supported_versions_ext()  argument
51 unsigned char *p = buf; in ssl_tls13_write_supported_versions_ext()
99 const unsigned char *buf, 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()
105 if (mbedtls_ssl_read_version(buf, ssl->conf->transport) != in ssl_tls13_parse_supported_versions_ext()
114 if (&buf[2] != end) { in ssl_tls13_parse_supported_versions_ext()
128 const unsigned char *buf, size_t len) in ssl_tls13_parse_alpn_ext() argument
130 const unsigned char *p = buf; in ssl_tls13_parse_alpn_ext()
131 const unsigned char *end = buf + len; in ssl_tls13_parse_alpn_ext()
265 unsigned char *buf, in ssl_tls13_write_key_share_ext() argument
269 unsigned char *p = buf; in ssl_tls13_write_key_share_ext()
344 MBEDTLS_PUT_UINT16_BE(MBEDTLS_TLS_EXT_KEY_SHARE, buf, 0); in ssl_tls13_write_key_share_ext()
346 MBEDTLS_PUT_UINT16_BE(client_shares_len + 2, buf, 2); in ssl_tls13_write_key_share_ext()
348 MBEDTLS_PUT_UINT16_BE(client_shares_len, buf, 4); in ssl_tls13_write_key_share_ext()
354 *out_len = p - buf; in ssl_tls13_write_key_share_ext()
357 3, "client hello, key_share extension", buf, *out_len); in ssl_tls13_write_key_share_ext()
377 const unsigned char *buf, in ssl_tls13_parse_hrr_key_share_ext() argument
381 const unsigned char *p = buf; in ssl_tls13_parse_hrr_key_share_ext()
390 MBEDTLS_SSL_DEBUG_BUF(3, "key_share extension", p, end - buf); in ssl_tls13_parse_hrr_key_share_ext()
446 (void) buf; in ssl_tls13_parse_hrr_key_share_ext()
466 const unsigned char *buf, in ssl_tls13_parse_key_share_ext() argument
470 const unsigned char *p = buf; in ssl_tls13_parse_key_share_ext()
530 const unsigned char *buf, in ssl_tls13_parse_cookie_ext() argument
534 const unsigned char *p = buf; in ssl_tls13_parse_cookie_ext()
563 unsigned char *buf, in ssl_tls13_write_cookie_ext() argument
567 unsigned char *p = buf; in ssl_tls13_write_cookie_ext()
611 unsigned char *buf, in ssl_tls13_write_psk_key_exchange_modes_ext() argument
615 unsigned char *p = buf; in ssl_tls13_write_psk_key_exchange_modes_ext()
658 MBEDTLS_PUT_UINT16_BE(ke_modes_len + 1, buf, 2); in ssl_tls13_write_psk_key_exchange_modes_ext()
659 buf[4] = ke_modes_len; in ssl_tls13_write_psk_key_exchange_modes_ext()
661 *out_len = p - buf; in ssl_tls13_write_psk_key_exchange_modes_ext()
794 unsigned char *buf, in ssl_tls13_write_identity() argument
809 MBEDTLS_SSL_CHK_BUF_PTR(buf, end, 6 + identity_len); in ssl_tls13_write_identity()
811 MBEDTLS_PUT_UINT16_BE(identity_len, buf, 0); in ssl_tls13_write_identity()
812 memcpy(buf + 2, identity, identity_len); in ssl_tls13_write_identity()
813 MBEDTLS_PUT_UINT32_BE(obfuscated_ticket_age, buf, 2 + identity_len); in ssl_tls13_write_identity()
815 MBEDTLS_SSL_DEBUG_BUF(4, "write identity", buf, 6 + identity_len); in ssl_tls13_write_identity()
824 unsigned char *buf, in ssl_tls13_write_binder() argument
845 MBEDTLS_SSL_CHK_BUF_PTR(buf, end, 1 + binder_len); in ssl_tls13_write_binder()
847 buf[0] = binder_len; in ssl_tls13_write_binder()
859 transcript, buf + 1); in ssl_tls13_write_binder()
864 MBEDTLS_SSL_DEBUG_BUF(4, "write binder", buf, 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
900 unsigned char *p = buf; in mbedtls_ssl_tls13_write_identities_of_pre_shared_key_ext()
986 MBEDTLS_PUT_UINT16_BE(MBEDTLS_TLS_EXT_PRE_SHARED_KEY, buf, 0); in mbedtls_ssl_tls13_write_identities_of_pre_shared_key_ext()
987 MBEDTLS_PUT_UINT16_BE(p - buf - 4 + l_binders_len, buf, 2); in mbedtls_ssl_tls13_write_identities_of_pre_shared_key_ext()
988 MBEDTLS_PUT_UINT16_BE(p - buf - 6, buf, 4); in mbedtls_ssl_tls13_write_identities_of_pre_shared_key_ext()
990 *out_len = (p - buf) + l_binders_len; in mbedtls_ssl_tls13_write_identities_of_pre_shared_key_ext()
993 MBEDTLS_SSL_DEBUG_BUF(3, "pre_shared_key identities", buf, p - buf); 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
1002 unsigned char *p = buf; in mbedtls_ssl_tls13_write_binders_of_pre_shared_key_ext()
1045 MBEDTLS_PUT_UINT16_BE(p - buf - 2, buf, 0); in mbedtls_ssl_tls13_write_binders_of_pre_shared_key_ext()
1047 MBEDTLS_SSL_DEBUG_BUF(3, "pre_shared_key binders", buf, p - buf); in mbedtls_ssl_tls13_write_binders_of_pre_shared_key_ext()
1075 const unsigned char *buf, 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()
1085 selected_identity = MBEDTLS_GET_UINT16_BE(buf, 0); in ssl_tls13_parse_server_pre_shared_key_ext()
1134 unsigned char *buf, in mbedtls_ssl_tls13_write_client_hello_exts() argument
1139 unsigned char *p = buf; in mbedtls_ssl_tls13_write_client_hello_exts()
1226 *out_len = p - buf; in mbedtls_ssl_tls13_write_client_hello_exts()
1330 const unsigned char *buf, in ssl_tls13_is_supported_versions_ext_present() argument
1333 const unsigned char *p = buf; in ssl_tls13_is_supported_versions_ext_present()
1370 const unsigned char *buf, in ssl_tls13_is_downgrade_negotiation() argument
1379 MBEDTLS_SSL_CHK_BUF_READ_PTR(buf, end, MBEDTLS_SERVER_HELLO_RANDOM_LEN + 2); in ssl_tls13_is_downgrade_negotiation()
1380 last_eight_bytes_of_random = buf + 2 + MBEDTLS_SERVER_HELLO_RANDOM_LEN - 8; in ssl_tls13_is_downgrade_negotiation()
1402 const unsigned char *buf, in ssl_server_hello_is_hrr() argument
1422 buf, end, 2 + sizeof(mbedtls_ssl_tls13_hello_retry_request_magic)); in ssl_server_hello_is_hrr()
1424 if (memcmp(buf + 2, mbedtls_ssl_tls13_hello_retry_request_magic, in ssl_server_hello_is_hrr()
1441 const unsigned char *buf, in ssl_tls13_preprocess_server_hello() argument
1448 ssl, buf, end)); in ssl_tls13_preprocess_server_hello()
1452 ssl_tls13_is_downgrade_negotiation(ssl, buf, end)); in ssl_tls13_preprocess_server_hello()
1477 buf, (size_t) (end - buf))); in ssl_tls13_preprocess_server_hello()
1494 ret = ssl_server_hello_is_hrr(ssl, buf, end); in ssl_tls13_preprocess_server_hello()
1540 const unsigned char **buf, in ssl_tls13_check_server_hello_session_id_echo() argument
1543 const unsigned char *p = *buf; in ssl_tls13_check_server_hello_session_id_echo()
1567 *buf = p; in ssl_tls13_check_server_hello_session_id_echo()
1587 const unsigned char *buf, in ssl_tls13_parse_server_hello() argument
1592 const unsigned char *p = buf; in ssl_tls13_parse_server_hello()
1994 unsigned char *buf = NULL; in ssl_tls13_process_server_hello() local
2001 ssl, MBEDTLS_SSL_HS_SERVER_HELLO, &buf, &buf_len)); in ssl_tls13_process_server_hello()
2003 ret = ssl_tls13_preprocess_server_hello(ssl, buf, buf + buf_len); in ssl_tls13_process_server_hello()
2015 MBEDTLS_SSL_PROC_CHK(ssl_tls13_parse_server_hello(ssl, buf, in ssl_tls13_process_server_hello()
2016 buf + buf_len, in ssl_tls13_process_server_hello()
2023 ssl, MBEDTLS_SSL_HS_SERVER_HELLO, buf, buf_len)); in ssl_tls13_process_server_hello()
2064 const unsigned char *buf, in ssl_tls13_parse_encrypted_extensions() argument
2069 const unsigned char *p = buf; in ssl_tls13_parse_encrypted_extensions()
2187 unsigned char *buf; in ssl_tls13_process_encrypted_extensions() local
2195 &buf, &buf_len)); in ssl_tls13_process_encrypted_extensions()
2199 ssl_tls13_parse_encrypted_extensions(ssl, buf, buf + buf_len)); in ssl_tls13_process_encrypted_extensions()
2262 buf, buf_len)); in ssl_tls13_process_encrypted_extensions()
2299 unsigned char *buf = NULL; in ssl_tls13_write_end_of_early_data() local
2305 &buf, &buf_len)); in ssl_tls13_write_end_of_early_data()
2393 const unsigned char *buf, in ssl_tls13_parse_certificate_request() argument
2397 const unsigned char *p = buf; in ssl_tls13_parse_certificate_request()
2522 unsigned char *buf; in ssl_tls13_process_certificate_request() local
2527 &buf, &buf_len)); in ssl_tls13_process_certificate_request()
2530 ssl, buf, buf + buf_len)); in ssl_tls13_process_certificate_request()
2534 buf, buf_len)); in ssl_tls13_process_certificate_request()
2743 const unsigned char *buf, in ssl_tls13_parse_new_session_ticket_early_data_ext() argument
2748 MBEDTLS_SSL_CHK_BUF_READ_PTR(buf, end, 4); in ssl_tls13_parse_new_session_ticket_early_data_ext()
2750 session->max_early_data_size = MBEDTLS_GET_UINT32_BE(buf, 0); in ssl_tls13_parse_new_session_ticket_early_data_ext()
2763 const unsigned char *buf, in ssl_tls13_parse_new_session_ticket_exts() argument
2767 const unsigned char *p = buf; in ssl_tls13_parse_new_session_ticket_exts()
2834 unsigned char *buf, in ssl_tls13_parse_new_session_ticket() argument
2840 unsigned char *p = buf; in ssl_tls13_parse_new_session_ticket()
3012 unsigned char *buf; in ssl_tls13_process_new_session_ticket() local
3021 &buf, &buf_len)); in ssl_tls13_process_new_session_ticket()
3030 ssl, buf, buf + buf_len, in ssl_tls13_process_new_session_ticket()