mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
83299b6794
commit
92a5ebb4b1
2 changed files with 6 additions and 9 deletions
|
@ -1,3 +1,8 @@
|
|||
Fri Mar 7 12:06:19 2014 Martin Bosslet <Martin.Bosslet@gmail.com>
|
||||
|
||||
* test/openssl/test_ssl.rb: Reuse TLS default options from
|
||||
OpenSSL::SSL::SSLContext::DEFAULT_PARAMS.
|
||||
|
||||
Thu Mar 6 15:15:24 2014 Zachary Scott <e@zzak.io>
|
||||
|
||||
* doc/syntax/assignment.rdoc: [DOC] Fix assignment directions
|
||||
|
|
|
@ -4,14 +4,6 @@ if defined?(OpenSSL)
|
|||
|
||||
class OpenSSL::TestSSL < OpenSSL::SSLTestCase
|
||||
|
||||
TLS_DEFAULT_OPS = -> {
|
||||
opts = OpenSSL::SSL::OP_ALL
|
||||
opts &= ~OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS if defined?(OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS)
|
||||
opts |= OpenSSL::SSL::OP_NO_COMPRESSION if defined?(OpenSSL::SSL::OP_NO_COMPRESSION)
|
||||
opts |= OpenSSL::SSL::OP_NO_SSLv2 if defined?(OpenSSL::SSL::OP_NO_SSLv2)
|
||||
opts |= OpenSSL::SSL::OP_NO_SSLv3 if defined?(OpenSSL::SSL::OP_NO_SSLv3)
|
||||
}.call
|
||||
|
||||
def test_ctx_setup
|
||||
ctx = OpenSSL::SSL::SSLContext.new
|
||||
assert_equal(ctx.setup, true)
|
||||
|
@ -298,7 +290,7 @@ class OpenSSL::TestSSL < OpenSSL::SSLTestCase
|
|||
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 }
|
||||
|
|
Loading…
Reference in a new issue