ruby-changes:18428
From: tenderlove <ko1@a...>
Date: Wed, 5 Jan 2011 13:57:34 +0900 (JST)
Subject: [ruby-changes:18428] Ruby:r30451 (trunk): * SSL_shutdown should be called until the return value is non-zero:
tenderlove 2011-01-05 13:57:27 +0900 (Wed, 05 Jan 2011) New Revision: 30451 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=30451 Log: * SSL_shutdown should be called until the return value is non-zero: http://www.openssl.org/docs/ssl/SSL_shutdown.html Modified files: trunk/ChangeLog trunk/ext/openssl/ossl_ssl.c Index: ChangeLog =================================================================== --- ChangeLog (revision 30450) +++ ChangeLog (revision 30451) @@ -1,3 +1,8 @@ +Wed Jan 5 13:56:03 2011 Aaron Patterson <aaron@t...> + + * 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@t...> * Use _WIN32 rather than checking for windows.h. Thanks Jon Forums! Index: ext/openssl/ossl_ssl.c =================================================================== --- ext/openssl/ossl_ssl.c (revision 30450) +++ ext/openssl/ossl_ssl.c (revision 30451) @@ -960,8 +960,11 @@ static void ossl_ssl_shutdown(SSL *ssl) { + int dead; if (ssl) { - SSL_shutdown(ssl); + do { + dead = SSL_shutdown(ssl); + } while(!dead); SSL_clear(ssl); } } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/