From: Bodo Möller Date: Fri, 15 Mar 2002 10:52:03 +0000 (+0000) Subject: fix ssl3_pending X-Git-Tag: OpenSSL_0_9_7-beta1~147 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=0bdbc5a86ed7975ed52ccd23c9c94ed9b431721b;p=oweals%2Fopenssl.git fix ssl3_pending --- diff --git a/CHANGES b/CHANGES index baf2ae82e2..13e50ddfce 100644 --- a/CHANGES +++ b/CHANGES @@ -13,6 +13,11 @@ *) applies to 0.9.6a/0.9.6b/0.9.6c and 0.9.7 +) applies to 0.9.7 only + *) Fix ssl3_pending() (ssl/s3_lib.c) to prevent SSL_pending() from + returning non-zero before the data has been completely received + when using non-blocking I/O. + [Bodo Moeller; problem pointed out by John Hughes] + *) Some of the ciphers missed the strength entry (SSL_LOW etc). [Ben Laurie, Lutz Jaenicke] diff --git a/LICENSE b/LICENSE index 3fd259ac32..7b93e0dbce 100644 --- a/LICENSE +++ b/LICENSE @@ -12,7 +12,7 @@ --------------- /* ==================================================================== - * Copyright (c) 1998-2001 The OpenSSL Project. All rights reserved. + * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions diff --git a/ssl/s3_lib.c b/ssl/s3_lib.c index 31994985c9..4ccc70b061 100644 --- a/ssl/s3_lib.c +++ b/ssl/s3_lib.c @@ -56,7 +56,7 @@ * [including the GNU Public Licence.] */ /* ==================================================================== - * Copyright (c) 1998-2001 The OpenSSL Project. All rights reserved. + * Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -943,6 +943,9 @@ SSL_CIPHER *ssl3_get_cipher(unsigned int u) int ssl3_pending(SSL *s) { + if (s->rstate == SSL_ST_READ_BODY) + return 0; + return (s->s3->rrec.type == SSL3_RT_APPLICATION_DATA) ? s->s3->rrec.length : 0; }