Skip to content

Commit

Permalink
* test/openssl/test_ssl.rb: Reuse TLS default options from
Browse files Browse the repository at this point in the history
  OpenSSL::SSL::SSLContext::DEFAULT_PARAMS.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45280 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Conflicts:
	ChangeLog
	test/openssl/test_ssl.rb
  • Loading branch information
emboss authored and dbussink committed Mar 7, 2014
1 parent 5698d58 commit dc5a643
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
Fri Mar 7 12:06:19 2014 Martin Bosslet <[email protected]>

* test/openssl/test_ssl.rb: Reuse TLS default options from
OpenSSL::SSL::SSLContext::DEFAULT_PARAMS.

Thu Mar 6 10:33:31 2014 Martin Bosslet <[email protected]>

* lib/openssl/ssl.rb: Explicitly whitelist the default
Expand Down
6 changes: 1 addition & 5 deletions test/openssl/test_ssl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@

class OpenSSL::TestSSL < OpenSSL::SSLTestCase

TLS_DEFAULT_OPS = defined?(OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS) ?
OpenSSL::SSL::OP_ALL & ~OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS :
OpenSSL::SSL::OP_ALL

def test_ctx_setup
ctx = OpenSSL::SSL::SSLContext.new
assert_equal(ctx.setup, true)
Expand Down Expand Up @@ -276,7 +272,7 @@ def test_sslctx_set_params
ctx = OpenSSL::SSL::SSLContext.new
ctx.set_params
assert_equal(OpenSSL::SSL::VERIFY_PEER, ctx.verify_mode)
assert_equal(TLS_DEFAULT_OPS, ctx.options)
assert_equal(OpenSSL::SSL::SSLContext::DEFAULT_PARAMS[:options], ctx.options)
ciphers = ctx.ciphers
ciphers_versions = ciphers.collect{|_, v, _, _| v }
ciphers_names = ciphers.collect{|v, _, _, _| v }
Expand Down

0 comments on commit dc5a643

Please sign in to comment.