Lines Matching full:2
68 * opaque HostName<1..2^16-1>; in ssl_write_hostname_ext()
71 * ServerName server_name_list<1..2^16-1> in ssl_write_hostname_ext()
76 p += 2; in ssl_write_hostname_ext()
79 p += 2; in ssl_write_hostname_ext()
82 p += 2; in ssl_write_hostname_ext()
87 p += 2; in ssl_write_hostname_ext()
107 * opaque ProtocolName<1..2^8-1>;
110 * ProtocolName protocol_name_list<2..2^16-1>
131 /* Check we have enough space for the extension type (2 bytes), the in ssl_write_alpn_ext()
132 * extension length (2 bytes) and the protocol_name_list length (2 bytes). in ssl_write_alpn_ext()
140 * opaque ProtocolName<1..2^8-1>; in ssl_write_alpn_ext()
143 * ProtocolName protocol_name_list<2..2^16-1> in ssl_write_alpn_ext()
161 /* List length = *out_len - 2 (ext_type) - 2 (ext_len) - 2 (list_len) */ in ssl_write_alpn_ext()
164 /* Extension length = *out_len - 2 (ext_type) - 2 (ext_len) */ in ssl_write_alpn_ext()
165 MBEDTLS_PUT_UINT16_BE(*out_len - 4, buf, 2); in ssl_write_alpn_ext()
192 * NamedGroup named_group_list<2..2^16-1>;
206 * NamedCurve named_curve_list<2..2^16-1>
215 #define SSL_WRITE_SUPPORTED_GROUPS_EXT_TLS1_3_FLAG 2
234 * - extension_type (2 bytes) in ssl_write_supported_groups_ext()
235 * - extension_data_length (2 bytes) in ssl_write_supported_groups_ext()
236 * - named_group_list_length (2 bytes) in ssl_write_supported_groups_ext()
279 MBEDTLS_SSL_CHK_BUF_PTR(p, end, 2); in ssl_write_supported_groups_ext()
281 p += 2; in ssl_write_supported_groups_ext()
298 MBEDTLS_PUT_UINT16_BE(named_group_list_len + 2, buf, 2); in ssl_write_supported_groups_ext()
303 buf + 4, named_group_list_len + 2); in ssl_write_supported_groups_ext()
343 /* Check there is space for the cipher suite list length (2 bytes). */ in ssl_write_client_hello_cipher_suites()
344 MBEDTLS_SSL_CHK_BUF_PTR(p, end, 2); in ssl_write_client_hello_cipher_suites()
345 p += 2; in ssl_write_client_hello_cipher_suites()
348 * CipherSuite cipher_suites<2..2^16-2>; in ssl_write_client_hello_cipher_suites()
374 /* Check there is space for the cipher suite identifier (2 bytes). */ in ssl_write_client_hello_cipher_suites()
375 MBEDTLS_SSL_CHK_BUF_PTR(p, end, 2); in ssl_write_client_hello_cipher_suites()
377 p += 2; in ssl_write_client_hello_cipher_suites()
389 MBEDTLS_SSL_CHK_BUF_PTR(p, end, 2); in ssl_write_client_hello_cipher_suites()
391 p += 2; in ssl_write_client_hello_cipher_suites()
399 cipher_suites_len/2)); in ssl_write_client_hello_cipher_suites()
411 * ProtocolVersion legacy_version = 0x0303; // TLS v1.2
414 * CipherSuite cipher_suites<2..2^16-2>;
415 * opaque legacy_compression_methods<1..2^8-1>;
416 * Extension extensions<8..2^16-1>;
425 * opaque cookie<0..2^8-1>; // DTLS 1.2 ONLY
426 * CipherSuite cipher_suites<2..2^16-2>;
427 * CompressionMethod compression_methods<1..2^8-1>;
432 * Extension extensions<0..2^16-1>;
472 MBEDTLS_SSL_CHK_BUF_PTR(p, end, 2); in ssl_write_client_hello_body()
475 p += 2; in ssl_write_client_hello_body()
517 * opaque cookie<0..2^8-1>; in ssl_write_client_hello_body()
563 MBEDTLS_SSL_CHK_BUF_PTR(p, end, 2); in ssl_write_client_hello_body()
575 MBEDTLS_SSL_CHK_BUF_PTR(p, end, 2); in ssl_write_client_hello_body()
577 p += 2; in ssl_write_client_hello_body()
683 extensions_len = (size_t) (p - p_extensions_len) - 2; in ssl_write_client_hello_body()
921 MBEDTLS_SSL_DEBUG_MSG(2, ("=> write client hello")); in mbedtls_ssl_write_client_hello()
1014 MBEDTLS_SSL_DEBUG_MSG(2, ("<= write client hello")); in mbedtls_ssl_write_client_hello()