aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_ssl.rb
diff options
context:
space:
mode:
authorZachary Scott <e@zzak.io>2015-11-13 12:05:41 +0900
committerZachary Scott <e@zzak.io>2015-11-13 12:05:41 +0900
commit81e1a3007e4720fa5adc42793ad434b07eebfcd6 (patch)
tree3a6f9d7d433df622b75c20503ebb0054c955ceee /test/test_ssl.rb
parentcc36e11b6621281e2f3e700a1b38327adcff2b71 (diff)
downloadruby-openssl-81e1a3007e4720fa5adc42793ad434b07eebfcd6.tar.gz
Skip anon cipher test if constant is unavailable, as with OpenSSL < 1.2
We define this constant on the ExtConfig module at compile time, based on the cipher lists of OpenSSL: https://www.openssl.org/docs/manmaster/apps/ciphers.html This is because the `start_server` test helper method defaults to use this cipher for anonymous connections. Currently: ```ruby def start_server(verify_mode, start_immediately, args = {}, &block) # ... use_anon_cipher = args.fetch(:use_anon_cipher, false) ctx.ciphers = "ADH-AES256-GCM-SHA384" if use_anon_cipher # ... end ``` This _should_ fix the build. Patch reviewed by @nobu /cc @hsbt
Diffstat (limited to 'test/test_ssl.rb')
-rw-r--r--test/test_ssl.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/test_ssl.rb b/test/test_ssl.rb
index 1350b664..cf96c213 100644
--- a/test/test_ssl.rb
+++ b/test/test_ssl.rb
@@ -415,7 +415,7 @@ class OpenSSL::TestSSL < OpenSSL::SSLTestCase
assert_raise(sslerr.new(msg)){ssl.post_connection_check("localhost.localdomain")}
}
}
- end
+ end if OpenSSL::ExtConfig::TLS_DH_anon_WITH_AES_256_GCM_SHA384
def test_post_connection_check
sslerr = OpenSSL::SSL::SSLError