ruby/ext/openssl
emboss 0234bcfd19 * 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_3@34524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-09 17:04:41 +00:00
..
lib * backport r33066 from trunk. 2011-08-25 00:52:10 +00:00
extconf.rb * ext/openssl/extconf.rb 2011-06-26 01:32:03 +00:00
openssl_missing.c * ext/openssl/extconf.rb 2011-06-26 01:32:03 +00:00
openssl_missing.h * ext/openssl/extconf.rb 2011-06-26 01:32:03 +00:00
ossl.c * backport r32537 from trunk. 2011-07-14 05:46:00 +00:00
ossl.h * ext/openssl/ossl.h: include openssl/e_os2.h before checking the 2011-07-08 06:03:17 +00:00
ossl_asn1.c * remove trailing spaces. 2012-02-09 03:25:07 +00:00
ossl_asn1.h * ext/**/*.[ch]: removed trailing spaces. 2010-04-22 08:04:13 +00:00
ossl_bio.c * backport r32579, r32581, r32587 by akr and r32588 by kazu. 2011-07-20 22:11:56 +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 * ext/openssl/ossl.c: surpress warning: shorten-64-to-32. 2011-03-24 07:29:21 +00:00
ossl_bn.h * ext/openssl/ossl_bn.c: More documentation. 2007-04-03 07:02:44 +00:00
ossl_cipher.c * remove trailing spaces. 2012-02-09 03:25:07 +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 (parse_config): remove dead declaration. 2010-09-29 03:37:44 +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 * remove trailing spaces. 2012-02-09 03:25:07 +00:00
ossl_digest.h * ext/openssl/ossl_pkcs5.c: New module. 2007-04-05 05:59:22 +00:00
ossl_engine.c * remove trailing spaces. 2012-02-09 03:25:07 +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 * backport r32609 from trunk. 2011-07-22 04:17:39 +00:00
ossl_hmac.h * ext/openssl: imported. 2003-07-23 16:12:24 +00:00
ossl_ns_spki.c * ext/openssl/ossl.c: surpress warning: shorten-64-to-32. 2011-03-24 07:29:21 +00:00
ossl_ns_spki.h * ext/openssl: imported. 2003-07-23 16:12:24 +00:00
ossl_ocsp.c * ext/openssl/ossl.c: surpress warning: shorten-64-to-32. 2011-03-24 07:29:21 +00:00
ossl_ocsp.h * ext/openssl: imported. 2003-07-23 16:12:24 +00:00
ossl_pkcs5.c * ext/openssl/ossl.c: surpress warning: shorten-64-to-32. 2011-03-24 07:29:21 +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 * sytle fixes. 2011-06-30 20:20:32 +00:00
ossl_pkcs7.h * ext/openssl/ossl_pkcs5.c: New module. 2007-04-05 05:59:22 +00:00
ossl_pkcs12.c * ext/openssl/ossl.h: Introduced OSSL_BIO_reset macro for PEM/DER 2011-06-22 08:41:08 +00:00
ossl_pkcs12.h * ext/openssl/ossl_pkcs5.c: New module. 2007-04-05 05:59:22 +00:00
ossl_pkey.c * ext/openssl/ossl_asn1.c 2011-09-23 05:17:47 +00:00
ossl_pkey.h Sat May 14 05:08:32 2011 Martin Bosslet <Martin.Bosslet@googlemail.com> 2011-05-13 20:10:27 +00:00
ossl_pkey_dh.c * sytle fixes. 2011-06-30 20:20:32 +00:00
ossl_pkey_dsa.c * sytle fixes. 2011-06-30 20:20:32 +00:00
ossl_pkey_ec.c * ext/openssl/ossl.h: Introduced OSSL_BIO_reset macro for PEM/DER 2011-06-22 08:41:08 +00:00
ossl_pkey_rsa.c * ext/openssl/ossl.h: Introduced OSSL_BIO_reset macro for PEM/DER 2011-06-22 08:41:08 +00:00
ossl_rand.c * ext/openssl/ossl.c: surpress warning: shorten-64-to-32. 2011-03-24 07:29:21 +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:04:41 +00:00
ossl_ssl.h * ext/openssl/ossl_ssl.h: parenthesize macro arguments. 2011-03-10 13:28:58 +00:00
ossl_ssl_session.c * ext/openssl/ossl_ssl_session.c (ossl_ssl_session_set_time): Check 2011-06-23 10:36:09 +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/openssl/ossl_x509attr.c: parenthesize macro arguments. 2011-03-13 09:11:45 +00:00
ossl_x509cert.c * backport r32992 from trunk. 2011-08-16 21:46:32 +00:00
ossl_x509crl.c * ext/openssl/ossl.h: Introduced OSSL_BIO_reset macro for PEM/DER 2011-06-22 08:41:08 +00:00
ossl_x509ext.c * ext/openssl/ossl.c: surpress warning: shorten-64-to-32. 2011-03-24 07:29:21 +00:00
ossl_x509name.c * remove trailing spaces. 2012-02-09 03:25:07 +00:00
ossl_x509req.c * ext/openssl/ossl.h: Introduced OSSL_BIO_reset macro for PEM/DER 2011-06-22 08:41:08 +00:00
ossl_x509revoked.c * ext/openssl/ossl_x509revoked.c: parenthesize macro arguments. 2011-03-19 03:30:59 +00:00
ossl_x509store.c * ext/openssl/ossl_rand.c (ossl_rand_egd_bytes): use NUM2INT because 2011-03-24 04:49:18 +00:00
ruby_missing.h * ext/openssl/ruby_missing.h: parenthesize macro arguments. 2011-03-22 11:09:43 +00:00