提交 725c8887 编写于 作者: B Bodo Möller

Finish SSL_peek/SSL_pending fixes.

上级 a0aae68c
...@@ -146,6 +146,7 @@ ...@@ -146,6 +146,7 @@
*) Fix ssl3_pending: If the record in s->s3->rrec is not of type *) Fix ssl3_pending: If the record in s->s3->rrec is not of type
SSL3_RT_APPLICATION_DATA, return 0. SSL3_RT_APPLICATION_DATA, return 0.
Similarly, change ssl2_pending to return 0 if SSL_in_init(s) is true.
[Bodo Moeller] [Bodo Moeller]
*) Fix SSL_peek: *) Fix SSL_peek:
......
...@@ -260,7 +260,7 @@ SSL_CIPHER *ssl2_get_cipher(unsigned int u) ...@@ -260,7 +260,7 @@ SSL_CIPHER *ssl2_get_cipher(unsigned int u)
int ssl2_pending(SSL *s) int ssl2_pending(SSL *s)
{ {
return(s->s2->ract_data_length); return SSL_in_init(s) ? 0 : s->s2->ract_data_length;
} }
int ssl2_new(SSL *s) int ssl2_new(SSL *s)
......
...@@ -132,12 +132,6 @@ static int ssl2_read_internal(SSL *s, void *buf, int len, int peek) ...@@ -132,12 +132,6 @@ static int ssl2_read_internal(SSL *s, void *buf, int len, int peek)
int i; int i;
unsigned int mac_size=0; unsigned int mac_size=0;
if (peek)
{
SSLerr(SSL_F_SSL2_READ_INTERNAL, SSL_R_FIXME); /* proper implementation not yet completed */
return -1;
}
ssl2_read_again: ssl2_read_again:
if (SSL_in_init(s) && !s->in_handshake) if (SSL_in_init(s) && !s->in_handshake)
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册