* [PATCH] test_ssl: factor out server SSLContext creation
@ 2014-12-21 3:58 Eric Wong
0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2014-12-21 3:58 UTC (permalink / raw)
To: yahns-public
We'll be writing more SSL-related tests in the future...
---
test/test_ssl.rb | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/test/test_ssl.rb b/test/test_ssl.rb
index 2ed601c..13c14f0 100644
--- a/test/test_ssl.rb
+++ b/test/test_ssl.rb
@@ -53,13 +53,16 @@ AQjjxMXhwULlmuR/K+WwlaZPiLIBYalLAZQ7ZbOPeVkJ8ePao0eLAgEC
ssl
end
- def test_ssl_basic
- err, cfg, host, port = @err, Yahns::Config.new, @srv.addr[3], @srv.addr[1]
- host, port = @srv.addr[3], @srv.addr[1]
+ def srv_ctx
ctx = OpenSSL::SSL::SSLContext.new
ctx.ciphers = "ADH"
ctx.tmp_dh_callback = proc { TEST_KEY_DH1024 }
+ ctx
+ end
+ def test_ssl_basic
+ err, cfg, host, port = @err, Yahns::Config.new, @srv.addr[3], @srv.addr[1]
+ ctx = srv_ctx
pid = mkserver(cfg) do
cfg.instance_eval do
ru = lambda { |_| [ 200, {'Content-Length'=>'2'}, ['HI'] ] }
--
EW
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-12-21 3:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-21 3:58 [PATCH] test_ssl: factor out server SSLContext creation Eric Wong
Code repositories for project(s) associated with this public inbox
https://yhbt.net/yahns.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).