Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r74817 - trunk/boost/asio/ssl/detail
From: chris_at_[hidden]
Date: 2011-10-08 17:10:57


Author: chris_kohlhoff
Date: 2011-10-08 17:10:56 EDT (Sat, 08 Oct 2011)
New Revision: 74817
URL: http://svn.boost.org/trac/boost/changeset/74817

Log:
Change the SSL buffers sizes so that they're large enough to hold a complete TLS record. Refs #5854
Text files modified:
   trunk/boost/asio/ssl/detail/stream_core.hpp | 8 ++++++--
   1 files changed, 6 insertions(+), 2 deletions(-)

Modified: trunk/boost/asio/ssl/detail/stream_core.hpp
==============================================================================
--- trunk/boost/asio/ssl/detail/stream_core.hpp (original)
+++ trunk/boost/asio/ssl/detail/stream_core.hpp 2011-10-08 17:10:56 EDT (Sat, 08 Oct 2011)
@@ -34,13 +34,17 @@
 
 struct stream_core
 {
+ // According to the OpenSSL documentation, this is the buffer size that is is
+ // sufficient to hold the largest possible TLS record.
+ enum { max_tls_record_size = 17 * 1024 };
+
   stream_core(SSL_CTX* context, boost::asio::io_service& io_service)
     : engine_(context),
       pending_read_(io_service),
       pending_write_(io_service),
- output_buffer_space_(16384),
+ output_buffer_space_(max_tls_record_size),
       output_buffer_(boost::asio::buffer(output_buffer_space_)),
- input_buffer_space_(16384),
+ input_buffer_space_(max_tls_record_size),
       input_buffer_(boost::asio::buffer(input_buffer_space_))
   {
     pending_read_.expires_at(boost::posix_time::neg_infin);


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk