[Libreoffice-commits] online.git: Branch 'private/Ashod/nonblocking' - net/ssl.cpp
Ashod Nakashian
ashod.nakashian at collabora.co.uk
Mon Feb 20 03:50:08 UTC 2017
net/ssl.cpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit 9106829fc70f6600f3cea58cd9ccb7777235615c
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date: Sun Feb 19 12:04:10 2017 -0500
nb: allow moving write buffer
SSL expects the write buffer to be the same on
retry. This requirement cannot be guaranteed
when using standard containers as the internal
memory might be re-allocated between calls.
Luckily SSL can relax this requirement when asked.
Change-Id: I26771609a8cc0f9de0e554f9fa255d998f6c7b14
Reviewed-on: https://gerrit.libreoffice.org/34440
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
diff --git a/net/ssl.cpp b/net/ssl.cpp
index a1f23a1..f05ab64 100644
--- a/net/ssl.cpp
+++ b/net/ssl.cpp
@@ -94,7 +94,10 @@ SslContext::SslContext(const std::string& certFilePath,
SSL_CTX_set_verify(_ctx, SSL_VERIFY_NONE, nullptr /*&verifyServerCallback*/);
SSL_CTX_set_cipher_list(_ctx, "ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH");
SSL_CTX_set_verify_depth(_ctx, 9);
- SSL_CTX_set_mode(_ctx, SSL_MODE_ENABLE_PARTIAL_WRITE);
+
+ // The write buffer may re-allocate, and we don't mind partial writes.
+ SSL_CTX_set_mode(_ctx, SSL_MODE_ENABLE_PARTIAL_WRITE |
+ SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER);
SSL_CTX_set_session_cache_mode(_ctx, SSL_SESS_CACHE_OFF);
initDH();
More information about the Libreoffice-commits
mailing list