summaryrefslogtreecommitdiff
path: root/test/openssl/test_pair.rb
AgeCommit message (Collapse)Author
2010-12-11refactor load error rescue to the openssl util filetenderlove
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30176 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-07Set DH Parameter for SSLContext to clean warnings.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-10 * ext/openssl/lib/openssl/x509-internal.rb: removed unused localnahi
variable. * test/openssl/*: less warnings while test running with -w. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29217 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-12* test: use require_relative.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24878 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-21* ext/openssl/ossl_ssl.c (write_would_block): defined.akr
(read_would_block): defined. (ossl_start_ssl): add nonblock argument. (ossl_ssl_connect): follow ossl_start_ssl change. (ossl_ssl_connect_nonblock): new method. (ossl_ssl_accept): follow ossl_start_ssl change. (ossl_ssl_accept_nonblock): new method. (ossl_ssl_read_internal): use write_would_block and read_would_block. (ossl_ssl_write_internal): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-20* ext/openssl/lib/openssl/buffering.rbakr
(OpenSSL::Buffering#write_nonblock): new method. * ext/openssl/ossl_ssl.c (ossl_ssl_write_nonblock): new method. (ossl_ssl_write_internal): defined. (ossl_ssl_write): use ossl_ssl_write_internal. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-19* io.c (rb_mWaitReadable): defined.akr
(rb_mWaitWritable): defined. (io_getpartial): extend IO::WaitReadable on EWOULDBLOCK and EAGAIN. (rb_io_write_nonblock): extend IO::WaitWritable on EWOULDBLOCK and EAGAIN. * error.c (make_errno_exc): extracted from rb_sys_fail. (rb_mod_sys_fail): new function. * include/ruby/ruby.h (rb_mod_sys_fail): declared. (rb_mWaitReadable): declared. (rb_mWaitWritable): declared. * ext/socket/init.c (rsock_s_recvfrom_nonblock): extend IO::WaitReadable on EWOULDBLOCK and EAGAIN. (rsock_s_accept_nonblock): extend IO::WaitReadable on EWOULDBLOCK, EAGAIN, ECONNABORTED and EPROTO. * ext/socket/socket.c (sock_connect_nonblock): extend IO::WaitWritable on EINPROGRESS. * ext/socket/ancdata.c (bsock_sendmsg_internal): extend IO::WaitWritable on EWOULDBLOCK and EAGAIN. (bsock_recvmsg_internal): extend IO::WaitReadable on EWOULDBLOCK and EAGAIN. * ext/openssl/ossl_ssl.c (ossl_ssl_read_internal): raise SSLError extended by IO::WaitReadable/IO::WaitWritable on SSL_ERROR_WANT_READ/SSL_ERROR_WANT_WRITE. * ext/openssl/ossl.c (ossl_make_error): extracted from ossl_raise. (ossl_exc_new): new function. * ext/openssl/ossl.h (ossl_exc_new): declared. * lib/net/protocol.rb (rbuf_fill): rescue IO::WaitReadable and IO::WaitWritable. [ruby-core:22539], [ruby-dev:38140] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-06* {ext,lib,test}/**/*.rb: removed trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-08select before read_nonblock.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-31* ext/openssl/ossl_ssl.c (ossl_ssl_read_internal): show openssl errorakr
code in EWOULDBLOCK error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-28add a test for OpenSSL::SSL::SSLSocket#read_nonblock.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-15* test/openssl/test_pair.rb (SSLPair#ssl_pair): join the thread, evenakr
on an error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-09* ext/openssl/ossl_ssl.c: OpenSSL::SSL::SSLContexts suports callbacks:gotoyuzo
- SSLContext#client_cert_cb is a Proc. it is called when a client certificate is requested by a server and no certificate was yet set for the SSLContext. it must return an Array which includes OpenSSL::X509::Certificate and OpenSSL::PKey::RSA/DSA objects. - SSLContext#tmp_dh_callback is called in key exchange with DH algorithm. it must return an OpenSSL::PKey::DH object. * ext/openssl/ossl_ssl.c: (ossl_sslctx_set_ciphers): ignore the argument if it's nil. (ossl_start_ssl, ossl_ssl_write): call rb_sys_fail if errno isn't 0. [ruby-dev:25831] * ext/openssl/ossl_pkey.c (GetPrivPKeyPtr, ossl_pkey_sign): should call rb_funcall first. (DupPrivPKeyPtr): new function. * ext/openssl/ossl_pkey_dh.c: add default DH parameters. * ext/openssl/ossl_pkey.h: ditto. * ext/openssl/lib/openssl/cipher.rb: fix typo. [ruby-dev:24285] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-05* ext/openssl/ossl_ssl.c (ossl_start_ssl): should wait for thatgotoyuzo
the underlying IO become readable or writable if the error was SSL_ERROR_WANT_READ or SSL_ERROR_WANT_WRITE. [ruby-dev:25795] * ext/openssl/ossl_ssl.c (ossl_ssl_read, ossl_ssl_write): ditto. * ext/openssl/lib/openssl/buffering.rb (Buffering#consume_rbuf): pointless eof flag resetting is deleted. (Buffering#read): should return an empty string if the specified size is zero. (Buffering#readpartial): new method. (Buffering#readline): fix typo. (Buffering#getc): return the first character of string correctly. (Buffering#readchar): fix typo. (Buffering#eof?): should read again it the input buffer is empty. (Buffering#do_write): should rescue Errno::EAGAIN. (Buffering#puts): use "\n" as the output field separator. * ext/openssl/extconf.rb: get rid of GNUmakefile generation. * text/openssl/test_pair.rb: test for IO like methods. * test/ruby/ut_eof.rb: test about empty file. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e