We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b4d2ecd commit dcf4bf3Copy full SHA for dcf4bf3
src/test/ruby/ssl/test_context.rb
@@ -30,6 +30,23 @@ def test_context_new
30
end
31
32
33
+ def test_setup
34
+ ctx = OpenSSL::SSL::SSLContext.new
35
+ assert_equal(ctx.setup, true)
36
+ assert_equal(ctx.setup, nil)
37
+
38
+ m = OpenSSL::SSL::SSLContext::METHODS.first
39
40
+ ex = assert_raise(ArgumentError) do
41
+ OpenSSL::SSL::SSLContext.new("#{m}\0")
42
+ end
43
+ # ex.message =~ /null/
44
45
+ OpenSSL::SSL::SSLContext.new("\u{ff33 ff33 ff2c}")
46
47
+ assert ex.message =~ /\u{ff33 ff33 ff2c}/
48
49
50
def test_verify_mode
51
context = OpenSSL::SSL::SSLContext.new
52
assert_nil context.verify_mode
0 commit comments