summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845>2009-09-13 11:40:59 +0000
committerjoe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845>2009-09-13 11:40:59 +0000
commitfcd17cb154e6799ee96f8b594aada8aa895625f1 (patch)
treed187e301709a6c71f11ec6f36e00c4732a84114d
parent49395ede463359704b7c60543476a8babc5b7ea0 (diff)
downloadneon-fcd17cb154e6799ee96f8b594aada8aa895625f1.tar.gz
Merge r1726 from trunk:
* src/ne_socket.c (ne_sock_close) [HAVE_OPENSSL]: Ensure SSL connection is shut down cleanly. git-svn-id: http://svn.webdav.org/repos/projects/neon/branches/0.29.x@1727 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
-rw-r--r--NEWS2
-rw-r--r--src/ne_socket.c7
2 files changed, 7 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 8876d1b..2c866db 100644
--- a/NEWS
+++ b/NEWS
@@ -23,7 +23,7 @@ Changes in release 0.29.0:
- fix handling of "stale" flag in RFC2069-style Digest auth challenge
- ne_free() implemented as a function on Win32 (thanks to Helge Hess)
- symbol versioning used for new symbols, where supported
- - test suite output now compacted
+ - ensure SSL connections are closed cleanly with OpenSSL
- updated Polish (pl) translation (Arfrever Frehtes Taifersar Arahesis)
Changes in release 0.28.6:
diff --git a/src/ne_socket.c b/src/ne_socket.c
index aa4c4ed..31e96f1 100644
--- a/src/ne_socket.c
+++ b/src/ne_socket.c
@@ -1863,7 +1863,12 @@ int ne_sock_close(ne_socket *sock)
#if defined(HAVE_OPENSSL)
if (sock->ssl) {
- SSL_shutdown(sock->ssl);
+ /* Correct SSL shutdown procedure: call once... */
+ if (SSL_shutdown(sock->ssl) == 0) {
+ /* close_notify sent but not received; wait for peer to
+ * send close_notify... */
+ SSL_shutdown(sock->ssl);
+ }
SSL_free(sock->ssl);
}
#elif defined(HAVE_GNUTLS)