summaryrefslogtreecommitdiffstats
path: root/ssl/t1_enc.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2015-01-30 17:29:41 +0000
committerMatt Caswell <matt@openssl.org>2015-03-26 13:53:07 +0000
commit258f8721a5d2c3ec5fd433e89112885139be1db3 (patch)
treee43ce47ce54ae67d4a50f28306fdde89f5f5241d /ssl/t1_enc.c
parentab97b2cd4301074fd88fd2f13b8c79342593dae4 (diff)
Encapsulate s->s3->rrec
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'ssl/t1_enc.c')
-rw-r--r--ssl/t1_enc.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/ssl/t1_enc.c b/ssl/t1_enc.c
index e4a689ebc3..70ea6c0796 100644
--- a/ssl/t1_enc.c
+++ b/ssl/t1_enc.c
@@ -396,10 +396,8 @@ int tls1_change_cipher_state(SSL *s, int which)
SSL_R_COMPRESSION_LIBRARY_ERROR);
goto err2;
}
- if (s->s3->rrec.comp == NULL)
- s->s3->rrec.comp = (unsigned char *)
- OPENSSL_malloc(SSL3_RT_MAX_ENCRYPTED_LENGTH);
- if (s->s3->rrec.comp == NULL)
+ if (SSL3_RECORD_setup(RECORD_LAYER_get_rrec(&s->rlayer),
+ SSL3_RT_MAX_ENCRYPTED_LENGTH))
goto err;
}
#endif
@@ -782,7 +780,7 @@ int tls1_enc(SSL *s, int send)
OPENSSL_assert(n >= 0);
}
ds = s->enc_read_ctx;
- rec = &(s->s3->rrec);
+ rec = RECORD_LAYER_get_rrec(&s->rlayer);
if (s->enc_read_ctx == NULL)
enc = NULL;
else
@@ -977,7 +975,7 @@ int tls1_mac(SSL *ssl, unsigned char *md, int send)
seq = &(ssl->s3->write_sequence[0]);
hash = ssl->write_hash;
} else {
- rec = &(ssl->s3->rrec);
+ rec = RECORD_LAYER_get_rrec(&ssl->rlayer);
seq = &(ssl->s3->read_sequence[0]);
hash = ssl->read_hash;
}