diff options
author | dkatz@damien-katzs-computer.local <> | 2007-07-12 22:22:40 -0400 |
---|---|---|
committer | dkatz@damien-katzs-computer.local <> | 2007-07-12 22:22:40 -0400 |
commit | 230adda1e2b6f0dd34ab4ba966580563369da612 (patch) | |
tree | 02068207d3d39a5f16249d52cfc3a7ac4e3122e7 /vio/viossl.c | |
parent | 2a58120fc406a6848f5543f3b8670660d76410ee (diff) | |
parent | a55c8bef4950dca9363de7cb2a1ef6351d09d99b (diff) | |
download | mariadb-git-230adda1e2b6f0dd34ab4ba966580563369da612.tar.gz |
Merge damien-katzs-computer.local:/Users/dkatz/mysql50
into damien-katzs-computer.local:/Users/dkatz/mysql51
Diffstat (limited to 'vio/viossl.c')
-rw-r--r-- | vio/viossl.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/vio/viossl.c b/vio/viossl.c index 32cfecdb9c8..2c74efb1bef 100644 --- a/vio/viossl.c +++ b/vio/viossl.c @@ -124,6 +124,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: /* Shutdown successful */ |