diff options
author | Matt Caswell <matt@openssl.org> | 2015-01-30 18:29:41 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2015-03-26 14:53:07 +0100 |
commit | 258f8721a5d2c3ec5fd433e89112885139be1db3 (patch) | |
tree | e43ce47ce54ae67d4a50f28306fdde89f5f5241d /ssl/s3_enc.c | |
parent | Move s->s3->wbuf to s->rlayer->wbuf (diff) | |
download | openssl-258f8721a5d2c3ec5fd433e89112885139be1db3.tar.xz openssl-258f8721a5d2c3ec5fd433e89112885139be1db3.zip |
Encapsulate s->s3->rrec
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'ssl/s3_enc.c')
-rw-r--r-- | ssl/s3_enc.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/ssl/s3_enc.c b/ssl/s3_enc.c index 94f6dd0647..b36aca8891 100644 --- a/ssl/s3_enc.c +++ b/ssl/s3_enc.c @@ -270,10 +270,8 @@ int ssl3_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_PLAIN_LENGTH); - if (s->s3->rrec.comp == NULL) + if(!SSL3_RECORD_setup(RECORD_LAYER_get_rrec(&s->rlayer), + SSL3_RT_MAX_PLAIN_LENGTH)) goto err; } #endif @@ -509,7 +507,7 @@ int ssl3_enc(SSL *s, int send) enc = EVP_CIPHER_CTX_cipher(s->enc_write_ctx); } else { 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 @@ -732,7 +730,7 @@ int n_ssl3_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); mac_sec = &(ssl->s3->read_mac_secret[0]); seq = &(ssl->s3->read_sequence[0]); hash = ssl->read_hash; |