* ext/openssl/ossl_ssl.c (ossl_ssl_read, ossl_ssl_write): should

call rb_sys_fail instead of rasing SSLError if SSL_ERROR_SYSCALL
  occured.

* ext/openssl/lib/openssl/buffering.rb (Buffering#fill_rbuff):
  should rescue Errno::EAGAIN.

* ext/openssl/lib/openssl/buffering.rb (Buffering#each): fix typo.
  suggested by Brian Ollenberger.

* ext/openssl/lib/openssl/ssl.rb: set non-blocking flag to the
  underlying IO.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
gotoyuzo 2005-02-15 17:50:47 +00:00
parent e65affb360
commit a579d8bf68
4 changed files with 31 additions and 2 deletions

View file

@ -16,6 +16,7 @@
require "openssl"
require "openssl/buffering"
require "fcntl"
module OpenSSL
module SSL
@ -49,9 +50,18 @@ module OpenSSL
end
end
module Nonblock
def initialize(*args)
flag = @io.fcntl(Fcntl::F_GETFL) | File::NONBLOCK
@io.fcntl(Fcntl::F_SETFL, flag)
super
end
end
class SSLSocket
include Buffering
include SocketForwarder
include Nonblock
def post_connection_check(hostname)
check_common_name = true