diff options
author | Matt Caswell <matt@openssl.org> | 2015-02-04 11:57:34 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2015-03-26 15:02:00 +0000 |
commit | 3bb8f87d2d9aa1ab51703a725759d440785685e3 (patch) | |
tree | ea65c9d8c0a6723cac561b945639a8fb96bef60c /ssl/d1_both.c | |
parent | 14daae5a625b38b43229eed0cf750f44d5881c0b (diff) |
Move last_write_sequence from s->d1 to s->rlayer.d.
Also push some usage of last_write_sequence out of dtls1_retransmit_message
and into the record layer.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'ssl/d1_both.c')
-rw-r--r-- | ssl/d1_both.c | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/ssl/d1_both.c b/ssl/d1_both.c index 453c5f893e..094b337bea 100644 --- a/ssl/d1_both.c +++ b/ssl/d1_both.c @@ -1144,7 +1144,6 @@ dtls1_retransmit_message(SSL *s, unsigned short seq, unsigned long frag_off, unsigned long header_length; unsigned char seq64be[8]; struct dtls1_retransmit_state saved_state; - unsigned char save_write_sequence[8]; /*- OPENSSL_assert(s->init_num == 0); @@ -1194,17 +1193,9 @@ dtls1_retransmit_message(SSL *s, unsigned short seq, unsigned long frag_off, s->write_hash = frag->msg_header.saved_retransmit_state.write_hash; s->compress = frag->msg_header.saved_retransmit_state.compress; s->session = frag->msg_header.saved_retransmit_state.session; - DTLS_RECORD_LAYER_set_w_epoch(&s->rlayer, + DTLS_RECORD_LAYER_set_saved_w_epoch(&s->rlayer, frag->msg_header.saved_retransmit_state.epoch); - if (frag->msg_header.saved_retransmit_state.epoch == - saved_state.epoch - 1) { - - memcpy(save_write_sequence, RECORD_LAYER_get_write_sequence(&s->rlayer), - sizeof(save_write_sequence)); - RECORD_LAYER_set_write_sequence(&s->rlayer, s->d1->last_write_sequence); - } - ret = dtls1_do_write(s, frag->msg_header.is_ccs ? SSL3_RT_CHANGE_CIPHER_SPEC : SSL3_RT_HANDSHAKE); @@ -1213,15 +1204,7 @@ dtls1_retransmit_message(SSL *s, unsigned short seq, unsigned long frag_off, s->write_hash = saved_state.write_hash; s->compress = saved_state.compress; s->session = saved_state.session; - DTLS_RECORD_LAYER_set_w_epoch(&s->rlayer, saved_state.epoch); - - if (frag->msg_header.saved_retransmit_state.epoch == - saved_state.epoch - 1) { - memcpy(s->d1->last_write_sequence, - RECORD_LAYER_get_write_sequence(&s->rlayer), - sizeof(s->d1->last_write_sequence)); - RECORD_LAYER_set_write_sequence(&s->rlayer, save_write_sequence); - } + DTLS_RECORD_LAYER_set_saved_w_epoch(&s->rlayer, saved_state.epoch); s->d1->retransmitting = 0; |