Fix SSL_peek and SSL_pending.

This commit is contained in:
Bodo Möller
2000-12-25 18:41:37 +00:00
parent 2fb0c899c6
commit a9c3dc60b9
6 changed files with 79 additions and 62 deletions

View File

@@ -691,10 +691,9 @@ SSL_CIPHER *ssl3_get_cipher(unsigned int u)
return(NULL);
}
/* The problem is that it may not be the correct record type */
int ssl3_pending(SSL *s)
{
return(s->s3->rrec.length);
return (s->s3->rrec.type == SSL3_RT_APPLICATION_DATA) ? s->s3->rrec.length : 0;
}
int ssl3_new(SSL *s)