diff options
author | Matt Caswell <matt@openssl.org> | 2015-03-28 00:33:05 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2015-03-31 14:39:31 +0100 |
commit | 747e16398d704a667cc99f8a0b1912c36b7de52d (patch) | |
tree | f87322c40b27c2e9bc5755ebf59c6f65e9f97437 /ssl/record/record_locl.h | |
parent | 1b34e25c17493f3c4109510fc5cfb9474ab234ea (diff) |
Clean up record layer
Fix up various things that were missed during the record layer work. All
instances where we are breaking the encapsulation rules.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'ssl/record/record_locl.h')
-rw-r--r-- | ssl/record/record_locl.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/ssl/record/record_locl.h b/ssl/record/record_locl.h index 26b5a1546f..72f8e55f3b 100644 --- a/ssl/record/record_locl.h +++ b/ssl/record/record_locl.h @@ -155,6 +155,11 @@ void dtls1_record_bitmap_update(SSL *s, DTLS1_BITMAP *bitmap); #define SSL3_BUFFER_get_len(b) ((b)->len) #define SSL3_BUFFER_set_len(b, l) ((b)->len = (l)) #define SSL3_BUFFER_get_left(b) ((b)->left) +#define SSL3_BUFFER_set_left(b, l) ((b)->left = (l)) +#define SSL3_BUFFER_add_left(b, l) ((b)->left += (l)) +#define SSL3_BUFFER_get_offset(b) ((b)->offset) +#define SSL3_BUFFER_set_offset(b, o) ((b)->offset = (o)) +#define SSL3_BUFFER_add_offset(b, o) ((b)->offset += (o)) #define SSL3_BUFFER_is_initialised(b) ((b)->buf != NULL) void SSL3_BUFFER_set_data(SSL3_BUFFER *b, const unsigned char *d, int n); @@ -167,9 +172,20 @@ int ssl3_release_write_buffer(SSL *s); /* Macros/functions provided by the SSL3_RECORD component */ #define SSL3_RECORD_get_type(r) ((r)->type) +#define SSL3_RECORD_set_type(r, t) ((r)->type = (t)) #define SSL3_RECORD_get_length(r) ((r)->length) +#define SSL3_RECORD_set_length(r, l) ((r)->length = (l)) +#define SSL3_RECORD_add_length(r, l) ((r)->length += (l)) #define SSL3_RECORD_get_data(r) ((r)->data) +#define SSL3_RECORD_set_data(r, d) ((r)->data = (d)) +#define SSL3_RECORD_get_input(r) ((r)->input) +#define SSL3_RECORD_set_input(r, i) ((r)->input = (i)) +#define SSL3_RECORD_reset_input(r) ((r)->input = (r)->data) #define SSL3_RECORD_get_seq_num(r) ((r)->seq_num) +#define SSL3_RECORD_get_off(r) ((r)->off) +#define SSL3_RECORD_set_off(r, o) ((r)->off = (o)) +#define SSL3_RECORD_add_off(r, o) ((r)->off += (o)) +#define SSL3_RECORD_get_epoch(r) ((r)->epoch) void SSL3_RECORD_clear(SSL3_RECORD *r); void SSL3_RECORD_release(SSL3_RECORD *r); |