Lines Matching refs:p

31     unsigned char *p = buf;  in ssl_write_hostname_ext()  local
46 MBEDTLS_SSL_CHK_BUF_PTR(p, end, hostname_len + 9); in ssl_write_hostname_ext()
74 MBEDTLS_PUT_UINT16_BE(MBEDTLS_TLS_EXT_SERVERNAME, p, 0); in ssl_write_hostname_ext()
75 p += 2; in ssl_write_hostname_ext()
77 MBEDTLS_PUT_UINT16_BE(hostname_len + 5, p, 0); in ssl_write_hostname_ext()
78 p += 2; in ssl_write_hostname_ext()
80 MBEDTLS_PUT_UINT16_BE(hostname_len + 3, p, 0); in ssl_write_hostname_ext()
81 p += 2; in ssl_write_hostname_ext()
83 *p++ = MBEDTLS_BYTE_0(MBEDTLS_TLS_EXT_SERVERNAME_HOSTNAME); in ssl_write_hostname_ext()
85 MBEDTLS_PUT_UINT16_BE(hostname_len, p, 0); in ssl_write_hostname_ext()
86 p += 2; in ssl_write_hostname_ext()
88 memcpy(p, ssl->hostname, hostname_len); in ssl_write_hostname_ext()
119 unsigned char *p = buf; in ssl_write_alpn_ext() local
133 MBEDTLS_SSL_CHK_BUF_PTR(p, end, 6); in ssl_write_alpn_ext()
134 MBEDTLS_PUT_UINT16_BE(MBEDTLS_TLS_EXT_ALPN, p, 0); in ssl_write_alpn_ext()
136 p += 6; in ssl_write_alpn_ext()
152 MBEDTLS_SSL_CHK_BUF_PTR(p, end, 1 + protocol_name_len); in ssl_write_alpn_ext()
153 *p++ = (unsigned char) protocol_name_len; in ssl_write_alpn_ext()
154 memcpy(p, *cur, protocol_name_len); in ssl_write_alpn_ext()
155 p += protocol_name_len; in ssl_write_alpn_ext()
158 *out_len = (size_t) (p - buf); in ssl_write_alpn_ext()
223 unsigned char *p = buf; in ssl_write_supported_groups_ext() local
237 MBEDTLS_SSL_CHK_BUF_PTR(p, end, 6); in ssl_write_supported_groups_ext()
238 p += 6; in ssl_write_supported_groups_ext()
240 named_group_list = p; in ssl_write_supported_groups_ext()
278 MBEDTLS_SSL_CHK_BUF_PTR(p, end, 2); in ssl_write_supported_groups_ext()
279 MBEDTLS_PUT_UINT16_BE(*group_list, p, 0); in ssl_write_supported_groups_ext()
280 p += 2; in ssl_write_supported_groups_ext()
288 named_group_list_len = (size_t) (p - named_group_list); in ssl_write_supported_groups_ext()
304 *out_len = (size_t) (p - buf); in ssl_write_supported_groups_ext()
324 unsigned char *p = buf; in ssl_write_client_hello_cipher_suites() local
343 MBEDTLS_SSL_CHK_BUF_PTR(p, end, 2); in ssl_write_client_hello_cipher_suites()
344 p += 2; in ssl_write_client_hello_cipher_suites()
349 cipher_suites = p; in ssl_write_client_hello_cipher_suites()
374 MBEDTLS_SSL_CHK_BUF_PTR(p, end, 2); in ssl_write_client_hello_cipher_suites()
375 MBEDTLS_PUT_UINT16_BE(cipher_suite, p, 0); in ssl_write_client_hello_cipher_suites()
376 p += 2; in ssl_write_client_hello_cipher_suites()
388 MBEDTLS_SSL_CHK_BUF_PTR(p, end, 2); in ssl_write_client_hello_cipher_suites()
389 MBEDTLS_PUT_UINT16_BE(MBEDTLS_SSL_EMPTY_RENEGOTIATION_INFO, p, 0); in ssl_write_client_hello_cipher_suites()
390 p += 2; in ssl_write_client_hello_cipher_suites()
394 cipher_suites_len = (size_t) (p - cipher_suites); in ssl_write_client_hello_cipher_suites()
401 *out_len = (size_t) (p - buf); in ssl_write_client_hello_cipher_suites()
444 unsigned char *p = buf; in ssl_write_client_hello_body() local
471 MBEDTLS_SSL_CHK_BUF_PTR(p, end, 2); in ssl_write_client_hello_body()
472 mbedtls_ssl_write_version(p, ssl->conf->transport, in ssl_write_client_hello_body()
474 p += 2; in ssl_write_client_hello_body()
484 MBEDTLS_SSL_CHK_BUF_PTR(p, end, MBEDTLS_CLIENT_HELLO_RANDOM_LEN); in ssl_write_client_hello_body()
485 memcpy(p, handshake->randbytes, MBEDTLS_CLIENT_HELLO_RANDOM_LEN); in ssl_write_client_hello_body()
487 p, MBEDTLS_CLIENT_HELLO_RANDOM_LEN); in ssl_write_client_hello_body()
488 p += MBEDTLS_CLIENT_HELLO_RANDOM_LEN; in ssl_write_client_hello_body()
506 MBEDTLS_SSL_CHK_BUF_PTR(p, end, ssl->session_negotiate->id_len + 1); in ssl_write_client_hello_body()
507 *p++ = (unsigned char) ssl->session_negotiate->id_len; in ssl_write_client_hello_body()
508 memcpy(p, ssl->session_negotiate->id, ssl->session_negotiate->id_len); in ssl_write_client_hello_body()
509 p += ssl->session_negotiate->id_len; in ssl_write_client_hello_body()
534 MBEDTLS_SSL_CHK_BUF_PTR(p, end, cookie_len + 1); in ssl_write_client_hello_body()
535 *p++ = (unsigned char) cookie_len; in ssl_write_client_hello_body()
537 memcpy(p, handshake->cookie, cookie_len); in ssl_write_client_hello_body()
538 p += cookie_len; in ssl_write_client_hello_body()
544 ret = ssl_write_client_hello_cipher_suites(ssl, p, end, in ssl_write_client_hello_body()
550 p += output_len; in ssl_write_client_hello_body()
562 MBEDTLS_SSL_CHK_BUF_PTR(p, end, 2); in ssl_write_client_hello_body()
563 *p++ = 1; in ssl_write_client_hello_body()
564 *p++ = MBEDTLS_SSL_COMPRESS_NULL; in ssl_write_client_hello_body()
574 MBEDTLS_SSL_CHK_BUF_PTR(p, end, 2); in ssl_write_client_hello_body()
575 p_extensions_len = p; in ssl_write_client_hello_body()
576 p += 2; in ssl_write_client_hello_body()
580 ret = ssl_write_hostname_ext(ssl, p, end, &output_len); in ssl_write_client_hello_body()
584 p += output_len; in ssl_write_client_hello_body()
588 ret = ssl_write_alpn_ext(ssl, p, end, &output_len); in ssl_write_client_hello_body()
592 p += output_len; in ssl_write_client_hello_body()
597 ret = mbedtls_ssl_tls13_write_client_hello_exts(ssl, p, end, in ssl_write_client_hello_body()
602 p += output_len; in ssl_write_client_hello_body()
624 ret = ssl_write_supported_groups_ext(ssl, p, end, in ssl_write_client_hello_body()
630 p += output_len; in ssl_write_client_hello_body()
647 ret = mbedtls_ssl_write_sig_alg_ext(ssl, p, end, &output_len); in ssl_write_client_hello_body()
651 p += output_len; in ssl_write_client_hello_body()
657 ret = mbedtls_ssl_tls12_write_client_hello_exts(ssl, p, end, in ssl_write_client_hello_body()
663 p += output_len; in ssl_write_client_hello_body()
673 ssl, p, end, &output_len, binders_len); in ssl_write_client_hello_body()
677 p += output_len; in ssl_write_client_hello_body()
682 extensions_len = (size_t) (p - p_extensions_len) - 2; in ssl_write_client_hello_body()
685 p = p_extensions_len; in ssl_write_client_hello_body()
694 *out_len = (size_t) (p - buf); in ssl_write_client_hello_body()