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.
This commit is contained in:
@@ -119,7 +119,9 @@ int SSL_clear(SSL *s)
|
|||||||
s->client_version=s->version;
|
s->client_version=s->version;
|
||||||
s->rwstate=SSL_NOTHING;
|
s->rwstate=SSL_NOTHING;
|
||||||
s->rstate=SSL_ST_READ_HEADER;
|
s->rstate=SSL_ST_READ_HEADER;
|
||||||
|
#if 0
|
||||||
s->read_ahead=s->ctx->read_ahead;
|
s->read_ahead=s->ctx->read_ahead;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (s->init_buf != NULL)
|
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->server=(ctx->method->ssl_accept == ssl_undefined_function)?0:1;
|
||||||
s->options=ctx->options;
|
s->options=ctx->options;
|
||||||
s->mode=ctx->mode;
|
s->mode=ctx->mode;
|
||||||
|
s->read_ahead=ctx->read_ahead; /* used to happen in SSL_clear */
|
||||||
SSL_clear(s);
|
SSL_clear(s);
|
||||||
|
|
||||||
CRYPTO_new_ex_data(ssl_meth,s,&s->ex_data);
|
CRYPTO_new_ex_data(ssl_meth,s,&s->ex_data);
|
||||||
|
Reference in New Issue
Block a user