Home | History | Annotate | Download | only in statem

Lines Matching defs:clienthello

612      * Note that before the ClientHello we don't know what version we are going
632 /* Must be an incoming ClientHello */
918 * The next message should be another ClientHello which we need to
1212 * Maximum size (excluding the Handshake header) of a ClientHello message,
1509 CLIENTHELLO_MSG *clienthello = NULL;
1511 /* Check if this is actually an unexpected renegotiation ClientHello */
1529 clienthello = OPENSSL_zalloc(sizeof(*clienthello));
1530 if (clienthello == NULL) {
1536 * First, parse the raw ClientHello data into the CLIENTHELLO_MSG structure.
1538 clienthello->isv2 = RECORD_LAYER_is_sslv2_record(&s->rlayer);
1541 if (clienthello->isv2) {
1577 clienthello->legacy_version)) {
1583 if (clienthello->isv2) {
1585 * Handle an SSLv2 backwards compatible ClientHello
1604 if (!PACKET_get_sub_packet(pkt, &clienthello->ciphersuites,
1606 || !PACKET_copy_bytes(pkt, clienthello->session_id, session_id_len)
1613 clienthello->session_id_len = session_id_len;
1616 * here rather than sizeof(clienthello->random) because that is the limit
1618 * sizeof(clienthello->random) does.
1623 memset(clienthello->random, 0, SSL3_RANDOM_SIZE);
1625 clienthello->random + SSL3_RANDOM_SIZE - challenge_len, challenge_len)
1632 PACKET_null_init(&clienthello->extensions);
1634 /* Regular ClientHello. */
1635 if (!PACKET_copy_bytes(pkt, clienthello->random, SSL3_RANDOM_SIZE)
1637 || !PACKET_copy_all(&session_id, clienthello->session_id,
1639 &clienthello->session_id_len)) {
1649 if (!PACKET_copy_all(&cookie, clienthello->dtls_cookie,
1651 &clienthello->dtls_cookie_len)) {
1656 * If we require cookies and this ClientHello doesn't contain one,
1661 if (clienthello->dtls_cookie_len == 0) {
1662 OPENSSL_free(clienthello);
1668 if (!PACKET_get_length_prefixed_2(pkt, &clienthello->ciphersuites)) {
1680 PACKET_null_init(&clienthello->extensions);
1682 if (!PACKET_get_length_prefixed_2(pkt, &clienthello->extensions)
1690 if (!PACKET_copy_all(&compression, clienthello->compressions,
1692 &clienthello->compressions_len)) {
1698 extensions = clienthello->extensions;
1700 &clienthello->pre_proc_exts,
1701 &clienthello->pre_proc_exts_len, 1)) {
1705 s->clienthello = clienthello;
1710 if (clienthello != NULL)
1711 OPENSSL_free(clienthello->pre_proc_exts);
1712 OPENSSL_free(clienthello);
1729 CLIENTHELLO_MSG *clienthello = s->clienthello;
1735 /* Finished parsing the ClientHello, now we can start processing it */
1736 /* Give the ClientHello callback a crack at things */
1738 /* A failure in the ClientHello callback terminates the connection. */
1753 memcpy(s->s3.client_random, clienthello->random, SSL3_RANDOM_SIZE);
1757 if (clienthello->isv2) {
1758 if (clienthello->legacy_version == SSL2_VERSION
1759 || (clienthello->legacy_version & 0xff00)
1769 s->client_version = clienthello->legacy_version;
1773 protverr = ssl_choose_server_version(s, clienthello, &dgrd);
1778 s->version = s->client_version = clienthello->legacy_version;
1784 /* TLSv1.3 specifies that a ClientHello must end on a record boundary */
1795 if (sctx->app_verify_cookie_cb(ussl, clienthello->dtls_cookie,
1796 clienthello->dtls_cookie_len)
1804 } else if (s->d1->cookie_len != clienthello->dtls_cookie_len
1805 || memcmp(clienthello->dtls_cookie, s->d1->cookie,
1817 if (!ssl_cache_cipherlist(s, &clienthello->ciphersuites,
1818 clienthello->isv2)
1819 || !ossl_bytes_to_cipher_list(s, &clienthello->ciphersuites, &ciphers,
1820 &scsvs, clienthello->isv2, 1)) {
1877 clienthello->pre_proc_exts, NULL, 0)) {
1883 * We don't allow resumption in a backwards compatible ClientHello.
1898 if (clienthello->isv2 || (s->new_session && (s->options & SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION))) {
1904 i = ssl_get_prev_session(s, clienthello);
1921 memcpy(s->tmp_session_id, s->clienthello->session_id,
1922 s->clienthello->session_id_len);
1923 s->tmp_session_id_len = s->clienthello->session_id_len;
1963 if (clienthello->compressions_len == 0) {
1968 if (memchr(clienthello->compressions, 0,
1969 clienthello->compressions_len)
1977 ssl_check_for_safari(s, clienthello);
1981 clienthello->pre_proc_exts, NULL, 0, 1)) {
2031 * If the ClientHello contains both a Session ID and a PAC-Opaque in
2036 if (clienthello->session_id_len > 0) {
2037 memcpy(s->session->session_id, clienthello->session_id,
2038 clienthello->session_id_len);
2039 s->session->session_id_length = clienthello->session_id_len;
2071 * a TLSv1.3 ClientHello.
2073 if (clienthello->compressions_len != 1) {
2105 for (k = 0; k < clienthello->compressions_len; k++) {
2106 if (clienthello->compressions[k] == comp_id)
2109 if (k >= clienthello->compressions_len) {
2125 for (o = 0; o < clienthello->compressions_len; o++) {
2126 if (v == clienthello->compressions[o]) {
2174 OPENSSL_free(clienthello->pre_proc_exts);
2175 OPENSSL_free(s->clienthello);
2176 s->clienthello = NULL;
2181 OPENSSL_free(clienthello->pre_proc_exts);
2182 OPENSSL_free(s->clienthello);
2183 s->clienthello = NULL;