Lines Matching refs:cookie_len
534 uint16_t cookie_len; in ssl_tls13_parse_cookie_ext() local
540 cookie_len = MBEDTLS_GET_UINT16_BE(p, 0); in ssl_tls13_parse_cookie_ext()
543 MBEDTLS_SSL_CHK_BUF_READ_PTR(p, end, cookie_len); in ssl_tls13_parse_cookie_ext()
544 MBEDTLS_SSL_DEBUG_BUF(3, "cookie extension", p, cookie_len); in ssl_tls13_parse_cookie_ext()
547 handshake->cookie_len = 0; in ssl_tls13_parse_cookie_ext()
548 handshake->cookie = mbedtls_calloc(1, cookie_len); in ssl_tls13_parse_cookie_ext()
552 cookie_len)); in ssl_tls13_parse_cookie_ext()
556 memcpy(handshake->cookie, p, cookie_len); in ssl_tls13_parse_cookie_ext()
557 handshake->cookie_len = cookie_len; in ssl_tls13_parse_cookie_ext()
579 handshake->cookie_len); in ssl_tls13_write_cookie_ext()
581 MBEDTLS_SSL_CHK_BUF_PTR(p, end, handshake->cookie_len + 6); in ssl_tls13_write_cookie_ext()
586 MBEDTLS_PUT_UINT16_BE(handshake->cookie_len + 2, p, 2); in ssl_tls13_write_cookie_ext()
587 MBEDTLS_PUT_UINT16_BE(handshake->cookie_len, p, 4); in ssl_tls13_write_cookie_ext()
591 memcpy(p, handshake->cookie, handshake->cookie_len); in ssl_tls13_write_cookie_ext()
593 *out_len = handshake->cookie_len + 6; in ssl_tls13_write_cookie_ext()