Move s->s3->rrec into s->rlayer
[openssl.git] / ssl / ssl_locl.h
index f91dbc5a98c5c50059bbebf84f56798a56412adb..6925992c7b1244f522a81dc975db4c472e16e3ca 100644 (file)
 # include <openssl/ssl.h>
 # include <openssl/symhacks.h>
 
 # include <openssl/ssl.h>
 # include <openssl/symhacks.h>
 
+#include "record/ssl3_buffer.h"
 #include "record/rec_layer.h"
 
 # ifdef OPENSSL_BUILD_SHLIBSSL
 #include "record/rec_layer.h"
 
 # ifdef OPENSSL_BUILD_SHLIBSSL
@@ -979,8 +980,6 @@ struct ssl_st {
     int type;
     /* SSLv3 */
     const SSL_METHOD *method;
     int type;
     /* SSLv3 */
     const SSL_METHOD *method;
-
-    RECORD_LAYER rlayer;
     /*
      * There are 2 BIO's even though they are normally both the same.  This
      * is so data can be read and written to different handlers
     /*
      * There are 2 BIO's even though they are normally both the same.  This
      * is so data can be read and written to different handlers
@@ -1220,6 +1219,8 @@ struct ssl_st {
      * basis, depending on the chosen cipher.
      */
     int (*not_resumable_session_cb) (SSL *ssl, int is_forward_secure);
      * basis, depending on the chosen cipher.
      */
     int (*not_resumable_session_cb) (SSL *ssl, int is_forward_secure);
+    
+    RECORD_LAYER rlayer;
 };
 
 typedef struct ssl3_record_st {
 };
 
 typedef struct ssl3_record_st {
@@ -1264,17 +1265,6 @@ typedef struct ssl3_record_st {
      */ unsigned char seq_num[8];
 } SSL3_RECORD;
 
      */ unsigned char seq_num[8];
 } SSL3_RECORD;
 
-typedef struct ssl3_buffer_st {
-    /* at least SSL3_RT_MAX_PACKET_SIZE bytes, see ssl3_setup_buffers() */
-    unsigned char *buf;
-    /* buffer size */
-    size_t len;
-    /* where to 'copy from' */
-    int offset;
-    /* how many bytes left */
-    int left;
-} SSL3_BUFFER;
-
 typedef struct ssl3_state_st {
     long flags;
     int delay_buf_pop_ret;
 typedef struct ssl3_state_st {
     long flags;
     int delay_buf_pop_ret;
@@ -1291,7 +1281,6 @@ typedef struct ssl3_state_st {
     int empty_fragment_done;
     /* The value of 'extra' when the buffers were initialized */
     int init_extra;
     int empty_fragment_done;
     /* The value of 'extra' when the buffers were initialized */
     int init_extra;
-    SSL3_BUFFER rbuf;           /* read IO goes into here */
     SSL3_BUFFER wbuf;           /* write IO goes into here */
     SSL3_RECORD rrec;           /* each decoded record goes in here */
     SSL3_RECORD wrec;           /* goes out from here */
     SSL3_BUFFER wbuf;           /* write IO goes into here */
     SSL3_RECORD rrec;           /* each decoded record goes in here */
     SSL3_RECORD wrec;           /* goes out from here */