diff options
author | Matt Caswell <matt@openssl.org> | 2015-02-04 11:24:24 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2015-03-26 15:02:00 +0000 |
commit | 14daae5a625b38b43229eed0cf750f44d5881c0b (patch) | |
tree | 7ba0cc24cb80d56415e99baac2e76efb288ba767 /ssl/record | |
parent | 24a1e2f2ec1553c2cc26574bdb48b5d8c1b913f7 (diff) |
Move ssl3_record_sequence_update into record layer
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'ssl/record')
-rw-r--r-- | ssl/record/rec_layer.h | 4 | ||||
-rw-r--r-- | ssl/record/s3_pkt.c | 11 |
2 files changed, 13 insertions, 2 deletions
diff --git a/ssl/record/rec_layer.h b/ssl/record/rec_layer.h index 1367487e3a..e50bb79873 100644 --- a/ssl/record/rec_layer.h +++ b/ssl/record/rec_layer.h @@ -260,7 +260,7 @@ int DTLS_RECORD_LAYER_new(RECORD_LAYER *rl); void DTLS_RECORD_LAYER_free(RECORD_LAYER *rl); void DTLS_RECORD_LAYER_clear(RECORD_LAYER *rl); __owur int dtls1_read_bytes(SSL *s, int type, unsigned char *buf, int len, int peek); -int dtls1_write_bytes(SSL *s, int type, const void *buf, int len); +__owur int dtls1_write_bytes(SSL *s, int type, const void *buf, int len); __owur int do_dtls1_write(SSL *s, int type, const unsigned char *buf, unsigned int len, int create_empty_fragement); void dtls1_reset_seq_numbers(SSL *s, int rw); @@ -292,4 +292,4 @@ int dtls1_process_buffered_records(SSL *s); int dtls1_retrieve_buffered_record(SSL *s, record_pqueue *queue); int dtls1_buffer_record(SSL *s, record_pqueue *q, unsigned char *priority); - +void ssl3_record_sequence_update(unsigned char *seq); diff --git a/ssl/record/s3_pkt.c b/ssl/record/s3_pkt.c index 30df2b741a..b9a0934690 100644 --- a/ssl/record/s3_pkt.c +++ b/ssl/record/s3_pkt.c @@ -1445,4 +1445,15 @@ int ssl3_read_bytes(SSL *s, int type, unsigned char *buf, int len, int peek) return (-1); } +void ssl3_record_sequence_update(unsigned char *seq) +{ + int i; + + for (i = 7; i >= 0; i--) { + ++seq[i]; + if (seq[i] != 0) + break; + } +} + |