ssl-opt.sh: if the server fails, do treat it as a test failure

This used to be the case a long time ago but was accidentally broken.

Fix <github:nogrep> #4103 for ssl-opt.sh.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
diff --git a/tests/ssl-opt.sh b/tests/ssl-opt.sh
index 72d0eb8..a970436 100755
--- a/tests/ssl-opt.sh
+++ b/tests/ssl-opt.sh
@@ -530,6 +530,8 @@
         # terminate the server (and the proxy)
         kill $SRV_PID
         wait $SRV_PID
+        SRV_RET=$?
+
         if [ -n "$PXY_CMD" ]; then
             kill $PXY_PID >/dev/null 2>&1
             wait $PXY_PID
@@ -563,8 +565,8 @@
     fi
 
     # check server exit code
-    if [ $? != 0 ]; then
-        fail "server fail"
+    if [ $SRV_RET != 0 ]; then
+        fail "Server exited with status $SRV_RET"
         return
     fi