summaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authorgotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-08-10 01:54:05 +0000
committergotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-08-10 01:54:05 +0000
commitb77e58e108c0269db92c435ef81920ccc77f8136 (patch)
tree8173652c288c3565990456df370e2469acd19d50 /ext
parentb24795b94fffd79dbb6fa8fee003bf033ccbb643 (diff)
downloadruby-b77e58e108c0269db92c435ef81920ccc77f8136.tar.gz
ruby-b77e58e108c0269db92c435ef81920ccc77f8136.tar.xz
ruby-b77e58e108c0269db92c435ef81920ccc77f8136.zip
* ext/openssl/lib/openssl/buffering.rb: increase BLOCK_SIZE
from 1k to 16k bytes. [ruby-talk:78603] * ext/openssl/ossl_ssl.c (ossl_sslctx_s_alloc): enable partial write to allow interruption in SSLSocket#sysread. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/openssl/lib/openssl/buffering.rb2
-rw-r--r--ext/openssl/ossl_ssl.c1
2 files changed, 2 insertions, 1 deletions
diff --git a/ext/openssl/lib/openssl/buffering.rb b/ext/openssl/lib/openssl/buffering.rb
index 61eb9dcc0..f07e5bc4c 100644
--- a/ext/openssl/lib/openssl/buffering.rb
+++ b/ext/openssl/lib/openssl/buffering.rb
@@ -17,7 +17,7 @@
module Buffering
include Enumerable
attr_accessor :sync
- BLOCK_SIZE = 1024
+ BLOCK_SIZE = 1024*16
#
# for reading.
diff --git a/ext/openssl/ossl_ssl.c b/ext/openssl/ossl_ssl.c
index db28ed364..3f25a077f 100644
--- a/ext/openssl/ossl_ssl.c
+++ b/ext/openssl/ossl_ssl.c
@@ -103,6 +103,7 @@ ossl_sslctx_s_alloc(VALUE klass)
if (!ctx) {
ossl_raise(eSSLError, "SSL_CTX_new:");
}
+ SSL_CTX_set_mode(ctx, SSL_MODE_ENABLE_PARTIAL_WRITE);
SSL_CTX_set_options(ctx, SSL_OP_ALL);
return Data_Wrap_Struct(klass, 0, ossl_sslctx_free, ctx);
}