Skip to content

Commit dc5a643

Browse files
embossdbussink
authored andcommitted
* test/openssl/test_ssl.rb: Reuse TLS default options from
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
1 parent 5698d58 commit dc5a643

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
Fri Mar 7 12:06:19 2014 Martin Bosslet <[email protected]>
2+
3+
* test/openssl/test_ssl.rb: Reuse TLS default options from
4+
OpenSSL::SSL::SSLContext::DEFAULT_PARAMS.
5+
16
Thu Mar 6 10:33:31 2014 Martin Bosslet <[email protected]>
27

38
* lib/openssl/ssl.rb: Explicitly whitelist the default

test/openssl/test_ssl.rb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@
44

55
class OpenSSL::TestSSL < OpenSSL::SSLTestCase
66

7-
TLS_DEFAULT_OPS = defined?(OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS) ?
8-
OpenSSL::SSL::OP_ALL & ~OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS :
9-
OpenSSL::SSL::OP_ALL
10-
117
def test_ctx_setup
128
ctx = OpenSSL::SSL::SSLContext.new
139
assert_equal(ctx.setup, true)
@@ -276,7 +272,7 @@ def test_sslctx_set_params
276272
ctx = OpenSSL::SSL::SSLContext.new
277273
ctx.set_params
278274
assert_equal(OpenSSL::SSL::VERIFY_PEER, ctx.verify_mode)
279-
assert_equal(TLS_DEFAULT_OPS, ctx.options)
275+
assert_equal(OpenSSL::SSL::SSLContext::DEFAULT_PARAMS[:options], ctx.options)
280276
ciphers = ctx.ciphers
281277
ciphers_versions = ciphers.collect{|_, v, _, _| v }
282278
ciphers_names = ciphers.collect{|v, _, _, _| v }

0 commit comments

Comments
 (0)