summaryrefslogtreecommitdiff
path: root/vio
diff options
context:
space:
mode:
authorunknown <dkatz@damien-katzs-computer.local>2007-07-12 22:19:07 -0400
committerunknown <dkatz@damien-katzs-computer.local>2007-07-12 22:19:07 -0400
commit91112d124e0daf124a838c636ec93eed470aeb3d (patch)
treeadc9784cf5be803bf9e1400231ed12fe3144b96b /vio
parentb2bf1ddfc0ba31cb8f68eec78c623a85466ef2ea (diff)
parentb7527f6b72cbd3d919671ed15262b1893166e125 (diff)
downloadmariadb-git-91112d124e0daf124a838c636ec93eed470aeb3d.tar.gz
Merge damien-katzs-computer.local:/Users/dkatz/mysql50
into damien-katzs-computer.local:/Users/dkatz/50
Diffstat (limited to 'vio')
-rw-r--r--vio/viossl.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/vio/viossl.c b/vio/viossl.c
index 5e4203a3fb5..861989136d3 100644
--- a/vio/viossl.c
+++ b/vio/viossl.c
@@ -123,6 +123,16 @@ int vio_ssl_close(Vio *vio)
if (ssl)
{
+ /*
+ THE SSL standard says that SSL sockets must send and receive a close_notify
+ alert on socket shutdown to avoid truncation attacks. However, this can
+ cause problems since we often hold a lock during shutdown and this IO can
+ take an unbounded amount of time to complete. Since our packets are self
+ describing with length, we aren't vunerable to these attacks. Therefore,
+ we just shutdown by closing the socket (quiet shutdown).
+ */
+ SSL_set_quiet_shutdown(ssl, 1);
+
switch ((r= SSL_shutdown(ssl)))
{
case 1: