• Home
  • Raw
  • Download

Lines Matching refs:d1

256   size_t idx = ssl->d1->handshake_read_seq % SSL_MAX_HANDSHAKE_FLIGHT;  in dtls1_is_current_message_complete()
257 hm_fragment *frag = ssl->d1->incoming_messages[idx].get(); in dtls1_is_current_message_complete()
267 if (msg_hdr->seq < ssl->d1->handshake_read_seq || in dtls1_get_incoming_message()
268 msg_hdr->seq - ssl->d1->handshake_read_seq >= SSL_MAX_HANDSHAKE_FLIGHT) { in dtls1_get_incoming_message()
274 hm_fragment *frag = ssl->d1->incoming_messages[idx].get(); in dtls1_get_incoming_message()
289 ssl->d1->incoming_messages[idx] = dtls1_hm_fragment_new(msg_hdr); in dtls1_get_incoming_message()
290 if (!ssl->d1->incoming_messages[idx]) { in dtls1_get_incoming_message()
294 return ssl->d1->incoming_messages[idx].get(); in dtls1_get_incoming_message()
335 ssl->d1->has_change_cipher_spec = true; in dtls1_open_handshake()
374 if (ssl->d1->r_epoch == 1 && msg_hdr.seq != ssl->d1->handshake_read_seq) { in dtls1_open_handshake()
380 if (msg_hdr.seq < ssl->d1->handshake_read_seq || in dtls1_open_handshake()
382 (unsigned)ssl->d1->handshake_read_seq + SSL_MAX_HANDSHAKE_FLIGHT) { in dtls1_open_handshake()
413 size_t idx = ssl->d1->handshake_read_seq % SSL_MAX_HANDSHAKE_FLIGHT; in dtls1_get_message()
414 hm_fragment *frag = ssl->d1->incoming_messages[idx].get(); in dtls1_get_message()
429 size_t index = ssl->d1->handshake_read_seq % SSL_MAX_HANDSHAKE_FLIGHT; in dtls1_next_message()
430 ssl->d1->incoming_messages[index].reset(); in dtls1_next_message()
431 ssl->d1->handshake_read_seq++; in dtls1_next_message()
435 if (ssl->d1->outgoing_messages_complete) { in dtls1_next_message()
436 ssl->d1->flight_has_reply = true; in dtls1_next_message()
441 if (ssl->d1->has_change_cipher_spec) { in dtls_has_unprocessed_handshake_data()
445 size_t current = ssl->d1->handshake_read_seq % SSL_MAX_HANDSHAKE_FLIGHT; in dtls_has_unprocessed_handshake_data()
452 if (ssl->d1->incoming_messages[i] != nullptr) { in dtls_has_unprocessed_handshake_data()
478 if (!ssl->d1->has_change_cipher_spec) { in dtls1_open_change_cipher_spec()
485 if (ssl->d1->has_change_cipher_spec) { in dtls1_open_change_cipher_spec()
486 ssl->d1->has_change_cipher_spec = false; in dtls1_open_change_cipher_spec()
501 for (size_t i = 0; i < ssl->d1->outgoing_messages_len; i++) { in dtls_clear_outgoing_messages()
502 ssl->d1->outgoing_messages[i].Clear(); in dtls_clear_outgoing_messages()
504 ssl->d1->outgoing_messages_len = 0; in dtls_clear_outgoing_messages()
505 ssl->d1->outgoing_written = 0; in dtls_clear_outgoing_messages()
506 ssl->d1->outgoing_offset = 0; in dtls_clear_outgoing_messages()
507 ssl->d1->outgoing_messages_complete = false; in dtls_clear_outgoing_messages()
508 ssl->d1->flight_has_reply = false; in dtls_clear_outgoing_messages()
516 !CBB_add_u16(cbb, ssl->d1->handshake_write_seq) || in dtls1_init_message()
556 if (ssl->d1->outgoing_messages_complete) { in add_outgoing()
564 (1 << 8 * sizeof(ssl->d1->outgoing_messages_len)), in add_outgoing()
566 if (ssl->d1->outgoing_messages_len >= SSL_MAX_HANDSHAKE_FLIGHT || in add_outgoing()
581 ssl->d1->handshake_write_seq++; in add_outgoing()
585 &ssl->d1->outgoing_messages[ssl->d1->outgoing_messages_len]; in add_outgoing()
589 msg->epoch = ssl->d1->w_epoch; in add_outgoing()
592 ssl->d1->outgoing_messages_len++; in add_outgoing()
610 if (ssl->d1->mtu < dtls1_min_mtu() && in dtls1_update_mtu()
614 ssl->d1->mtu = (unsigned)mtu; in dtls1_update_mtu()
616 ssl->d1->mtu = kDefaultMTU; in dtls1_update_mtu()
617 BIO_ctrl(ssl->wbio.get(), BIO_CTRL_DGRAM_SET_MTU, ssl->d1->mtu, NULL); in dtls1_update_mtu()
622 assert(ssl->d1->mtu >= dtls1_min_mtu()); in dtls1_update_mtu()
638 assert(ssl->d1->outgoing_written < ssl->d1->outgoing_messages_len); in seal_next_message()
639 assert(msg == &ssl->d1->outgoing_messages[ssl->d1->outgoing_written]); in seal_next_message()
642 if (ssl->d1->w_epoch >= 1 && msg->epoch == ssl->d1->w_epoch - 1) { in seal_next_message()
644 } else if (msg->epoch != ssl->d1->w_epoch) { in seal_next_message()
678 !CBS_skip(&body, ssl->d1->outgoing_offset) || in seal_next_message()
701 !CBB_add_u24(cbb.get(), ssl->d1->outgoing_offset) || in seal_next_message()
719 ssl->d1->outgoing_offset = 0; in seal_next_message()
723 ssl->d1->outgoing_offset += todo; in seal_next_message()
734 assert(ssl->d1->outgoing_written < ssl->d1->outgoing_messages_len); in seal_next_packet()
735 for (; ssl->d1->outgoing_written < ssl->d1->outgoing_messages_len; in seal_next_packet()
736 ssl->d1->outgoing_written++) { in seal_next_packet()
738 &ssl->d1->outgoing_messages[ssl->d1->outgoing_written]; in seal_next_packet()
782 uint8_t *packet = (uint8_t *)OPENSSL_malloc(ssl->d1->mtu); in send_flight()
788 while (ssl->d1->outgoing_written < ssl->d1->outgoing_messages_len) { in send_flight()
789 uint8_t old_written = ssl->d1->outgoing_written; in send_flight()
790 uint32_t old_offset = ssl->d1->outgoing_offset; in send_flight()
793 if (!seal_next_packet(ssl, packet, &packet_len, ssl->d1->mtu)) { in send_flight()
800 ssl->d1->outgoing_written = old_written; in send_flight()
801 ssl->d1->outgoing_offset = old_offset; in send_flight()
821 ssl->d1->outgoing_messages_complete = true; in dtls1_flush_flight()
832 ssl->d1->outgoing_written = 0; in dtls1_retransmit_outgoing_messages()
833 ssl->d1->outgoing_offset = 0; in dtls1_retransmit_outgoing_messages()