Move ssl3_do_write from s3_pkt.c to s3_both.c.
[openssl.git] / ssl / s3_pkt.c
index fcb3d171009c678005fdbe5a3303ab663f95c155..e95dcd9461ea0b2ce64d7b0195f7cfa1527966b2 100644 (file)
@@ -507,9 +507,6 @@ int ssl3_write_bytes(SSL *s, int type, const void *buf_, int len)
                        return(i);
                        }
 
-               if (type == SSL3_RT_HANDSHAKE)
-                       ssl3_finish_mac(s,&(buf[tot]),i);
-
                if ((i == (int)n) ||
                        (type == SSL3_RT_APPLICATION_DATA &&
                         (s->mode & SSL_MODE_ENABLE_PARTIAL_WRITE)))
@@ -740,7 +737,6 @@ int ssl3_read_bytes(SSL *s, int type, unsigned char *buf, int len)
                /* move any remaining fragment bytes: */
                for (i = 0; i < s->s3->handshake_fragment_len; i++)
                        s->s3->handshake_fragment[i] = *src++;
-               ssl3_finish_mac(s, buf, n);
                return n;
        }
 
@@ -820,9 +816,6 @@ start:
                        s->rstate=SSL_ST_READ_HEADER;
                        rr->off=0;
                        }
-
-               if (type == SSL3_RT_HANDSHAKE)
-                       ssl3_finish_mac(s,buf,n);
                return(n);
                }
 
@@ -1124,21 +1117,6 @@ static int do_change_cipher_spec(SSL *s)
        return(1);
        }
 
-/* send s->init_buf in records of type 'type' */
-int ssl3_do_write(SSL *s, int type)
-       {
-       int ret;
-
-       ret=ssl3_write_bytes(s,type,&s->init_buf->data[s->init_off],
-                            s->init_num);
-       if (ret == s->init_num)
-               return(1);
-       if (ret < 0) return(-1);
-       s->init_off+=ret;
-       s->init_num-=ret;
-       return(0);
-       }
-
 void ssl3_send_alert(SSL *s, int level, int desc)
        {
        /* Map tls/ssl alert value to correct one */