diff --git a/CHANGES b/CHANGES index ccb179ed8337e78d343f995ab7be8c47ea14a14a..95085ed6a77a9f183af256eb94ef83e34c79023e 100644 --- a/CHANGES +++ b/CHANGES @@ -146,6 +146,7 @@ *) Fix ssl3_pending: If the record in s->s3->rrec is not of type SSL3_RT_APPLICATION_DATA, return 0. + Similarly, change ssl2_pending to return 0 if SSL_in_init(s) is true. [Bodo Moeller] *) Fix SSL_peek: diff --git a/ssl/s2_lib.c b/ssl/s2_lib.c index a89958607cfd2800e03f5d0e90535891fa0ac704..a590dbfa5ca6809919d0de60aaac301a3a3bfdb5 100644 --- a/ssl/s2_lib.c +++ b/ssl/s2_lib.c @@ -260,7 +260,7 @@ SSL_CIPHER *ssl2_get_cipher(unsigned int u) 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) diff --git a/ssl/s2_pkt.c b/ssl/s2_pkt.c index 0ec9ee33932fc516b6c88f734331613fe5c91b24..1f119442b4e8de2ad1c043bcb0c53c943a339e11 100644 --- a/ssl/s2_pkt.c +++ b/ssl/s2_pkt.c @@ -132,12 +132,6 @@ static int ssl2_read_internal(SSL *s, void *buf, int len, int peek) int i; 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: if (SSL_in_init(s) && !s->in_handshake) {