aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_pair.rb
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2017-01-16 00:54:17 +0900
committerKazuki Yamaguchi <k@rhe.jp>2017-01-17 14:00:20 +0900
commit2230677ecefe6acf9f88ff461540d965cccded83 (patch)
treebd0ae175c1f3f91cac6f3db1a74f376fabaf3f2a /test/test_pair.rb
parent8ba8d9ba3d990b1f59f20a1a72ad9d5e0fac4b15 (diff)
downloadruby-openssl-2230677ecefe6acf9f88ff461540d965cccded83.tar.gz
test: prepare test PKey instances on demand
Preparing for the introduction of the memory leak checker. Do not leave OpenSSL objects in constants that wouldn't be GCed in order to avoid false positives.
Diffstat (limited to 'test/test_pair.rb')
-rw-r--r--test/test_pair.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/test_pair.rb b/test/test_pair.rb
index ad389787..a462891d 100644
--- a/test/test_pair.rb
+++ b/test/test_pair.rb
@@ -11,7 +11,7 @@ module OpenSSL::SSLPairM
ctx = OpenSSL::SSL::SSLContext.new()
ctx.ciphers = "ADH"
ctx.security_level = 0
- ctx.tmp_dh_callback = proc { OpenSSL::TestUtils::TEST_KEY_DH1024 }
+ ctx.tmp_dh_callback = proc { OpenSSL::TestUtils::Fixtures.pkey_dh("dh1024") }
tcps = create_tcp_server(host, port)
ssls = OpenSSL::SSL::SSLServer.new(tcps, ctx)
return ssls
@@ -354,7 +354,7 @@ module OpenSSL::TestPairM
ctx2 = OpenSSL::SSL::SSLContext.new
ctx2.ciphers = "ADH"
ctx2.security_level = 0
- ctx2.tmp_dh_callback = proc { OpenSSL::TestUtils::TEST_KEY_DH1024 }
+ ctx2.tmp_dh_callback = proc { OpenSSL::TestUtils::Fixtures.pkey_dh("dh1024") }
sock1, sock2 = tcp_pair
@@ -404,7 +404,7 @@ module OpenSSL::TestPairM
ctx = OpenSSL::SSL::SSLContext.new()
ctx.ciphers = "ADH"
ctx.security_level = 0
- ctx.tmp_dh_callback = proc { OpenSSL::TestUtils::TEST_KEY_DH1024 }
+ ctx.tmp_dh_callback = proc { OpenSSL::TestUtils::Fixtures.pkey_dh("dh1024") }
sock1, sock2 = tcp_pair