summaryrefslogtreecommitdiff
path: root/test/openssl
AgeCommit message (Collapse)Author
2010-12-15drying up the requires in the openssl teststenderlove
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-13adding a test for OpenSSL::PKCS12.createtenderlove
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-11* ext/openssl/ossl_asn1.c: indefinite length BER to DER encoding istenderlove
properly supported. Thanks Martin Bosslet! [ruby-core:33082] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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-10Include Comparable in OpenSSL::X509::Name, document #<=>drbrain
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-09* ext/openssl/ossl_x509store.c (ossl_x509stctx_cleanup): removing Ctenderlove
implementation of `cleanup`. * ext/openssl/lib/openssl/x509.rb: adding ruby implementation of `cleanup`. OpenSSL::X509::StoreContext#cleanup is deprecated since reusing the underlying struct doesn't make sense. [ruby-dev:42546] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30152 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-12-01* test/openssl/test_ssl.rb (test_not_started_session): non socketusa
argument of SSLSocket.new is not supported on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-15making ssl test a little bettertenderlove
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29788 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-15STDIN is not valid when ruby doesn't have tty.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-14* etc/openssl/ossl_ssl.c (ossl_ssl_get_cert): raise exception iftenderlove
pointer is invalid. Thanks Ippei Obayashi! [ruby-dev:42573] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-06removing empty teardown, cleaning up whitespace errorstenderlove
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-06* test/openssl/test_ocsp.rb: adding test for r29699. Thanks Elisetenderlove
Huard! [ruby-core:32460] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-04* ext/openssl/lib/openssl/bn.rb (Integer#to_bn): OpenSSL::BN.newnaruse
accepts only Strings, so call Integer#to_s(16). 16 is for an optimization. [ruby-dev:42336] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-22* test/openssl/utils.rb (OpenSSL#silent): always restore $VERBOSE. ↵kazu
[ruby-dev:42285] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-13* ext/openssl/ossl_bn.c (ossl_bn_is_prime): fix comparisonnaruse
with rb_scan_args. Before this fix, OpenSSL::BN#prime? is fully broken. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29237 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
2010-08-23 * backport r29071 from ruby_1_8;nahi
* ext/openssl/ossl_asn1.c (obj_to_asn1bool): fixed ASN1::Boolean encoding issue for OpenSSL 1.0.0 compatibility. ASN1::Boolean.new(false).to_der wrongly generated "\1\1\377" which means 'true'. ASN1_TYPE_set of OpenSSL <= 0.9.8 treats value 0x100 as 'false' but OpenSSL >= 1.0.0 treats it as 'true'. ruby-ossl was using 0x100 for 'false' for backward compatibility. Just use 0x0 for the case OpenSSL >= OpenSSL 0.9.7. * test/openssl/test_asn1.rb: test added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-19 * backport r28621 and r28632 from ruby_1_8;nahi
* ext/openssl/ossl_config.c, ext/openssl/lib/openssl/config.rb, ext/openssl/lib/openssl.rb: reimplement OpenSSL::Config in Ruby. Now it should work on windows. * test/openssl/test_config.rb: added tests for OpenSSL::Config#dup. * test/openssl/test_config.rb: added tests for Config#clone. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29048 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-19* test/openssl/test_ssl.rb (test_client_auth): Errno::ECONNRESET is raised onusa
Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-19* test/openssl/test_ssl.rb (server_loop): treat Errno::ENOTSOCK just like asusa
Errno::EBADF and Errno::EINVAL. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27883 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-06* test/openssl/test_ec.rb: added test_dsa_sign_asn1_FIPS186_3. dgst isnobu
truncated with ec_key.group.order.size after openssl 0.9.8m for FIPS 186-3 compliance. WARNING: ruby-openssl aims to wrap an OpenSSL so when you're using openssl 0.9.8l or earlier version, EC.dsa_sign_asn1 raises OpenSSL::PKey::ECError as before and EC.dsa_verify_asn1 just returns false when you pass dgst longer than expected (no truncation performed). * ext/openssl/ossl_pkey_ec.c: rdoc typo fixed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-02* test: fixed wrong assertions.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-28* test/openssl/{test_x509cert.rb,openssl,test_x509crl.rb,naruse
test_x509req.rb}: fix false positive tests because of OpenSSL spec change. patched by originally Hongli Lai [ruby-core:27417], and fixed by Motohiro KOSAKI [ruby-core:28063] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-28* test/openssl/{test_x509cert.rb,openssl,test_x509req.rb}:naruse
remove false positive tests because of OpenSSL spec change. patched by Motohiro KOSAKI [ruby-core:28063] see also [ruby-dev:40077] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-23Add some more tests, revisited.knu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-23Back out the series of changes pending a due discussion.knu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-23Add some more tests.knu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26742 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-02use require_relative.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-25supress warnings.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-26* test/openssl/test_config.rb (OpenSSL::TestConfig): new test case.yugui
test for r25017. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25934 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
2009-01-24* ext/openssl/ossl_ssl.c: Server Name Indication support.technorama
new methods SSLContext#server_name_cb=, SSLSocket#hostname=. * test/openssl/test_ssl.rb: Tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21761 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
2008-12-04* ext/openssl/ossl_ssl.c (ossl_ssl_read_nonblock):matz
OpenSSL::SSL::SSLSocket should implement read_nonblock. a patch from Aaron Patterson in [ruby-core:20277]. fix: #814 [ruby-core:20241] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-24* test: assert_raises has been deprecated since a long time ago.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-09* test/openssl/test_ssl.rb (OpenSSL#test_client_session):kazu
Debian's openssl 0.9.8g-13 failed at assert(ssl.session_reused?), when use default SSLContext. [ruby-dev:36167] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19268 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-22* lib/webrick/server.rb (WEBrick::GenericServer#shutdown):kazu
rescue Errno::ENOTCONN and close. [ruby-dev:35896] * test/openssl/test_ssl.rb (OpenSSL#start_server): ditto. [ruby-dev:35897] * lib/net/imap.rb (Net::IMAP#disconnect): ditto. [ruby-dev:35898] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-27* test/openssl/test_ssl.rb (server_loop): rescue Errno::EINVAL andmame
Errno::ECONNABORTED. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-30* test/openssl/test_ssl.rb (start_server): shutdown TCPServer beforemame
close. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-05* ext/openssl/ossl_ssl_session.c (ossl_ssl_session_initialize):knu
Add a null check for ssl; submitted by akira yamada in [ruby-dev:34950]. * ext/openssl/ossl_ssl.c (Init_ossl_ssl): Define OP_NO_TICKET if SSL_OP_NO_TICKET is present; submitted by akira yamada in [ruby-dev:34944]. * test/openssl/test_ssl.rb (OpenSSL#test_server_session): Add a workaround for the case where OpenSSL is configured with --enable-tlsext; submitted by akira yamada in [ruby-dev:34944]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16842 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-22* test/openssl/test_ssl.rb (start_server): add timeout to server.join.mame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16161 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-20* ext/openssl/ossl_ssl.c: Switch stats hash key from string to symbol.technorama
New method SSLContext#setup to aid C extension writers. * test/openssl/test_ssl.rb: Add tests for new method and sessions. Use threads for ssl server instead of forking. * ext/openssl/ossl_version.h: Bump version. * ext/openssl/ossl_x509ext.c: Fix warnings. * test/openssl/utils.rb: Fix warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16111 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-22* ext/openssl/lib/net/ssl.rb (OpenSSL::SSL::SSLContext.build): removed.gotoyuzo
* ext/openssl/lib/net/ssl.rb (OpenSSL::SSL::SSLContext#set_params): new method to set suitable SSL parameters. * lib/net/pop.rb, lib/net/http.rb, lib/net/imap.rb, test/openssl/test_ssl.rb: follow above change. * test/net/http/test_https.rb: refine error case. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e