diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-12-07 14:24:40 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-12-07 14:24:40 +0000 |
commit | 7fd6016e1c3928d588e9bd7d787171f054674bd3 (patch) | |
tree | f5a5c0914348eaf3864da691750f7b2195fd9f9e /test/openssl/test_pair.rb | |
parent | 9865ee2c46b7cc9244c3d78b786ee14a7a302e53 (diff) |
Set DH Parameter for SSLContext to clean warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/openssl/test_pair.rb')
-rw-r--r-- | test/openssl/test_pair.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/openssl/test_pair.rb b/test/openssl/test_pair.rb index 0f54e5b893..2d761385c5 100644 --- a/test/openssl/test_pair.rb +++ b/test/openssl/test_pair.rb @@ -10,11 +10,13 @@ require 'socket' require_relative '../ruby/ut_eof' module SSLPair + DHParam = OpenSSL::PKey::DH.new(128) def server host = "127.0.0.1" port = 0 ctx = OpenSSL::SSL::SSLContext.new() ctx.ciphers = "ADH" + ctx.tmp_dh_callback = proc { DHParam } tcps = TCPServer.new(host, port) ssls = OpenSSL::SSL::SSLServer.new(tcps, ctx) return ssls @@ -194,6 +196,7 @@ class OpenSSL::TestPair < Test::Unit::TestCase port = 0 ctx = OpenSSL::SSL::SSLContext.new() ctx.ciphers = "ADH" + ctx.tmp_dh_callback = proc { DHParam } serv = TCPServer.new(host, port) port = serv.connect_address.ip_port |