Home
last modified time | relevance | path

Searched refs:cookie_len (Results 1 – 9 of 9) sorted by relevance

/lib/mbedtls/external/mbedtls/library/
A Dssl_client.c522 uint8_t cookie_len = 0; in ssl_write_client_hello_body() local
524 uint16_t cookie_len = 0; in ssl_write_client_hello_body()
530 handshake->cookie_len); in ssl_write_client_hello_body()
531 cookie_len = handshake->cookie_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()
536 if (cookie_len > 0) { 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()
A Dssl_tls13_client.c533 uint16_t cookie_len; in ssl_tls13_parse_cookie_ext() local
539 cookie_len = MBEDTLS_GET_UINT16_BE(p, 0); in ssl_tls13_parse_cookie_ext()
542 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, cookie_len); in ssl_tls13_parse_cookie_ext()
546 handshake->cookie_len = 0; in ssl_tls13_parse_cookie_ext()
547 handshake->cookie = mbedtls_calloc(1, cookie_len); in ssl_tls13_parse_cookie_ext()
551 cookie_len)); in ssl_tls13_parse_cookie_ext()
555 memcpy(handshake->cookie, p, cookie_len); in ssl_tls13_parse_cookie_ext()
556 handshake->cookie_len = cookie_len; in ssl_tls13_parse_cookie_ext()
578 handshake->cookie_len); in ssl_tls13_write_cookie_ext()
586 MBEDTLS_PUT_UINT16_BE(handshake->cookie_len, p, 4); in ssl_tls13_write_cookie_ext()
[all …]
A Dssl_cookie.c275 const unsigned char *cookie, size_t cookie_len, in mbedtls_ssl_cookie_check() argument
293 if (cookie_len != COOKIE_LEN) { in mbedtls_ssl_cookie_check()
A Dssl_tls12_client.c1099 uint8_t cookie_len; in ssl_parse_hello_verify_request() local
1101 uint16_t cookie_len; in ssl_parse_hello_verify_request() local
1142 cookie_len = *p++; in ssl_parse_hello_verify_request()
1143 if ((ssl->in_msg + ssl->in_msglen) - p < cookie_len) { in ssl_parse_hello_verify_request()
1150 MBEDTLS_SSL_DEBUG_BUF(3, "cookie", p, cookie_len); in ssl_parse_hello_verify_request()
1154 ssl->handshake->cookie = mbedtls_calloc(1, cookie_len); in ssl_parse_hello_verify_request()
1156 MBEDTLS_SSL_DEBUG_MSG(1, ("alloc failed (%d bytes)", cookie_len)); in ssl_parse_hello_verify_request()
1160 memcpy(ssl->handshake->cookie, p, cookie_len); in ssl_parse_hello_verify_request()
1161 ssl->handshake->cookie_len = cookie_len; in ssl_parse_hello_verify_request()
1241 ssl->handshake->cookie_len = 0; in ssl_parse_server_hello()
A Dssl_tls12_server.c894 size_t cookie_offset, cookie_len; in ssl_parse_client_hello() local
1207 cookie_len = buf[cookie_offset]; in ssl_parse_client_hello()
1209 if (cookie_offset + 1 + cookie_len + 2 > msg_len) { in ssl_parse_client_hello()
1217 buf + cookie_offset + 1, cookie_len); in ssl_parse_client_hello()
1226 buf + cookie_offset + 1, cookie_len, in ssl_parse_client_hello()
1238 if (cookie_len != 0) { in ssl_parse_client_hello()
1250 ciph_offset = cookie_offset + 1 + cookie_len; in ssl_parse_client_hello()
A Dssl_msg.c3478 size_t sid_len, cookie_len, epoch, fragment_offset; in mbedtls_ssl_check_dtls_clihlo_cookie() local
3537 cookie_len = in[60 + sid_len]; in mbedtls_ssl_check_dtls_clihlo_cookie()
3538 if (59 + 1 + sid_len + 1 + cookie_len > in_len) { in mbedtls_ssl_check_dtls_clihlo_cookie()
3540 (unsigned) cookie_len, in mbedtls_ssl_check_dtls_clihlo_cookie()
3546 in + sid_len + 61, cookie_len); in mbedtls_ssl_check_dtls_clihlo_cookie()
3548 in + sid_len + 61, cookie_len, in mbedtls_ssl_check_dtls_clihlo_cookie()
A Dssl_misc.h874 uint8_t cookie_len; member
882 uint16_t cookie_len; /*!< DTLS: HelloVerifyRequest cookie length member
A Dssl_tls.c1287 const unsigned char *cookie, size_t cookie_len, in ssl_cookie_check_dummy() argument
1292 ((void) cookie_len); in ssl_cookie_check_dummy()
/lib/mbedtls/external/mbedtls/tests/suites/
A Dtest_suite_ssl.data3253 Cookie parsing: cookie_len overflow

Completed in 69 milliseconds