ruby-changes:20150
From: emboss <ko1@a...>
Date: Wed, 22 Jun 2011 15:04:35 +0900 (JST)
Subject: [ruby-changes:20150] emboss:r32198 (trunk): * ext/openssl/ossl_ssl.c: Use SSL_MODE_RELEASE_BUFFERS if available.
emboss 2011-06-22 15:04:27 +0900 (Wed, 22 Jun 2011) New Revision: 32198 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=32198 Log: * ext/openssl/ossl_ssl.c: Use SSL_MODE_RELEASE_BUFFERS if available. Thanks, Eric Wong, for providing the patch. [ Ruby 1.9 - Feature #4672 ] [ruby-core:36127] Modified files: trunk/ChangeLog trunk/ext/openssl/ossl_ssl.c Index: ChangeLog =================================================================== --- ChangeLog (revision 32197) +++ ChangeLog (revision 32198) @@ -1,3 +1,9 @@ +Wed Jun 22 15:01:24 2011 Martin Bosslet <Martin.Bosslet@g...> + + * ext/openssl/ossl_ssl.c: Use SSL_MODE_RELEASE_BUFFERS if available. + Thanks, Eric Wong, for providing the patch. + [ Ruby 1.9 - Feature #4672 ] [ruby-core:36127] + Wed Jun 22 14:47:53 2011 Martin Bosslet <Martin.Bosslet@g...> * test/openssl/test_buffering.rb Index: ext/openssl/ossl_ssl.c =================================================================== --- ext/openssl/ossl_ssl.c (revision 32197) +++ ext/openssl/ossl_ssl.c (revision 32198) @@ -140,12 +140,17 @@ ossl_sslctx_s_alloc(VALUE klass) { SSL_CTX *ctx; + long mode = SSL_MODE_ENABLE_PARTIAL_WRITE; +#ifdef SSL_MODE_RELEASE_BUFFERS + mode |= SSL_MODE_RELEASE_BUFFERS; +#endif + ctx = SSL_CTX_new(SSLv23_method()); if (!ctx) { ossl_raise(eSSLError, "SSL_CTX_new:"); } - SSL_CTX_set_mode(ctx, SSL_MODE_ENABLE_PARTIAL_WRITE); + SSL_CTX_set_mode(ctx, mode); SSL_CTX_set_options(ctx, SSL_OP_ALL); return Data_Wrap_Struct(klass, 0, ossl_sslctx_free, ctx); } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/