You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by sh...@apache.org on 2018/11/07 14:07:43 UTC

[trafficserver] branch master updated: Make autests friendlier with openssl 1.1.1

This is an automated email from the ASF dual-hosted git repository.

shinrich pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new 63f24f4  Make autests friendlier with openssl 1.1.1
63f24f4 is described below

commit 63f24f438bfac80357024e8e75caa8c12b5ce551
Author: Susan Hinrichs <sh...@oath.com>
AuthorDate: Mon Nov 5 17:04:54 2018 +0000

    Make autests friendlier with openssl 1.1.1
---
 tests/gold_tests/headers/forwarded.gold      | 6 +++---
 tests/gold_tests/headers/via.gold            | 6 +++---
 tests/gold_tests/redirect/gold/redirect.gold | 1 +
 tests/gold_tests/tls/ssl-post.c              | 2 ++
 tests/gold_tests/tls/tls.test.py             | 5 +++--
 tests/gold_tests/tls/tls_ticket.test.py      | 4 ++--
 6 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/tests/gold_tests/headers/forwarded.gold b/tests/gold_tests/headers/forwarded.gold
index 45451d6..939825a 100644
--- a/tests/gold_tests/headers/forwarded.gold
+++ b/tests/gold_tests/headers/forwarded.gold
@@ -31,11 +31,11 @@ for=127.0.0.1;by=unknown;by=Poxy_Proxy;__BY_EQUAL_UUID__;by=127.0.0.1;proto=http
 for=0.6.6.6
 for=_argh, for=127.0.0.1;by=unknown;by=Poxy_Proxy;__BY_EQUAL_UUID__;by=127.0.0.1;proto=http;host=www.no-oride.com;connection=http;connection=http/1.0;connection=http/1.0-tcp-ipv4
 -
-for=127.0.0.1;by=unknown;by=Poxy_Proxy;__BY_EQUAL_UUID__;by=127.0.0.1;proto=https;host=www.no-oride.com;connection=https;connection=https/2;connection=http/1.1-h2-tls/1.2-tcp-ipv4
+for=127.0.0.1;by=unknown;by=Poxy_Proxy;__BY_EQUAL_UUID__;by=127.0.0.1;proto=https;host=www.no-oride.com;connection=https;connection=https/2;connection=http/1.1-h2-tls/1.{}-tcp-ipv4
 -
-for=127.0.0.1;by=unknown;by=Poxy_Proxy;__BY_EQUAL_UUID__;by=127.0.0.1;proto=https;host=www.no-oride.com;connection=https;connection=https/1.1;connection=http/1.1-tls/1.2-tcp-ipv4
+for=127.0.0.1;by=unknown;by=Poxy_Proxy;__BY_EQUAL_UUID__;by=127.0.0.1;proto=https;host=www.no-oride.com;connection=https;connection=https/1.1;connection=http/1.1-tls/1.{}-tcp-ipv4
 -
 for="[::1]";by=unknown;by=Poxy_Proxy;__BY_EQUAL_UUID__;by="[::1]";proto=http;host=www.no-oride.com;connection=http;connection=http/1.1;connection=http/1.1-tcp-ipv6
 -
-for="[::1]";by=unknown;by=Poxy_Proxy;__BY_EQUAL_UUID__;by="[::1]";proto=https;host=www.no-oride.com;connection=https;connection=https/1.1;connection=http/1.1-tls/1.2-tcp-ipv6
+for="[::1]";by=unknown;by=Poxy_Proxy;__BY_EQUAL_UUID__;by="[::1]";proto=https;host=www.no-oride.com;connection=https;connection=https/1.1;connection=http/1.1-tls/1.{}-tcp-ipv6
 -
diff --git a/tests/gold_tests/headers/via.gold b/tests/gold_tests/headers/via.gold
index 598ef37..01165cf 100644
--- a/tests/gold_tests/headers/via.gold
+++ b/tests/gold_tests/headers/via.gold
@@ -1,6 +1,6 @@
 Via: http/1.1 = http/1.1 tcp ipv4
 Via: http/1.0 = http/1.0 tcp ipv4
-Via: https/2 = http/1.1 h2 tls/1.2 tcp ipv4
-Via: https/1.1 = http/1.1 tls/1.2 tcp ipv4
+Via: https/2 = http/1.1 h2 tls/1.{} tcp ipv4
+Via: https/1.1 = http/1.1 tls/1.{} tcp ipv4
 Via: http/1.1 = http/1.1 tcp ipv6
