fix ssl3_pending
[oweals/openssl.git] / ssl / s3_pkt.c
index 3baf6c50a8631a8f9eaff19b89050e90dcfe21f2..616698f70aa027e6a17ec4a2cd9ffc9e87640b24 100644 (file)
@@ -730,7 +730,7 @@ int ssl3_read_bytes(SSL *s, int type, unsigned char *buf, int len, int peek)
        int al,i,j,ret;
        unsigned int n;
        SSL3_RECORD *rr;
-       void (*cb)()=NULL;
+       void (*cb)(const SSL *ssl,int type2,int val)=NULL;
 
        if (s->s3->rbuf.buf == NULL) /* Not initialized yet */
                if (!ssl3_setup_buffers(s))
@@ -1087,6 +1087,7 @@ start:
                /* TLS just ignores unknown message types */
                if (s->version == TLS1_VERSION)
                        {
+                       rr->length = 0;
                        goto start;
                        }
 #endif
@@ -1206,7 +1207,7 @@ void ssl3_send_alert(SSL *s, int level, int desc)
 int ssl3_dispatch_alert(SSL *s)
        {
        int i,j;
-       void (*cb)()=NULL;
+       void (*cb)(const SSL *ssl,int type,int val)=NULL;
 
        s->s3->alert_dispatch=0;
        i=do_ssl3_write(s,SSL3_RT_ALERT,&s->s3->send_alert[0],2);