net/socket.hpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) New commits: commit cbfa42e24828a16eabf605c973cbe357be355c95 Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk> Date: Sun Feb 19 23:22:39 2017 -0500
nb: properly shutdown and cleanup SSL Change-Id: Idd39851775e16c62d6192e08c9058cd9fb40104f Reviewed-on: https://gerrit.libreoffice.org/34454 Reviewed-by: Ashod Nakashian <ashnak...@gmail.com> Tested-by: Ashod Nakashian <ashnak...@gmail.com> diff --git a/net/socket.hpp b/net/socket.hpp index 3119834..25a335c 100644 --- a/net/socket.hpp +++ b/net/socket.hpp @@ -431,6 +431,22 @@ protected: class SslStreamSocket : public BufferingSocket { public: + ~SslStreamSocket() + { + shutdown(); + SSL_free(_ssl); + } + + /// Shutdown the TLS/SSL connection properly. + void shutdown() + { + if (SSL_shutdown(_ssl) == 0) + { + // Complete the bidirectional shutdown. + SSL_shutdown(_ssl); + } + } + bool readIncomingData() override { const int rc = doHandshake(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits