diff options
author | gotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-08-18 22:49:48 +0000 |
---|---|---|
committer | gotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-08-18 22:49:48 +0000 |
commit | e986e7123643b91ece134ea47db9935670108ca2 (patch) | |
tree | f2a04d9bf6592f11b1d81a233991d4b75b0faeaa /ext/openssl/lib/net/protocols.rb | |
parent | f713c829dfc3339b15848907fde9fdd82a8a8b5d (diff) | |
download | ruby-e986e7123643b91ece134ea47db9935670108ca2.tar.gz ruby-e986e7123643b91ece134ea47db9935670108ca2.tar.xz ruby-e986e7123643b91ece134ea47db9935670108ca2.zip |
* ext/openssl/ossl_ssl.c: sync_close is moved to SSLSocket as
a builtin.
* ext/openssl/lib/openssl/buffering.rb (Buffering#close): ditto.
* ext/openssl/lib/openssl/buffering.rb (Buffering#puts): should
add a return to the tails of each line.
* ext/openssl/lib/openssl/ssl.rb: new class OpenSSL::SSL::SSLServer.
* ext/openssl/lib/net/protocols.rb (SSLIO#ssl_connect): use sync_close.
* ext/openssl/sample/echo_svr.rb: use SSLServer.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl/lib/net/protocols.rb')
-rw-r--r-- | ext/openssl/lib/net/protocols.rb | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/ext/openssl/lib/net/protocols.rb b/ext/openssl/lib/net/protocols.rb index 6f646b578..25e940c54 100644 --- a/ext/openssl/lib/net/protocols.rb +++ b/ext/openssl/lib/net/protocols.rb @@ -40,17 +40,12 @@ module Net end def ssl_connect() - @raw_socket = @socket - @socket = OpenSSL::SSL::SSLSocket.new(@raw_socket, @ssl_context) - @scoket.sync = true + @socket = OpenSSL::SSL::SSLSocket.new(@socket, @ssl_context) + @socket.sync = true + @socket.sync_close = true @socket.connect end - def close - super - @raw_socket.close if @raw_socket - end - def peer_cert @socket.peer_cert end |