aboutsummaryrefslogtreecommitdiffstats
path: root/test/openssl/utils.rb
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2016-05-05 14:40:13 +0900
committerKazuki Yamaguchi <k@rhe.jp>2016-05-14 20:00:58 +0900
commitfe2ba322bfafdbf1a0a195b81f4c241e2841026a (patch)
tree5c8f59ee39180b6ef8a7ec919c4c09bd2dae1104 /test/openssl/utils.rb
parent748dcd1c2c8e5ebda3c71c88475d957c460353ab (diff)
downloadruby-fe2ba322bfafdbf1a0a195b81f4c241e2841026a.tar.gz
ext/openssl: add SSLContext#security_level, #security_level=
OpenSSL 1.1.0 introduced "security level" and these methods deal with it. This patch includes many test changes: setting the level to 0. The default security level is 1 and this prohibits aNULL ciphers.
Diffstat (limited to 'test/openssl/utils.rb')
-rw-r--r--test/openssl/utils.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/openssl/utils.rb b/test/openssl/utils.rb
index 02bafb6f21..a4340e785f 100644
--- a/test/openssl/utils.rb
+++ b/test/openssl/utils.rb
@@ -273,6 +273,7 @@ AQjjxMXhwULlmuR/K+WwlaZPiLIBYalLAZQ7ZbOPeVkJ8ePao0eLAgEC
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.extra_chain_cert = [ ca_cert ]
ctx.cert = @svr_cert