diff options
author | Matt Caswell <matt@openssl.org> | 2015-01-30 14:57:54 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2015-03-26 13:53:07 +0000 |
commit | 28d59af8740680c89e22ac19304457f2163e4371 (patch) | |
tree | e0b10c2bf091e6fa6ef824141837bba5803d59ee /ssl/s3_lib.c | |
parent | 52e1d7b152a92d4fc2c3704a0129ec0ee0ce5e21 (diff) |
Encapsulate SSL3_BUFFER and all access to s->s3->rbuf.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'ssl/s3_lib.c')
-rw-r--r-- | ssl/s3_lib.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ssl/s3_lib.c b/ssl/s3_lib.c index 69f3d5d6f7..101cf852a9 100644 --- a/ssl/s3_lib.c +++ b/ssl/s3_lib.c @@ -3131,7 +3131,7 @@ void ssl3_free(SSL *s) return; ssl3_cleanup_key_block(s); - if (s->s3->rbuf.buf != NULL) + if (SSL3_BUFFER_is_initialised(RECORD_LAYER_get_rbuf(&s->rlayer))) ssl3_release_read_buffer(s); if (s->s3->wbuf.buf != NULL) ssl3_release_write_buffer(s); @@ -3190,9 +3190,9 @@ void ssl3_clear(SSL *s) # endif /* !OPENSSL_NO_EC */ #endif /* !OPENSSL_NO_TLSEXT */ - rp = s->s3->rbuf.buf; + rp = SSL3_BUFFER_get_buf(RECORD_LAYER_get_rbuf(&s->rlayer)); wp = s->s3->wbuf.buf; - rlen = s->s3->rbuf.len; + rlen = SSL3_BUFFER_get_len(RECORD_LAYER_get_rbuf(&s->rlayer)); wlen = s->s3->wbuf.len; init_extra = s->s3->init_extra; BIO_free(s->s3->handshake_buffer); @@ -3207,9 +3207,9 @@ void ssl3_clear(SSL *s) } #endif memset(s->s3, 0, sizeof *s->s3); - s->s3->rbuf.buf = rp; + SSL3_BUFFER_set_buf(RECORD_LAYER_get_rbuf(&s->rlayer), rp); s->s3->wbuf.buf = wp; - s->s3->rbuf.len = rlen; + SSL3_BUFFER_set_len(RECORD_LAYER_get_rbuf(&s->rlayer), rlen); s->s3->wbuf.len = wlen; s->s3->init_extra = init_extra; @@ -4494,7 +4494,7 @@ int ssl3_renegotiate_check(SSL *s) int ret = 0; if (s->s3->renegotiate) { - if ((s->s3->rbuf.left == 0) && + if ((SSL3_BUFFER_get_left(RECORD_LAYER_get_rbuf(&s->rlayer)) == 0) && (s->s3->wbuf.left == 0) && !SSL_in_init(s)) { /* * if we are the server, and we have sent a 'RENEGOTIATE' |