ruby/ext/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
..
lib merges r31113 from trunk into ruby_1_9_2. 2011-05-28 23:32:46 +00:00
.cvsignore add extconf.h to .cvsignore. 2006-06-24 01:15:08 +00:00
extconf.rb merges r31346 from trunk into ruby_1_9_2. 2011-05-30 04:44:32 +00:00
openssl_missing.c merges r29190 from trunk into ruby_1_9_2. 2010-11-01 15:03:37 +00:00
openssl_missing.h merges r29190 from trunk into ruby_1_9_2. 2010-11-01 15:03:37 +00:00
ossl.c * ext/**/*.[ch]: removed trailing spaces. 2010-04-22 08:21:01 +00:00
ossl.h merges r32288 and r32292 from trunk into ruby_1_9_2. 2011-08-11 00:38:30 +00:00
ossl_asn1.c merges r29075 from trunk into ruby_1_9_2. 2010-10-02 11:20:01 +00:00
ossl_asn1.h * ext/**/*.[ch]: removed trailing spaces. 2010-04-22 08:04:13 +00:00
ossl_bio.c * ext/**/*.[ch]: removed trailing spaces. 2010-04-22 08:04:13 +00:00
ossl_bio.h * ext/openssl: all files are reviewed to simplify and avoid memory leak. 2003-09-17 09:05:02 +00:00
ossl_bn.c merges r29237 and r29238 from trunk into ruby_1_9_2. 2010-11-15 11:43:42 +00:00
ossl_bn.h * ext/openssl/ossl_bn.c: More documentation. 2007-04-03 07:02:44 +00:00
ossl_cipher.c * ext/**/*.[ch]: removed trailing spaces. 2010-04-22 08:21:01 +00:00
ossl_cipher.h * ext/openssl/ossl_pkcs5.c: New module. 2007-04-05 05:59:22 +00:00
ossl_config.c * ext/openssl/ossl_config.c: fix compilation failure with 2010-04-23 14:28:56 +00:00
ossl_config.h * ext/openssl/ossl.h: include openssl/conf.h and openssl/conf_api.h. 2003-09-08 10:31:38 +00:00
ossl_digest.c * ext/**/*.[ch]: removed trailing spaces. 2010-04-22 08:21:01 +00:00
ossl_digest.h * ext/openssl/ossl_pkcs5.c: New module. 2007-04-05 05:59:22 +00:00
ossl_engine.c * ext/openssl/ossl_config.c: OpenSSL 1.0.0 support. 2010-04-23 08:37:55 +00:00
ossl_engine.h * ext/openssl/ossl_engine.c: add a new module OpenSSL::Engine. 2003-10-02 08:47:11 +00:00
ossl_hmac.c * ext/**/*.[ch]: removed trailing spaces. 2010-04-22 08:21:01 +00:00
ossl_hmac.h * ext/openssl: imported. 2003-07-23 16:12:24 +00:00
ossl_ns_spki.c * ext/**/*.[ch]: removed trailing spaces. 2010-04-22 08:21:01 +00:00
ossl_ns_spki.h * ext/openssl: imported. 2003-07-23 16:12:24 +00:00
ossl_ocsp.c merges r31162 from trunk into ruby_1_9_2. 2011-05-29 22:48:25 +00:00
ossl_ocsp.h * ext/openssl: imported. 2003-07-23 16:12:24 +00:00
ossl_pkcs5.c * ext/readline/readline.c: use rb_f_notimplement for methods not 2009-04-18 14:10:06 +00:00
ossl_pkcs5.h * ext/dl/cfunc.c (rb_dlcfunc_call): adjust format. [ruby-dev:31222] 2007-07-15 13:24:39 +00:00
ossl_pkcs7.c * ext/**/*.[ch]: removed trailing spaces. 2010-04-22 08:21:01 +00:00
ossl_pkcs7.h * ext/openssl/ossl_pkcs5.c: New module. 2007-04-05 05:59:22 +00:00
ossl_pkcs12.c * ext/**/*.[ch]: removed trailing spaces. 2010-04-22 08:04:13 +00:00
ossl_pkcs12.h * ext/openssl/ossl_pkcs5.c: New module. 2007-04-05 05:59:22 +00:00
ossl_pkey.c * ext/**/*.[ch]: removed trailing spaces. 2010-04-22 08:21:01 +00:00
ossl_pkey.h * ext/openssl/ossl_bn.c: More documentation. 2007-04-03 07:02:44 +00:00
ossl_pkey_dh.c merges r31244 from trunk into ruby_1_9_2. 2011-05-29 22:49:10 +00:00
ossl_pkey_dsa.c merges r31244 from trunk into ruby_1_9_2. 2011-05-29 22:49:10 +00:00
ossl_pkey_ec.c merges r31244 from trunk into ruby_1_9_2. 2011-05-29 22:49:10 +00:00
ossl_pkey_rsa.c merges r31242 from trunk into ruby_1_9_2. 2011-05-29 22:49:02 +00:00
ossl_rand.c * ext/**/*.[ch]: removed trailing spaces. 2010-04-22 08:21:01 +00:00
ossl_rand.h * ext/openssl: imported. 2003-07-23 16:12:24 +00:00
ossl_ssl.c * backport r34482 from trunk 2012-02-09 17:20:52 +00:00
ossl_ssl.h * ext/**/*.[ch]: removed trailing spaces. 2010-04-22 08:04:13 +00:00
ossl_ssl_session.c merges 32211 from trunk into ruby_1_9_2. 2011-08-07 10:03:07 +00:00
ossl_version.h * ext/openssl/ossl_ssl.c: Switch stats hash key from string to symbol. 2008-04-20 22:32:06 +00:00
ossl_x509.c * ext/openssl/ossl.h: include openssl/conf.h and openssl/conf_api.h. 2003-09-08 10:31:38 +00:00
ossl_x509.h * ext/openssl/ossl_ssl.c (ossl_ssl_peer_cert_chain): add new method 2003-11-01 09:24:55 +00:00
ossl_x509attr.c * ext/**/*.[ch]: removed trailing spaces. 2010-04-22 08:04:13 +00:00
ossl_x509cert.c * ext/**/*.[ch]: removed trailing spaces. 2010-04-22 08:21:01 +00:00
ossl_x509crl.c * ext/**/*.[ch]: removed trailing spaces. 2010-04-22 08:21:01 +00:00
ossl_x509ext.c merges r30213 from trunk into ruby_1_9_2. 2010-12-23 12:45:44 +00:00
ossl_x509name.c merges r31164 from trunk into ruby_1_9_2. 2011-05-29 22:48:34 +00:00
ossl_x509req.c * ext/**/*.[ch]: removed trailing spaces. 2010-04-22 08:21:01 +00:00
ossl_x509revoked.c * ext/**/*.[ch]: removed trailing spaces. 2010-04-22 08:21:01 +00:00
ossl_x509store.c * ext/**/*.[ch]: removed trailing spaces. 2010-04-22 08:04:13 +00:00
ruby_missing.h * ext/openssl/extconf.rb: check for functions added in 1.9. 2007-04-03 07:21:53 +00:00