aboutsummaryrefslogtreecommitdiffstats
path: root/test/utils.rb
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2016-09-06 07:36:17 +0900
committerKazuki Yamaguchi <k@rhe.jp>2016-09-07 09:11:19 +0900
commitc9d1659f4027049af451acce8f3240b5fe74cfd8 (patch)
treedf5c9734f7a5a377e4fd31772dd94628f5349d16 /test/utils.rb
parentad2e76adfb2a609cd53c4904b5a810e2b7f332ca (diff)
downloadruby-openssl-c9d1659f4027049af451acce8f3240b5fe74cfd8.tar.gz
test/utils: remove use_anon_cipher option from SSLTestCase#start_servertopic/ssl-test-cleanup
Only TestSSL#test_post_connect_check_with_anon_ciphers uses it. The option just sets 'ADH-AES256-GCM-SHA384' as the available cipher suites and set the security level of the context to 0 - both can be achieved using ctx_proc option of start_server. And we don't have to stick to the cipher suite 'ADH-AES256-GCM-SHA384' so specify 'aNULL' instead. This allows removing the cipher suite existence check.
Diffstat (limited to 'test/utils.rb')
-rw-r--r--test/utils.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/test/utils.rb b/test/utils.rb
index 45ea8766..6f3a3c6d 100644
--- a/test/utils.rb
+++ b/test/utils.rb
@@ -279,14 +279,12 @@ AQjjxMXhwULlmuR/K+WwlaZPiLIBYalLAZQ7ZbOPeVkJ8ePao0eLAgEC
def start_server(verify_mode: OpenSSL::SSL::VERIFY_NONE, start_immediately: true,
ctx_proc: nil, server_proc: method(:readwrite_loop),
- use_anon_cipher: false, ignore_listener_error: false, &block)
+ ignore_listener_error: false, &block)
IO.pipe {|stop_pipe_r, stop_pipe_w|
store = OpenSSL::X509::Store.new
store.add_cert(@ca_cert)
store.purpose = OpenSSL::X509::PURPOSE_SSL_CLIENT
ctx = OpenSSL::SSL::SSLContext.new
- ctx.ciphers = "ADH-AES256-GCM-SHA384" if use_anon_cipher
- ctx.security_level = 0 if use_anon_cipher
ctx.cert_store = store
ctx.cert = @svr_cert
ctx.key = @svr_key