diff --git a/tests/opt-testcases/sample.sh b/tests/opt-testcases/sample.sh index 7a73cd6b6..c85cd5b5d 100644 --- a/tests/opt-testcases/sample.sh +++ b/tests/opt-testcases/sample.sh @@ -11,7 +11,7 @@ run_test "Sample: ssl_client1, openssl server, TLS 1.2" \ "$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 @@ run_test "Sample: dtls_client, openssl server, DTLS 1.2" \ "$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 @@ run_test "Sample: ssl_server, openssl client, TLS 1.2" \ "$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 @@ run_test "Sample: ssl_fork_server, openssl client, TLS 1.2" \ "$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 @@ run_test "Sample: ssl_pthread_server, openssl client, TLS 1.2" \ "$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 @@ run_test "Sample: dtls_server, openssl client, DTLS 1.2" \ 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" diff --git a/tests/ssl-opt.sh b/tests/ssl-opt.sh index 0f8439570..497abe9dd 100755 --- a/tests/ssl-opt.sh +++ b/tests/ssl-opt.sh @@ -1447,7 +1447,11 @@ analyze_test_commands() { # GnuTLS, override its port specification. if [ "$THIS_SRV_PORT" != "$SRV_PORT" ]; then case "$SRV_CMD" in - "$G_SRV"*|"$G_NEXT_SRV"*) SRV_CMD="$SRV_CMD -p $THIS_SRV_PORT";; + "$G_SRV"*|"$G_NEXT_SRV"*) + SRV_CMD=$( + printf %s "$SRV_CMD " | + sed -e "s/ -p $SRV_PORT / -p $THIS_SRV_PORT /" + );; "$O_SRV"*|"$O_NEXT_SRV"*) SRV_CMD="$SRV_CMD -accept $THIS_SRV_PORT";; esac fi