1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/test/openssl
emboss 85fd9aadd1 * backport r34482 from trunk
* ext/openssl/ossl_ssl.c: Add SSL constants and allow to unset SSL
  option to prevent BEAST attack. See [Bug #5353].

  In OpenSSL, OP_DONT_INSERT_EMPTY_FRAGMENTS is used to prevent
  TLS-CBC-IV vulunerability described at
  http://www.openssl.org/~bodo/tls-cbc.txt
  It's known issue of TLSv1/SSLv3 but it attracts lots of attention
  these days as BEAST attack. (CVE-2011-3389)

  Until now ossl sets OP_ALL at SSLContext allocation and call
  SSL_CTX_set_options at connection.  SSL_CTX_set_options updates the
  value by using |= so bits set by OP_ALL cannot be unset afterwards.
  This commit changes to call SSL_CTX_set_options only 1 time for each
  SSLContext. It sets the specified value if SSLContext#options= are
  called and sets OP_ALL if not.

  To help users to unset bits in OP_ALL, this commit also adds several
  constant to SSL such as
  OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS.  These constants were
  not exposed in Ruby because there's no way to unset bits in OP_ALL
  before.

  Following is an example to enable 0/n split for BEAST prevention.

    ctx.options = OP_ALL & ~OP_DONT_INSERT_EMPTY_FRAGMENTS

* test/openssl/test_ssl.rb: Test above option exists.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@34525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-09 17:20:52 +00:00
..
ssl_server.rb * {ext,lib,test}/**/*.rb: removed trailing spaces. 2009-03-06 03:56:38 +00:00
test_asn1.rb merges r29075 from trunk into ruby_1_9_2. 2010-10-02 11:20:01 +00:00
test_bn.rb merges r29407 from trunk into ruby_1_9_2. 2010-12-02 08:05:48 +00:00
test_buffering.rb merges r31113 from trunk into ruby_1_9_2. 2011-05-28 23:32:46 +00:00
test_cipher.rb * test: assert_raises has been deprecated since a long time ago. 2008-09-24 17:44:39 +00:00
test_config.rb * test/openssl/test_config.rb (test_freeze): skip on Windows because Config.new 2010-06-03 01:17:58 +00:00
test_digest.rb
test_ec.rb * test/openssl/test_ec.rb: added test_dsa_sign_asn1_FIPS186_3. dgst is 2010-05-06 10:13:46 +00:00
test_hmac.rb Add some more tests, revisited. 2010-02-23 17:36:12 +00:00
test_ns_spki.rb use require_relative. 2010-02-02 13:58:56 +00:00
test_pair.rb * test: use require_relative. 2009-09-12 17:00:51 +00:00
test_pkcs7.rb use require_relative. 2010-02-02 13:58:56 +00:00
test_pkey_dsa.rb merges r31678 from trunk into ruby_1_9_2. 2011-05-31 00:12:45 +00:00
test_pkey_rsa.rb merges r31640 from trunk into ruby_1_9_2. 2011-05-31 00:12:36 +00:00
test_ssl.rb * backport r34482 from trunk 2012-02-09 17:20:52 +00:00
test_x509cert.rb * test/openssl/{test_x509cert.rb,openssl,test_x509crl.rb, 2010-02-28 02:47:19 +00:00
test_x509crl.rb * test/openssl/{test_x509cert.rb,openssl,test_x509crl.rb, 2010-02-28 02:47:19 +00:00
test_x509ext.rb
test_x509name.rb
test_x509req.rb * test/openssl/{test_x509cert.rb,openssl,test_x509crl.rb, 2010-02-28 02:47:19 +00:00
test_x509store.rb * test: fixed wrong assertions. 2010-05-02 08:25:11 +00:00
utils.rb * {ext,lib,test}/**/*.rb: removed trailing spaces. 2009-03-06 03:56:38 +00:00