if (len == 0 && !create_empty_fragment)
return 0;
- wr = &(s->s3->wrec);
+ wr = RECORD_LAYER_get_wrec(&s->rlayer);
sess = s->session;
if ((sess == NULL) ||
#define RECORD_LAYER_get_rbuf(rl) (&(rl)->rbuf)
#define RECORD_LAYER_get_wbuf(rl) (&(rl)->wbuf)
#define RECORD_LAYER_get_rrec(rl) (&(rl)->rrec)
+#define RECORD_LAYER_get_wrec(rl) (&(rl)->s->s3->wrec)
if (send) {
ds = s->enc_write_ctx;
- rec = &(s->s3->wrec);
+ rec = RECORD_LAYER_get_wrec(&s->rlayer);
if (s->enc_write_ctx == NULL)
enc = NULL;
else
int t;
if (send) {
- rec = &(ssl->s3->wrec);
+ rec = RECORD_LAYER_get_wrec(&ssl->rlayer);
mac_sec = &(ssl->s3->write_mac_secret[0]);
seq = &(ssl->s3->write_sequence[0]);
hash = ssl->write_hash;
goto err;
memset(s3, 0, sizeof *s3);
s->s3 = s3;
- memset(s3->wrec.seq_num, 0, sizeof(s3->wrec.seq_num));
+ SSL3_RECORD_clear(RECORD_LAYER_get_wrec(&s->rlayer));
#ifndef OPENSSL_NO_SRP
if(!SSL_SRP_CTX_init(s))
int i;
SSL3_RECORD *wr;
- wr = &(ssl->s3->wrec);
+ wr = RECORD_LAYER_get_wrec(&ssl->rlayer);
i = COMP_compress_block(ssl->compress, wr->data,
SSL3_RT_MAX_COMPRESSED_LENGTH,
wr->input, (int)wr->length);
if (len == 0 && !create_empty_fragment)
return 0;
- wr = &(s->s3->wrec);
+ wr = RECORD_LAYER_get_wrec(&s->rlayer);
sess = s->session;
if ((sess == NULL) ||
OPENSSL_assert(n >= 0);
}
ds = s->enc_write_ctx;
- rec = &(s->s3->wrec);
+ rec = RECORD_LAYER_get_wrec(&s->rlayer);
if (s->enc_write_ctx == NULL)
enc = NULL;
else {
int t;
if (send) {
- rec = &(ssl->s3->wrec);
+ rec = RECORD_LAYER_get_wrec(&ssl->rlayer);
seq = &(ssl->s3->write_sequence[0]);
hash = ssl->write_hash;
} else {