summaryrefslogtreecommitdiff
path: root/ext/openssl
diff options
context:
space:
mode:
authortenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-01-05 04:57:27 +0000
committertenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-01-05 04:57:27 +0000
commit76731871e70398afbd044e16e9cf4151b471841b (patch)
treecc092de317922eb06f1bdb54b8dd353b8baeba1d /ext/openssl
parent20e2c4cb365041c3672760f1ef829d870b7c2601 (diff)
* SSL_shutdown should be called until the return value is non-zero:
http://www.openssl.org/docs/ssl/SSL_shutdown.html git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl')
-rw-r--r--ext/openssl/ossl_ssl.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/openssl/ossl_ssl.c b/ext/openssl/ossl_ssl.c
index 99a4fe3e97..c6f7d17231 100644
--- a/ext/openssl/ossl_ssl.c
+++ b/ext/openssl/ossl_ssl.c
@@ -960,8 +960,11 @@ ossl_sslctx_flush_sessions(int argc, VALUE *argv, VALUE self)
static void
ossl_ssl_shutdown(SSL *ssl)
{
+ int dead;
if (ssl) {
- SSL_shutdown(ssl);
+ do {
+ dead = SSL_shutdown(ssl);
+ } while(!dead);
SSL_clear(ssl);
}
}