-Via: https/1.1 = http/1.1 tls/1.2 tcp ipv6
+Via: https/1.1 = http/1.1 tls/1.{} tcp ipv6
diff --git a/tests/gold_tests/redirect/gold/redirect.gold b/tests/gold_tests/redirect/gold/redirect.gold
index d6616ba..9500bf9 100644
--- a/tests/gold_tests/redirect/gold/redirect.gold
+++ b/tests/gold_tests/redirect/gold/redirect.gold
@@ -1,4 +1,5 @@
 HTTP/1.1 204 No Content
+``
 Age: ``
 Connection: keep-alive
 
diff --git a/tests/gold_tests/tls/ssl-post.c b/tests/gold_tests/tls/ssl-post.c
index cc8ea13..00dc3a0 100644
--- a/tests/gold_tests/tls/ssl-post.c
+++ b/tests/gold_tests/tls/ssl-post.c
@@ -89,6 +89,7 @@ spawn_same_session_send(void *arg)
 
   SSL_CTX *client_ctx = SSL_CTX_new(SSLv23_client_method());
   SSL *ssl            = SSL_new(client_ctx);
+  SSL_set_max_proto_version(ssl, TLS1_2_VERSION);
   SSL_set_session(ssl, tinfo->session);
 
   SSL_set_fd(ssl, sfd);
@@ -282,6 +283,7 @@ main(int argc, char *argv[])
 
   SSL_CTX *client_ctx = SSL_CTX_new(SSLv23_client_method());
   SSL *ssl            = SSL_new(client_ctx);
+  SSL_set_max_proto_version(ssl, TLS1_2_VERSION);
 
   SSL_set_fd(ssl, sfd);
   int ret         = SSL_connect(ssl);
diff --git a/tests/gold_tests/tls/tls.test.py b/tests/gold_tests/tls/tls.test.py
index f1ef8cd..f23232a 100644
--- a/tests/gold_tests/tls/tls.test.py
+++ b/tests/gold_tests/tls/tls.test.py
@@ -40,10 +40,11 @@ reHost = "www.example.com"
 testName = ""
 
 header_count = 378
+#header_count = 78
 
 header_string = "POST /post HTTP/1.1\r\nHost: www.example.com\r\nContent-Length:1000\r\n"
 
-for i in range(0, 378):
+for i in range(0, header_count):
     header_string = "{1}header{0}:{0}\r\n".format(i, header_string)
 header_string = "{0}\r\n".format(header_string)
 
@@ -78,7 +79,7 @@ ts.Disk.records_config.update({
 })
 
 tr = Test.AddTestRun("Run-Test")
-tr.Command = './ssl-post 127.0.0.1 40 378 4443'
+tr.Command = './ssl-post 127.0.0.1 40 {0} 4443'.format(header_count)
 tr.ReturnCode = 0
 # time delay as proxy.config.http.wait_for_cache could be broken
 tr.Processes.Default.StartBefore(server)
diff --git a/tests/gold_tests/tls/tls_ticket.test.py b/tests/gold_tests/tls/tls_ticket.test.py
index 9a2b43b..c9953cc 100644
--- a/tests/gold_tests/tls/tls_ticket.test.py
+++ b/tests/gold_tests/tls/tls_ticket.test.py
@@ -82,7 +82,7 @@ ts2.Disk.records_config.update({
 
 tr = Test.AddTestRun("Create ticket")
 tr.Setup.Copy('file.ticket')
-tr.Command = 'echo -e "GET / HTTP/1.0\r\n" | openssl s_client -connect 127.0.0.1:{0} -sess_out ticket.out'.format(ts.Variables.ssl_port)
+tr.Command = 'echo -e "GET / HTTP/1.0\r\n" | openssl s_client -tls1_2 -connect 127.0.0.1:{0} -sess_out ticket.out'.format(ts.Variables.ssl_port)
 tr.ReturnCode = 0
 # time delay as proxy.config.http.wait_for_cache could be broken
 tr.Processes.Default.StartBefore(server)
@@ -120,7 +120,7 @@ def checkSession(ev) :
 
 tr2 = Test.AddTestRun("Test ticket")
 tr2.Setup.Copy('file.ticket')
-tr2.Command = 'echo -e "GET / HTTP/1.0\r\n" | openssl s_client -connect 127.0.0.1:{0} -sess_in ticket.out'.format(ts2.Variables.ssl_port)
+tr2.Command = 'echo -e "GET / HTTP/1.0\r\n" | openssl s_client -tls1_2 -connect 127.0.0.1:{0} -sess_in ticket.out'.format(ts2.Variables.ssl_port)
 tr2.Processes.Default.StartBefore(Test.Processes.ts2, ready=When.PortOpen(ts2.Variables.ssl_port))
 tr2.ReturnCode = 0
 path2 = tr2.Processes.Default.Streams.stdout.AbsPath