Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions tests/gold_tests/tls/test-nc-s_client.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.


# See https://github.com/apache/trafficserver/issues/9880
ignore_unexpecte_eof=''
if openssl s_client --help 2>&1 | grep -q ignore_unexpected_eof
then
ignore_unexpected_eof='-ignore_unexpected_eof'
fi
nc -l -p $1 -c 'echo -e "This is a reply"' -o test.out &
echo "This is a test" | openssl s_client -servername bar.com -connect localhost:$2 -ign_eof ${ignore_unexpected_eof}
nc -l -p "$1" -c 'echo -e "This is a reply"' -o test.out &
echo "This is a test" | openssl s_client -servername bar.com -connect "localhost:$2" -ign_eof ${ignore_unexpected_eof} "${@:3}"
2 changes: 1 addition & 1 deletion tests/gold_tests/tls/tls_client_versions.test.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
ts.Disk.records_config.update({
'proxy.config.ssl.server.cert.path': '{0}'.format(ts.Variables.SSLDir),
'proxy.config.ssl.server.private_key.path': '{0}'.format(ts.Variables.SSLDir),
'proxy.config.ssl.server.cipher_suite': 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:AES128-GCM-SHA256:AES256-GCM-SHA384:ECDHE-RSA-RC4-SHA:ECDHE-RSA-AES128-SHA:ECDHE-RSA-AES256-SHA:RC4-SHA:RC4-MD5:AES128-SHA:AES256-SHA:DES-CBC3-SHA!SRP:!DSS:!PSK:!aNULL:!eNULL:!SSLv2',
'proxy.config.ssl.server.cipher_suite': 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:AES128-GCM-SHA256:AES256-GCM-SHA384:ECDHE-RSA-RC4-SHA:ECDHE-RSA-AES128-SHA:ECDHE-RSA-AES256-SHA:RC4-SHA:RC4-MD5:AES128-SHA:AES256-SHA:DES-CBC3-SHA!SRP:!DSS:!PSK:!aNULL:!eNULL:!SSLv2:@SECLEVEL=0',
'proxy.config.ssl.client.CA.cert.path': '{0}'.format(ts.Variables.SSLDir),
'proxy.config.url_remap.pristine_host_hdr': 1,
'proxy.config.ssl.TLSv1': 0,
Expand Down
5 changes: 4 additions & 1 deletion tests/gold_tests/tls/tls_forward_nonhttp.test.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@

tr = Test.AddTestRun("forward-non-http")
tr.Setup.Copy("test-nc-s_client.sh")
tr.Processes.Default.Command = "sh test-nc-s_client.sh {1} {0}".format(ts.Variables.ssl_port, ts.Variables.s_client_port)
cmd_args = ["sh", "test-nc-s_client.sh", str(ts.Variables.s_client_port), str(ts.Variables.ssl_port)]
if Condition.HasOpenSSLVersion("3.0.0"):
cmd_args += ["-ignore_unexpected_eof"]
tr.Processes.Default.Command = " ".join(cmd_args)
tr.ReturnCode = 0
tr.Processes.Default.StartBefore(nameserver)
tr.Processes.Default.StartBefore(Test.Processes.ts)
Expand Down
4 changes: 2 additions & 2 deletions tests/gold_tests/tls/tls_verify_override.test.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
'map http://bar.com/overridesignature https://bar.com:{0} @plugin=conf_remap.so @pparam=proxy.config.ssl.client.verify.server.properties=SIGNATURE @plugin=conf_remap.so @pparam=proxy.config.ssl.client.verify.server.policy=ENFORCED'.format(
server_foo.Variables.SSL_Port))
ts.Disk.remap_config.AddLine(
'map http://bar.com/overridenone https://bar.com:{0} @plugin=conf_remap.so @pparam=proxy.config.ssl.client.verify.server.properties=NONE @plugin=conf_remap.so @pparam=proxy.config.ssl.client.verify.server.policy=ENFORCED"'.format(
'map http://bar.com/overridenone https://bar.com:{0} @plugin=conf_remap.so @pparam=proxy.config.ssl.client.verify.server.properties=NONE @plugin=conf_remap.so @pparam=proxy.config.ssl.client.verify.server.policy=ENFORCED'.format(
server_foo.Variables.SSL_Port))
ts.Disk.remap_config.AddLine(
'map http://bar.com/overrideenforced https://bar.com:{0} @plugin=conf_remap.so @pparam=proxy.config.ssl.client.verify.server.policy=ENFORCED'.format(
Expand Down Expand Up @@ -252,7 +252,7 @@

# checks on random.com should fail with message only
ts.Disk.diags_log.Content = Testers.ContainsExpression(
r"WARNING: Core server certificate verification failed for \(random.com\). Action=Continue Error=self signed certificate server=random.com\(127.0.0.1\) depth=0",
r"WARNING: Core server certificate verification failed for \(random.com\). Action=Continue Error=self.signed certificate server=random.com\(127.0.0.1\) depth=0",
"Warning for self signed certificate")
# permissive failure for bar.com
ts.Disk.diags_log.Content += Testers.ContainsExpression(
Expand Down
2 changes: 1 addition & 1 deletion tests/gold_tests/tls/tls_verify_override_base.test.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@

# checks on random.com should fail with message only
ts.Disk.diags_log.Content = Testers.ContainsExpression(
r"WARNING: Core server certificate verification failed for \(random.com\). Action=Continue Error=self signed certificate server=127.0.0.1\(127.0.0.1\) depth=0",
r"WARNING: Core server certificate verification failed for \(random.com\). Action=Continue Error=self.signed certificate server=127.0.0.1\(127.0.0.1\) depth=0",
"Warning for self signed certificate")
# permissive failure for bar.com
ts.Disk.diags_log.Content += Testers.ContainsExpression(
Expand Down