diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ext/openssl/ossl_ssl.c | 5 |
2 files changed, 9 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Wed Jan 5 13:56:03 2011 Aaron Patterson <aaron@tenderlovemaking.com> + + * SSL_shutdown should be called until the return value is non-zero: + http://www.openssl.org/docs/ssl/SSL_shutdown.html + Wed Jan 5 12:10:08 2011 Aaron Patterson <aaron@tenderlovemaking.com> * Use _WIN32 rather than checking for windows.h. Thanks Jon Forums! 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); } } |