Compatibiliy with older OpenSSL and GnuTLS
GnuTLS 3.4.x doesn't allow repeated `-p PORT` arguments.
OpenSSL 1.0.2 has different logs. For TLS 1.2 test cases, use a line that
is present in logs from OpenSSL 1.0.2g, 3.3.0 and presumably all versions
in between.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
diff --git a/tests/opt-testcases/sample.sh b/tests/opt-testcases/sample.sh
index 7a73cd6..c85cd5b 100644
--- a/tests/opt-testcases/sample.sh
+++ b/tests/opt-testcases/sample.sh
@@ -11,7 +11,7 @@
"$O_SRV -tls1_2" \
"$PROGRAMS_DIR/ssl_client1" \
0 \
- -c "New, TLSv1.2, Cipher is" \
+ -c "Protocol.*TLSv1.2" \
-S "ERROR" \
-C "error"
@@ -56,7 +56,6 @@
"$PROGRAMS_DIR/dtls_client" \
0 \
-s "Echo this" \
- -s "DONE" \
-c "Echo this" \
-c "[1-9][0-9]* bytes written" \
-c "[1-9][0-9]* bytes read" \
@@ -84,7 +83,7 @@
"$O_CLI -tls1_2" \
0 \
-s "Successful connection using: TLS-" \
- -c "New, TLSv1.2, Cipher is" \
+ -c "Protocol.*TLSv1.2" \
-S "error" \
-C "ERROR"
@@ -130,7 +129,7 @@
"$O_CLI -tls1_2" \
0 \
-s "Successful connection using: TLS-" \
- -c "New, TLSv1.2, Cipher is" \
+ -c "Protocol.*TLSv1.2" \
-S "error" \
-C "ERROR"
@@ -176,7 +175,7 @@
"$O_CLI -tls1_2" \
0 \
-s "Successful connection using: TLS-" \
- -c "New, TLSv1.2, Cipher is" \
+ -c "Protocol.*TLSv1.2" \
-S "error" \
-C "ERROR"
@@ -223,7 +222,7 @@
0 \
-s "[1-9][0-9]* bytes read" \
-s "[1-9][0-9]* bytes written" \
- -c "New, TLSv1.2, Cipher is" \
+ -c "Protocol.*TLSv1.2" \
-S "error" \
-C "ERROR"