From: Bodo Möller Date: Tue, 26 Dec 2000 12:06:48 +0000 (+0000) Subject: Finish SSL_peek/SSL_pending fixes. X-Git-Tag: OpenSSL_0_9_6a-beta1~97 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=beaea31a96095dd478f0f7a6a6dae6221489ad6d;p=oweals%2Fopenssl.git Finish SSL_peek/SSL_pending fixes. --- diff --git a/CHANGES b/CHANGES index 904642cbf8..f2c264a687 100644 --- a/CHANGES +++ b/CHANGES @@ -35,6 +35,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 a89958607c..a590dbfa5c 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 0ec9ee3393..1f119442b4 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) {