summaryrefslogtreecommitdiffstats
path: root/ssl/ssl_lib.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2016-01-13 14:20:25 +0000
committerMatt Caswell <matt@openssl.org>2016-03-07 21:39:27 +0000
commitdad78fb13d790cd06afd6e88067c038d22d7780f (patch)
tree784454e5db93dedfd5239e36b7e61c055d1a1b4b /ssl/ssl_lib.c
parent0220fee47f912c9c89efe24c09e10f4d452a4d42 (diff)
Add an ability to set the SSL read buffer size
This capability is required for read pipelining. We will only read in as many records as will fit in the read buffer (and the network can provide in one go). The bigger the buffer the more records we can process in parallel. Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'ssl/ssl_lib.c')
-rw-r--r--ssl/ssl_lib.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c
index 92734ea937..4df8339979 100644
--- a/ssl/ssl_lib.c
+++ b/ssl/ssl_lib.c
@@ -674,6 +674,8 @@ SSL *SSL_new(SSL_CTX *ctx)
s->max_pipelines = ctx->max_pipelines;
if (s->max_pipelines > 1)
RECORD_LAYER_set_read_ahead(&s->rlayer, 1);
+ if (ctx->default_read_buf_len > 0)
+ SSL_set_default_read_buffer_len(s, ctx->default_read_buf_len);
CRYPTO_add(&ctx->references, 1, CRYPTO_LOCK_SSL_CTX);
s->ctx = ctx;