diff options
| author | gotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-08-17 08:22:45 +0000 |
|---|---|---|
| committer | gotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-08-17 08:22:45 +0000 |
| commit | ebe9863571c61850d3b8b84681ba1a0f0c526b41 (patch) | |
| tree | edadc927e0f71fa96d55a26318d9a11be1298803 | |
| parent | dece2e9dd04e939094905f3e71945e0fe8e98d78 (diff) | |
| download | ruby-ebe9863571c61850d3b8b84681ba1a0f0c526b41.tar.gz ruby-ebe9863571c61850d3b8b84681ba1a0f0c526b41.tar.xz ruby-ebe9863571c61850d3b8b84681ba1a0f0c526b41.zip | |
* ext/openssl/lib/openssl/ssl.rb (SSLSocket#sync_close=): add a
method to specify if the underlying IO will be closed in
SSLSocket#close.
* ext/openssl/lib/openssl/buffering.rb: add forwarders to
setsockopt, getsockopt and fcntl.
* ext/openssl/lib/net/protocols.rb: enable sync for SSLSocket.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4400 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 13 | ||||
| -rw-r--r-- | ext/openssl/lib/net/protocols.rb | 1 | ||||
| -rw-r--r-- | ext/openssl/lib/openssl/buffering.rb | 4 | ||||
| -rw-r--r-- | ext/openssl/lib/openssl/ssl.rb | 13 |
4 files changed, 28 insertions, 3 deletions
@@ -1,3 +1,14 @@ +Sun Aug 17 17:10:03 2003 GOTOU Yuuzou <gotoyuzo@notwork.org> + + * ext/openssl/lib/openssl/ssl.rb (SSLSocket#sync_close=): add a + method to specify if the underlying IO will be closed in + SSLSocket#close. + + * ext/openssl/lib/openssl/buffering.rb: add forwarders to + setsockopt, getsockopt and fcntl. + + * ext/openssl/lib/net/protocols.rb: enable sync for SSLSocket. + Sun Aug 17 11:32:04 2003 Nobuyoshi Nakada <nobu@ruby-lang.org> * ext/extmk.rb (extmake): should not force to remake Makefile when @@ -113,7 +124,7 @@ Wed Aug 13 23:31:00 2003 Shigeo Kobayashi <shigek@ruby-lang.org> Wed Aug 13 19:21:34 2003 Christian Neukirchen <chneukirchen@yahoo.de> * lib/webrick/https.rb (HTTPServer#run): should set syncing-mode - to SSLSocket. + to SSLSocket. [ruby-talk:78919] Wed Aug 13 18:13:49 2003 Yukihiro Matsumoto <matz@ruby-lang.org> diff --git a/ext/openssl/lib/net/protocols.rb b/ext/openssl/lib/net/protocols.rb index 5897716f3..6f646b578 100644 --- a/ext/openssl/lib/net/protocols.rb +++ b/ext/openssl/lib/net/protocols.rb @@ -42,6 +42,7 @@ module Net def ssl_connect() @raw_socket = @socket @socket = OpenSSL::SSL::SSLSocket.new(@raw_socket, @ssl_context) + @scoket.sync = true @socket.connect end diff --git a/ext/openssl/lib/openssl/buffering.rb b/ext/openssl/lib/openssl/buffering.rb index f07e5bc4c..6ddec099b 100644 --- a/ext/openssl/lib/openssl/buffering.rb +++ b/ext/openssl/lib/openssl/buffering.rb @@ -16,7 +16,7 @@ module Buffering include Enumerable - attr_accessor :sync + attr_accessor :sync, :sync_close BLOCK_SIZE = 1024*16 # @@ -185,5 +185,7 @@ module Buffering def close flush sysclose + @sync_close ||= false + @io.close if @sync_close end end diff --git a/ext/openssl/lib/openssl/ssl.rb b/ext/openssl/lib/openssl/ssl.rb index e43494191..39d975b1c 100644 --- a/ext/openssl/lib/openssl/ssl.rb +++ b/ext/openssl/lib/openssl/ssl.rb @@ -29,10 +29,21 @@ module OpenSSL @io.peeraddr end + def getsockopt(level, optname, optval) + @io.setsockopt(level, optname, optval) + end + + def setsockopt(level, optname) + @io.setsockopt(level, optname) + end + + def fcntl(*args) + @io.fcntl(*args) + end + def closed? @io.closed? end end end end - |
