aboutsummaryrefslogtreecommitdiffstats
path: root/ssl
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2000-10-11 09:15:53 +0000
committerRichard Levitte <levitte@openssl.org>2000-10-11 09:15:53 +0000
commitc125ea2767732f13cf8d2f913eefd00213fc9a4b (patch)
tree445e0e61d639118422bbd64887a23c1eb118e9d6 /ssl
parentdf4fd356df731c5fafebd3c25bd561b7e8ab9c95 (diff)
downloadopenssl-c125ea2767732f13cf8d2f913eefd00213fc9a4b.tar.gz
Fix from main trunk, 2000-09-26 13:30 bodo:
Don't modify s->read_ahead in SSL_clear, which is called from accept/connect functions; those should not change the read_ahead setting of the SSL structure. Fix from main trunk, 2000-09-26 13:38 bodo: Set s->read_ahead in SSL_new because SSL_clear no longer modifies it.
Diffstat (limited to 'ssl')
-rw-r--r--ssl/ssl_lib.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c
index 635b25062e..fec98dd8f4 100644
--- a/ssl/ssl_lib.c
+++ b/ssl/ssl_lib.c
@@ -119,7 +119,9 @@ int SSL_clear(SSL *s)
s->client_version=s->version;
s->rwstate=SSL_NOTHING;
s->rstate=SSL_ST_READ_HEADER;
+#if 0
s->read_ahead=s->ctx->read_ahead;
+#endif
if (s->init_buf != NULL)
{
@@ -229,6 +231,7 @@ SSL *SSL_new(SSL_CTX *ctx)
s->server=(ctx->method->ssl_accept == ssl_undefined_function)?0:1;
s->options=ctx->options;
s->mode=ctx->mode;
+ s->read_ahead=ctx->read_ahead; /* used to happen in SSL_clear */
SSL_clear(s);
CRYPTO_new_ex_data(ssl_meth,s,&s->ex_data);