mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@4400 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
7544cb3930
commit
39c4886fe7
4 changed files with 28 additions and 3 deletions
13
ChangeLog
13
ChangeLog
|
@ -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>
|
Sun Aug 17 11:32:04 2003 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* ext/extmk.rb (extmake): should not force to remake Makefile when
|
* 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>
|
Wed Aug 13 19:21:34 2003 Christian Neukirchen <chneukirchen@yahoo.de>
|
||||||
|
|
||||||
* lib/webrick/https.rb (HTTPServer#run): should set syncing-mode
|
* 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>
|
Wed Aug 13 18:13:49 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
|
|
|
@ -42,6 +42,7 @@ module Net
|
||||||
def ssl_connect()
|
def ssl_connect()
|
||||||
@raw_socket = @socket
|
@raw_socket = @socket
|
||||||
@socket = OpenSSL::SSL::SSLSocket.new(@raw_socket, @ssl_context)
|
@socket = OpenSSL::SSL::SSLSocket.new(@raw_socket, @ssl_context)
|
||||||
|
@scoket.sync = true
|
||||||
@socket.connect
|
@socket.connect
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
module Buffering
|
module Buffering
|
||||||
include Enumerable
|
include Enumerable
|
||||||
attr_accessor :sync
|
attr_accessor :sync, :sync_close
|
||||||
BLOCK_SIZE = 1024*16
|
BLOCK_SIZE = 1024*16
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -185,5 +185,7 @@ module Buffering
|
||||||
def close
|
def close
|
||||||
flush
|
flush
|
||||||
sysclose
|
sysclose
|
||||||
|
@sync_close ||= false
|
||||||
|
@io.close if @sync_close
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -29,10 +29,21 @@ module OpenSSL
|
||||||
@io.peeraddr
|
@io.peeraddr
|
||||||
end
|
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?
|
def closed?
|
||||||
@io.closed?
|
@io.closed?
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue