summaryrefslogtreecommitdiff
path: root/test/openssl
AgeCommit message (Collapse)Author
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
2007-12-17* ext/openssl/ossl_ssl.c (ossl_sslctx_set_ssl_version):gotoyuzo
new method OpenSSL::SSL::SSLContext#ssl_version to wrap SSL_CTX_set_ssl_version. * ext/openssl/ossl_ssl.c (ossl_ssl_get_verify_result): new method OpenSSL::SSL::SSLSocket#verify_result to wrap SSL_get_verrify_result. * ext/openssl/lib/openssl/ssl.rb (OpenSSL::SSL::SSLContext.build): new method to build OpenSSL::SSL::SSLContext with Hash parameters. this method provides safety default parameters than SSLContext.new. * ext/openssl/lib/openssl/ssl.rb (OpenSSL::SSL.verify_cetificate_identity): new module function: pull out identity verification process from OpenSSL::SSL::SSLSocket#post_connection_check. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-17* ext/openssl/lib/openssl/buffering.rb (Buffering#gets): added secondgotoyuzo
optional argument to specify maximum length limit. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14261 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
2007-12-08* test/openssl/test_pkcs7.rb: Remove redundant module namespace.gotoyuzo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-18* ext/openssl/{extconf.rb,ossl_ssl_session.c}:technorama
Fix ruby-Bugs-11513. * ext/openssl/ossl_pkey_ec.c New methods EC::Point.[eql,make_affine!,invert!,on_curve?,infinity?] By default output the same key form as the openssl command. * ext/openssl/ossl_rand.c New method Random.status? * test/openssl/test_ec.rb New tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-07-02* test/openssl/test_asn1.c: String#[]= doesnt't accept Integer.gotoyuzo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-05-08* ext/openssl/extconf.rb: add check for OBJ_NAME_do_all_sorted.gotoyuzo
* ext/openssl/ossl_cipher.c (ossl_s_ciphers): new method OpenSSL::Cipher.ciphers. it returns all the cipher names. * ext/openssl/ossl_cipher.c (ossl_cipher_init): refine warning message. * ext/openssl/lib/openssl/cipher.rb: reimplement without eval() and add constants AES128, AES192, AES256. [ruby-dev:28610] * ext/openssl/lib/openssl/digest.rb: reimplement without eval(). * test/openssl/test_cipher.rb, test_digest: fix about reimplemented features. * sample/openssl/cipher.rb: rewrite all. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-12-12* test/openssl/test_ssl.rb (test_parallel): call GC.start to closegotoyuzo
unused files. [ruby-dev:27981] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-11-22* ext/openssl/extconf.rb: check for X509V3_EXT_nconf_nid.gotoyuzo
* ext/openssl/ossl_x509ext.c (MakeX509ExtFactory): should use OPENSSL_malloc to allocate X509V3_CTX. * ext/openssl/ossl_x509ext.c (ossl_x509extfactory_create_ext): use X509V3_EXT_nconf_nid to avoid SEGV (and to build extensions which values are placed in separate section). * test/openssl/test_x509ext.rb: new file. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9592 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-10-30* ext/openssl/ossl_cipher.c (ossl_cipher_update): input data mustgotoyuzo
not be empty. [ruby-talk:161220] * test/openssl/test_cipher.rb: add test for Cipher#update(""). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-18* ext/openssl/ossl_pkey.h, ossl_pkey_rsa.c, ossl_pkey_dsa.c:gotoyuzo
an instance variable "private" is added to OpenSSL::PKey class. this ivar is a flag that shows whether there is a private key in the instance. * ext/openssl/ossl_engine.c: (ossl_engine_load_privkey): set private key flag. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-12* test/openssl/test_pkcs7.rb (test_enveloped): skip this testgotoyuzo
to avoid a bug of PKCS7_enctypt() (only if ext/openssl is compiled with OpenSSL-0.9.7d or earlier versions). http://www.mail-archive.com/openssl-dev@openssl.org/msg17376.html git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-07* ext/openssl/ossl_asn1.c (asn1str_to_str): new function.gotoyuzo
* ext/openssl/ossl_pkcs7.c: new class OpenSSL::PKCS7::RecipientInfo. this class wraps PKCS7_RECIP_INFO struct. * ext/openssl/ossl_pkcs7.c: OpenSSL::PKCS7::Signer is renamed to OpenSSL::PKCS7::SignerInfo. ("Signer" remains as an alias of SignerInfo.) * test/openssl/test_pkcs7.rb: new file. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-22* add test for SHA224, SHA256, SHA384 and SHA512.gotoyuzo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-22* ext/openssl/ossl_ns_spki.c (ossl_spki_initialize): try to decodegotoyuzo
the argument as a string. * ext/openssl/ossl_ns_pki.c (ossl_spki_to_der): new method. * ext/openssl/ossl_x509store.c (ossl_x509store_initialize): should set @time to avoid warning. * ext/openssl/ossl_x509store.c (ossl_x509store_set_default_paths, X509_STORE_add_cert, X509_STORE_add_crl): should raise error if wrapped functions fails. * ext/openssl/ossl_ssl.c (ossl_sslctx_set_ciphers): fix error message. * ext/openssl/ossl_x509req.c (ossl_x509req_set_attributes): get rid of unused variable. * test/openssl/test_ns_spki.rb: add new file. * test/openssl/test_x509store.rb: add test for error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-05-28* test/openssl/test_x509store.rb: add test for expired CRLgotoyuzo
and refine some assertions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8534 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
2005-02-16* test/openssl/ssl_server.rb: get rid of race condition.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-02-14* ext/openssl/lib/openssl/ssl.rbgotoyuzo
(OpenSSL::SSL::SSLSocket#post_connection_check): new method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-21* ext/openssl/ossl_asn1.c (ossl_asn1_traverse, ossl_asn1_decode):gotoyuzo
use rb_str_new4 to avoid SEGV. fix [ruby-dev:25261] * test/openssl/test_asn1.rb: add tests for OpenSSL::ASN1. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7623 b2dd03c8-39d4-4d8f-98ff-823fe69b080e