Manuel Pégourié-Gonnard | eaadc50 | 2014-02-20 11:01:30 +0100 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | # Test various options that are not covered by compat.sh |
| 4 | # |
| 5 | # Here the goal is not to cover every ciphersuite/version, but |
| 6 | # rather specific options (max fragment length, truncated hmac, etc) |
| 7 | # or procedures (session resumption from cache or ticket, renego, etc). |
| 8 | # |
| 9 | # Assumes all options are compiled in. |
| 10 | |
Manuel Pégourié-Gonnard | fccd325 | 2014-02-25 17:14:15 +0100 | [diff] [blame^] | 11 | set -u |
| 12 | |
Manuel Pégourié-Gonnard | eaadc50 | 2014-02-20 11:01:30 +0100 | [diff] [blame] | 13 | PROGS_DIR='../programs/ssl' |
Manuel Pégourié-Gonnard | fccd325 | 2014-02-25 17:14:15 +0100 | [diff] [blame^] | 14 | P_SRV="$PROGS_DIR/ssl_server2 server_addr=0.0.0.0" # force IPv4 for OpenSSL |
Manuel Pégourié-Gonnard | c1da664 | 2014-02-25 14:18:30 +0100 | [diff] [blame] | 15 | P_CLI="$PROGS_DIR/ssl_client2" |
Manuel Pégourié-Gonnard | eaadc50 | 2014-02-20 11:01:30 +0100 | [diff] [blame] | 16 | |
Manuel Pégourié-Gonnard | fccd325 | 2014-02-25 17:14:15 +0100 | [diff] [blame^] | 17 | O_ARGS="-www -cert data_files/server5.crt -key data_files/server5.key" |
| 18 | O_CLI="echo 'GET / HTTP/1.0' | openssl s_client" |
| 19 | |
Manuel Pégourié-Gonnard | 33a752e | 2014-02-21 09:47:37 +0100 | [diff] [blame] | 20 | TESTS=0 |
| 21 | FAILS=0 |
| 22 | |
Manuel Pégourié-Gonnard | f8bdbb5 | 2014-02-21 09:20:14 +0100 | [diff] [blame] | 23 | # print_name <name> |
| 24 | print_name() { |
| 25 | echo -n "$1 " |
| 26 | LEN=`echo "$1" | wc -c` |
| 27 | LEN=`echo 72 - $LEN | bc` |
| 28 | for i in `seq 1 $LEN`; do echo -n '.'; done |
| 29 | echo -n ' ' |
Manuel Pégourié-Gonnard | 33a752e | 2014-02-21 09:47:37 +0100 | [diff] [blame] | 30 | |
| 31 | TESTS=`echo $TESTS + 1 | bc` |
Manuel Pégourié-Gonnard | f8bdbb5 | 2014-02-21 09:20:14 +0100 | [diff] [blame] | 32 | } |
| 33 | |
| 34 | # fail <message> |
| 35 | fail() { |
| 36 | echo "FAIL" |
| 37 | echo " $1" |
Manuel Pégourié-Gonnard | 33a752e | 2014-02-21 09:47:37 +0100 | [diff] [blame] | 38 | |
| 39 | cp srv_out srv-${TESTS}.log |
| 40 | cp cli_out cli-${TESTS}.log |
| 41 | echo " outputs saved to srv-${TESTS}.log and cli-${TESTS}.log" |
| 42 | |
| 43 | FAILS=`echo $FAILS + 1 | bc` |
Manuel Pégourié-Gonnard | f8bdbb5 | 2014-02-21 09:20:14 +0100 | [diff] [blame] | 44 | } |
| 45 | |
Manuel Pégourié-Gonnard | 677884d | 2014-02-25 16:42:31 +0100 | [diff] [blame] | 46 | # is_polar <cmd_line> |
| 47 | is_polar() { |
| 48 | echo "$1" | grep 'ssl_server2\|ssl_client2' > /dev/null |
| 49 | } |
| 50 | |
Manuel Pégourié-Gonnard | fccd325 | 2014-02-25 17:14:15 +0100 | [diff] [blame^] | 51 | # Usage: run_test name srv_cmd cli_cmd cli_exit [option [...]] |
Manuel Pégourié-Gonnard | eaadc50 | 2014-02-20 11:01:30 +0100 | [diff] [blame] | 52 | # Options: -s pattern pattern that must be present in server output |
| 53 | # -c pattern pattern that must be present in client output |
| 54 | # -S pattern pattern that must be absent in server output |
| 55 | # -C pattern pattern that must be absent in client output |
| 56 | run_test() { |
Manuel Pégourié-Gonnard | fccd325 | 2014-02-25 17:14:15 +0100 | [diff] [blame^] | 57 | NAME="$1" |
| 58 | SRV_CMD="$2" |
| 59 | CLI_CMD="$3" |
| 60 | CLI_EXPECT="$4" |
| 61 | shift 4 |
| 62 | |
| 63 | print_name "$NAME" |
Manuel Pégourié-Gonnard | eaadc50 | 2014-02-20 11:01:30 +0100 | [diff] [blame] | 64 | |
| 65 | # run the commands |
Manuel Pégourié-Gonnard | fccd325 | 2014-02-25 17:14:15 +0100 | [diff] [blame^] | 66 | $SHELL -c "$SRV_CMD" > srv_out 2>&1 & |
Manuel Pégourié-Gonnard | eaadc50 | 2014-02-20 11:01:30 +0100 | [diff] [blame] | 67 | SRV_PID=$! |
| 68 | sleep 1 |
Manuel Pégourié-Gonnard | fccd325 | 2014-02-25 17:14:15 +0100 | [diff] [blame^] | 69 | $SHELL -c "$CLI_CMD" > cli_out 2>&1 |
Manuel Pégourié-Gonnard | eaadc50 | 2014-02-20 11:01:30 +0100 | [diff] [blame] | 70 | CLI_EXIT=$? |
Manuel Pégourié-Gonnard | fccd325 | 2014-02-25 17:14:15 +0100 | [diff] [blame^] | 71 | if is_polar "$SRV_CMD"; then |
Manuel Pégourié-Gonnard | 677884d | 2014-02-25 16:42:31 +0100 | [diff] [blame] | 72 | echo SERVERQUIT | openssl s_client -no_ticket \ |
| 73 | -cert data_files/cli2.crt -key data_files/cli2.key \ |
| 74 | >/dev/null 2>&1 |
| 75 | else |
| 76 | kill $SRV_PID |
| 77 | fi |
Manuel Pégourié-Gonnard | eaadc50 | 2014-02-20 11:01:30 +0100 | [diff] [blame] | 78 | wait $SRV_PID |
Manuel Pégourié-Gonnard | 677884d | 2014-02-25 16:42:31 +0100 | [diff] [blame] | 79 | |
| 80 | # check if the client and server went at least to the handshake stage |
| 81 | # (usefull to avoid tests with only negative assertions and non-zero |
| 82 | # expected client exit to incorrectly succeed in case of catastrophic |
| 83 | # failure) |
Manuel Pégourié-Gonnard | fccd325 | 2014-02-25 17:14:15 +0100 | [diff] [blame^] | 84 | if is_polar "$SRV_CMD"; then |
Manuel Pégourié-Gonnard | 677884d | 2014-02-25 16:42:31 +0100 | [diff] [blame] | 85 | if grep "Performing the SSL/TLS handshake" srv_out >/dev/null; then :; |
| 86 | else |
| 87 | fail "server failed to start" |
| 88 | return |
| 89 | fi |
| 90 | fi |
Manuel Pégourié-Gonnard | fccd325 | 2014-02-25 17:14:15 +0100 | [diff] [blame^] | 91 | if is_polar "$CLI_CMD"; then |
Manuel Pégourié-Gonnard | 677884d | 2014-02-25 16:42:31 +0100 | [diff] [blame] | 92 | if grep "Performing the SSL/TLS handshake" cli_out >/dev/null; then :; |
| 93 | else |
| 94 | fail "client failed to start" |
| 95 | return |
| 96 | fi |
| 97 | fi |
| 98 | |
Manuel Pégourié-Gonnard | f8bdbb5 | 2014-02-21 09:20:14 +0100 | [diff] [blame] | 99 | # check server exit code |
| 100 | if [ $? != 0 ]; then |
| 101 | fail "server fail" |
| 102 | return |
| 103 | fi |
| 104 | |
Manuel Pégourié-Gonnard | eaadc50 | 2014-02-20 11:01:30 +0100 | [diff] [blame] | 105 | # check client exit code |
Manuel Pégourié-Gonnard | fccd325 | 2014-02-25 17:14:15 +0100 | [diff] [blame^] | 106 | if [ \( "$CLI_EXPECT" = 0 -a "$CLI_EXIT" != 0 \) -o \ |
| 107 | \( "$CLI_EXPECT" != 0 -a "$CLI_EXIT" = 0 \) ] |
Manuel Pégourié-Gonnard | 780d671 | 2014-02-20 17:19:59 +0100 | [diff] [blame] | 108 | then |
Manuel Pégourié-Gonnard | 8520dac | 2014-02-21 12:12:23 +0100 | [diff] [blame] | 109 | fail "bad client exit code" |
Manuel Pégourié-Gonnard | eaadc50 | 2014-02-20 11:01:30 +0100 | [diff] [blame] | 110 | return |
| 111 | fi |
Manuel Pégourié-Gonnard | eaadc50 | 2014-02-20 11:01:30 +0100 | [diff] [blame] | 112 | |
| 113 | # check options |
| 114 | while [ $# -gt 0 ] |
| 115 | do |
| 116 | case $1 in |
| 117 | "-s") |
| 118 | if grep "$2" srv_out >/dev/null; then :; else |
Manuel Pégourié-Gonnard | f8bdbb5 | 2014-02-21 09:20:14 +0100 | [diff] [blame] | 119 | fail "-s $2" |
Manuel Pégourié-Gonnard | eaadc50 | 2014-02-20 11:01:30 +0100 | [diff] [blame] | 120 | return |
| 121 | fi |
| 122 | ;; |
| 123 | |
| 124 | "-c") |
| 125 | if grep "$2" cli_out >/dev/null; then :; else |
Manuel Pégourié-Gonnard | f8bdbb5 | 2014-02-21 09:20:14 +0100 | [diff] [blame] | 126 | fail "-c $2" |
Manuel Pégourié-Gonnard | eaadc50 | 2014-02-20 11:01:30 +0100 | [diff] [blame] | 127 | return |
| 128 | fi |
| 129 | ;; |
| 130 | |
| 131 | "-S") |
| 132 | if grep "$2" srv_out >/dev/null; then |
Manuel Pégourié-Gonnard | f8bdbb5 | 2014-02-21 09:20:14 +0100 | [diff] [blame] | 133 | fail "-S $2" |
Manuel Pégourié-Gonnard | eaadc50 | 2014-02-20 11:01:30 +0100 | [diff] [blame] | 134 | return |
| 135 | fi |
| 136 | ;; |
| 137 | |
| 138 | "-C") |
| 139 | if grep "$2" cli_out >/dev/null; then |
Manuel Pégourié-Gonnard | f8bdbb5 | 2014-02-21 09:20:14 +0100 | [diff] [blame] | 140 | fail "-C $2" |
Manuel Pégourié-Gonnard | eaadc50 | 2014-02-20 11:01:30 +0100 | [diff] [blame] | 141 | return |
| 142 | fi |
| 143 | ;; |
| 144 | |
| 145 | *) |
| 146 | echo "Unkown test: $1" >&2 |
| 147 | exit 1 |
| 148 | esac |
| 149 | shift 2 |
| 150 | done |
| 151 | |
| 152 | # if we're here, everything is ok |
| 153 | echo "PASS" |
| 154 | rm -r srv_out cli_out |
| 155 | } |
| 156 | |
Manuel Pégourié-Gonnard | a9062e9 | 2014-02-25 16:21:22 +0100 | [diff] [blame] | 157 | cleanup() { |
| 158 | kill $SRV_PID |
| 159 | exit 1 |
| 160 | } |
| 161 | |
Manuel Pégourié-Gonnard | eaadc50 | 2014-02-20 11:01:30 +0100 | [diff] [blame] | 162 | killall -q openssl ssl_server ssl_server2 |
Manuel Pégourié-Gonnard | a9062e9 | 2014-02-25 16:21:22 +0100 | [diff] [blame] | 163 | trap cleanup INT TERM HUP |
Manuel Pégourié-Gonnard | eaadc50 | 2014-02-20 11:01:30 +0100 | [diff] [blame] | 164 | |
Manuel Pégourié-Gonnard | c1da664 | 2014-02-25 14:18:30 +0100 | [diff] [blame] | 165 | # Test for SSLv2 ClientHello |
| 166 | |
| 167 | run_test "SSLv2 ClientHello #0 (reference)" \ |
| 168 | "$P_SRV debug_level=3" \ |
| 169 | "echo GET / HTTP/1.0 | openssl s_client -no_ssl2" \ |
| 170 | 0 \ |
| 171 | -S "parse client hello v2" \ |
| 172 | -S "ssl_handshake returned" |
| 173 | |
| 174 | # Adding a SSL2-only suite makes OpenSSL client send SSLv2 ClientHello |
| 175 | run_test "SSLv2 ClientHello #1 (actual test)" \ |
| 176 | "$P_SRV debug_level=3" \ |
Manuel Pégourié-Gonnard | fccd325 | 2014-02-25 17:14:15 +0100 | [diff] [blame^] | 177 | "$O_CLI -cipher 'DES-CBC-MD5:ALL'" \ |
Manuel Pégourié-Gonnard | c1da664 | 2014-02-25 14:18:30 +0100 | [diff] [blame] | 178 | 0 \ |
| 179 | -s "parse client hello v2" \ |
| 180 | -S "ssl_handshake returned" |
| 181 | |
Manuel Pégourié-Gonnard | 780d671 | 2014-02-20 17:19:59 +0100 | [diff] [blame] | 182 | # Tests for Truncated HMAC extension |
| 183 | |
| 184 | run_test "Truncated HMAC #0" \ |
Manuel Pégourié-Gonnard | c1da664 | 2014-02-25 14:18:30 +0100 | [diff] [blame] | 185 | "$P_SRV debug_level=5" \ |
| 186 | "$P_CLI trunc_hmac=0 force_ciphersuite=TLS-RSA-WITH-AES-128-CBC-SHA" \ |
Manuel Pégourié-Gonnard | 780d671 | 2014-02-20 17:19:59 +0100 | [diff] [blame] | 187 | 0 \ |
| 188 | -s "dumping 'computed mac' (20 bytes)" |
| 189 | |
| 190 | run_test "Truncated HMAC #1" \ |
Manuel Pégourié-Gonnard | c1da664 | 2014-02-25 14:18:30 +0100 | [diff] [blame] | 191 | "$P_SRV debug_level=5" \ |
| 192 | "$P_CLI trunc_hmac=1 force_ciphersuite=TLS-RSA-WITH-AES-128-CBC-SHA" \ |
Manuel Pégourié-Gonnard | eaadc50 | 2014-02-20 11:01:30 +0100 | [diff] [blame] | 193 | 0 \ |
Manuel Pégourié-Gonnard | f7c5201 | 2014-02-20 11:43:46 +0100 | [diff] [blame] | 194 | -s "dumping 'computed mac' (10 bytes)" |
| 195 | |
Manuel Pégourié-Gonnard | 780d671 | 2014-02-20 17:19:59 +0100 | [diff] [blame] | 196 | # Tests for Session Tickets |
| 197 | |
Manuel Pégourié-Gonnard | fccd325 | 2014-02-25 17:14:15 +0100 | [diff] [blame^] | 198 | run_test "Session resume using tickets #1 (basic)" \ |
Manuel Pégourié-Gonnard | c1da664 | 2014-02-25 14:18:30 +0100 | [diff] [blame] | 199 | "$P_SRV debug_level=4 tickets=1" \ |
| 200 | "$P_CLI debug_level=4 tickets=1 reconnect=1" \ |
Manuel Pégourié-Gonnard | f7c5201 | 2014-02-20 11:43:46 +0100 | [diff] [blame] | 201 | 0 \ |
Manuel Pégourié-Gonnard | c55a5b7 | 2014-02-20 22:50:56 +0100 | [diff] [blame] | 202 | -c "client hello, adding session ticket extension" \ |
| 203 | -s "found session ticket extension" \ |
| 204 | -s "server hello, adding session ticket extension" \ |
| 205 | -c "found session_ticket extension" \ |
| 206 | -c "parse new session ticket" \ |
Manuel Pégourié-Gonnard | f7c5201 | 2014-02-20 11:43:46 +0100 | [diff] [blame] | 207 | -S "session successfully restored from cache" \ |
| 208 | -s "session successfully restored from ticket" \ |
| 209 | -s "a session has been resumed" \ |
| 210 | -c "a session has been resumed" |
| 211 | |
Manuel Pégourié-Gonnard | fccd325 | 2014-02-25 17:14:15 +0100 | [diff] [blame^] | 212 | run_test "Session resume using tickets #2 (cache disabled)" \ |
Manuel Pégourié-Gonnard | c1da664 | 2014-02-25 14:18:30 +0100 | [diff] [blame] | 213 | "$P_SRV debug_level=4 tickets=1 cache_max=0" \ |
| 214 | "$P_CLI debug_level=4 tickets=1 reconnect=1" \ |
Manuel Pégourié-Gonnard | dbe1ee1 | 2014-02-21 09:18:13 +0100 | [diff] [blame] | 215 | 0 \ |
| 216 | -c "client hello, adding session ticket extension" \ |
| 217 | -s "found session ticket extension" \ |
| 218 | -s "server hello, adding session ticket extension" \ |
| 219 | -c "found session_ticket extension" \ |
| 220 | -c "parse new session ticket" \ |
| 221 | -S "session successfully restored from cache" \ |
| 222 | -s "session successfully restored from ticket" \ |
| 223 | -s "a session has been resumed" \ |
| 224 | -c "a session has been resumed" |
| 225 | |
Manuel Pégourié-Gonnard | fccd325 | 2014-02-25 17:14:15 +0100 | [diff] [blame^] | 226 | run_test "Session resume using tickets #3 (timeout)" \ |
Manuel Pégourié-Gonnard | c1da664 | 2014-02-25 14:18:30 +0100 | [diff] [blame] | 227 | "$P_SRV debug_level=4 tickets=1 cache_max=0 ticket_timeout=1" \ |
| 228 | "$P_CLI debug_level=4 tickets=1 reconnect=1 reco_delay=2" \ |
Manuel Pégourié-Gonnard | dbe1ee1 | 2014-02-21 09:18:13 +0100 | [diff] [blame] | 229 | 0 \ |
| 230 | -c "client hello, adding session ticket extension" \ |
| 231 | -s "found session ticket extension" \ |
| 232 | -s "server hello, adding session ticket extension" \ |
| 233 | -c "found session_ticket extension" \ |
| 234 | -c "parse new session ticket" \ |
| 235 | -S "session successfully restored from cache" \ |
| 236 | -S "session successfully restored from ticket" \ |
| 237 | -S "a session has been resumed" \ |
| 238 | -C "a session has been resumed" |
| 239 | |
Manuel Pégourié-Gonnard | fccd325 | 2014-02-25 17:14:15 +0100 | [diff] [blame^] | 240 | run_test "Session resume using tickets #4 (no timeout)" \ |
Manuel Pégourié-Gonnard | c1da664 | 2014-02-25 14:18:30 +0100 | [diff] [blame] | 241 | "$P_SRV debug_level=4 tickets=1 cache_max=0 ticket_timeout=2" \ |
| 242 | "$P_CLI debug_level=4 tickets=1 reconnect=1 reco_delay=0" \ |
Manuel Pégourié-Gonnard | 4c88345 | 2014-02-20 21:32:41 +0100 | [diff] [blame] | 243 | 0 \ |
Manuel Pégourié-Gonnard | c55a5b7 | 2014-02-20 22:50:56 +0100 | [diff] [blame] | 244 | -c "client hello, adding session ticket extension" \ |
| 245 | -s "found session ticket extension" \ |
| 246 | -s "server hello, adding session ticket extension" \ |
| 247 | -c "found session_ticket extension" \ |
| 248 | -c "parse new session ticket" \ |
Manuel Pégourié-Gonnard | 4c88345 | 2014-02-20 21:32:41 +0100 | [diff] [blame] | 249 | -S "session successfully restored from cache" \ |
| 250 | -s "session successfully restored from ticket" \ |
| 251 | -s "a session has been resumed" \ |
| 252 | -c "a session has been resumed" |
| 253 | |
Manuel Pégourié-Gonnard | fccd325 | 2014-02-25 17:14:15 +0100 | [diff] [blame^] | 254 | run_test "Session resume using tickets #5 (openssl server)" \ |
| 255 | "openssl s_server $O_ARGS" \ |
| 256 | "$P_CLI debug_level=4 tickets=1 reconnect=1" \ |
| 257 | 0 \ |
| 258 | -c "client hello, adding session ticket extension" \ |
| 259 | -c "found session_ticket extension" \ |
| 260 | -c "parse new session ticket" \ |
| 261 | -c "a session has been resumed" |
| 262 | |
| 263 | run_test "Session resume using tickets #6 (openssl client)" \ |
| 264 | "$P_SRV debug_level=4 tickets=1" \ |
| 265 | "($O_CLI -sess_out sess; $O_CLI -sess_in sess; rm -f sess)" \ |
| 266 | 0 \ |
| 267 | -s "found session ticket extension" \ |
| 268 | -s "server hello, adding session ticket extension" \ |
| 269 | -S "session successfully restored from cache" \ |
| 270 | -s "session successfully restored from ticket" \ |
| 271 | -s "a session has been resumed" |
| 272 | |
Manuel Pégourié-Gonnard | c55a5b7 | 2014-02-20 22:50:56 +0100 | [diff] [blame] | 273 | # Tests for Session Resume based on session-ID and cache |
Manuel Pégourié-Gonnard | 780d671 | 2014-02-20 17:19:59 +0100 | [diff] [blame] | 274 | |
Manuel Pégourié-Gonnard | c55a5b7 | 2014-02-20 22:50:56 +0100 | [diff] [blame] | 275 | run_test "Session resume using cache #1 (tickets enabled on client)" \ |
Manuel Pégourié-Gonnard | c1da664 | 2014-02-25 14:18:30 +0100 | [diff] [blame] | 276 | "$P_SRV debug_level=4 tickets=0" \ |
| 277 | "$P_CLI debug_level=4 tickets=1 reconnect=1" \ |
Manuel Pégourié-Gonnard | f7c5201 | 2014-02-20 11:43:46 +0100 | [diff] [blame] | 278 | 0 \ |
Manuel Pégourié-Gonnard | c55a5b7 | 2014-02-20 22:50:56 +0100 | [diff] [blame] | 279 | -c "client hello, adding session ticket extension" \ |
| 280 | -s "found session ticket extension" \ |
| 281 | -S "server hello, adding session ticket extension" \ |
| 282 | -C "found session_ticket extension" \ |
| 283 | -C "parse new session ticket" \ |
Manuel Pégourié-Gonnard | f7c5201 | 2014-02-20 11:43:46 +0100 | [diff] [blame] | 284 | -s "session successfully restored from cache" \ |
| 285 | -S "session successfully restored from ticket" \ |
| 286 | -s "a session has been resumed" \ |
| 287 | -c "a session has been resumed" |
| 288 | |
Manuel Pégourié-Gonnard | c55a5b7 | 2014-02-20 22:50:56 +0100 | [diff] [blame] | 289 | run_test "Session resume using cache #2 (tickets enabled on server)" \ |
Manuel Pégourié-Gonnard | c1da664 | 2014-02-25 14:18:30 +0100 | [diff] [blame] | 290 | "$P_SRV debug_level=4 tickets=1" \ |
| 291 | "$P_CLI debug_level=4 tickets=0 reconnect=1" \ |
Manuel Pégourié-Gonnard | f7c5201 | 2014-02-20 11:43:46 +0100 | [diff] [blame] | 292 | 0 \ |
Manuel Pégourié-Gonnard | c55a5b7 | 2014-02-20 22:50:56 +0100 | [diff] [blame] | 293 | -C "client hello, adding session ticket extension" \ |
| 294 | -S "found session ticket extension" \ |
| 295 | -S "server hello, adding session ticket extension" \ |
| 296 | -C "found session_ticket extension" \ |
| 297 | -C "parse new session ticket" \ |
Manuel Pégourié-Gonnard | f7c5201 | 2014-02-20 11:43:46 +0100 | [diff] [blame] | 298 | -s "session successfully restored from cache" \ |
| 299 | -S "session successfully restored from ticket" \ |
| 300 | -s "a session has been resumed" \ |
| 301 | -c "a session has been resumed" |
Manuel Pégourié-Gonnard | de14378 | 2014-02-20 14:50:42 +0100 | [diff] [blame] | 302 | |
Manuel Pégourié-Gonnard | c55a5b7 | 2014-02-20 22:50:56 +0100 | [diff] [blame] | 303 | run_test "Session resume using cache #3 (cache_max=0)" \ |
Manuel Pégourié-Gonnard | c1da664 | 2014-02-25 14:18:30 +0100 | [diff] [blame] | 304 | "$P_SRV debug_level=4 tickets=0 cache_max=0" \ |
| 305 | "$P_CLI debug_level=4 tickets=0 reconnect=1" \ |
Manuel Pégourié-Gonnard | 4c88345 | 2014-02-20 21:32:41 +0100 | [diff] [blame] | 306 | 0 \ |
| 307 | -S "session successfully restored from cache" \ |
| 308 | -S "session successfully restored from ticket" \ |
Manuel Pégourié-Gonnard | c55a5b7 | 2014-02-20 22:50:56 +0100 | [diff] [blame] | 309 | -S "a session has been resumed" \ |
| 310 | -C "a session has been resumed" |
Manuel Pégourié-Gonnard | 4c88345 | 2014-02-20 21:32:41 +0100 | [diff] [blame] | 311 | |
Manuel Pégourié-Gonnard | c55a5b7 | 2014-02-20 22:50:56 +0100 | [diff] [blame] | 312 | run_test "Session resume using cache #4 (cache_max=1)" \ |
Manuel Pégourié-Gonnard | c1da664 | 2014-02-25 14:18:30 +0100 | [diff] [blame] | 313 | "$P_SRV debug_level=4 tickets=0 cache_max=1" \ |
| 314 | "$P_CLI debug_level=4 tickets=0 reconnect=1" \ |
Manuel Pégourié-Gonnard | c55a5b7 | 2014-02-20 22:50:56 +0100 | [diff] [blame] | 315 | 0 \ |
| 316 | -s "session successfully restored from cache" \ |
| 317 | -S "session successfully restored from ticket" \ |
| 318 | -s "a session has been resumed" \ |
| 319 | -c "a session has been resumed" |
| 320 | |
| 321 | run_test "Session resume using cache #5 (timemout > delay)" \ |
Manuel Pégourié-Gonnard | c1da664 | 2014-02-25 14:18:30 +0100 | [diff] [blame] | 322 | "$P_SRV debug_level=4 tickets=0 cache_timeout=1" \ |
| 323 | "$P_CLI debug_level=4 tickets=0 reconnect=1 reco_delay=0" \ |
Manuel Pégourié-Gonnard | c55a5b7 | 2014-02-20 22:50:56 +0100 | [diff] [blame] | 324 | 0 \ |
| 325 | -s "session successfully restored from cache" \ |
| 326 | -S "session successfully restored from ticket" \ |
| 327 | -s "a session has been resumed" \ |
| 328 | -c "a session has been resumed" |
| 329 | |
| 330 | run_test "Session resume using cache #6 (timeout < delay)" \ |
Manuel Pégourié-Gonnard | c1da664 | 2014-02-25 14:18:30 +0100 | [diff] [blame] | 331 | "$P_SRV debug_level=4 tickets=0 cache_timeout=1" \ |
| 332 | "$P_CLI debug_level=4 tickets=0 reconnect=1 reco_delay=2" \ |
Manuel Pégourié-Gonnard | c55a5b7 | 2014-02-20 22:50:56 +0100 | [diff] [blame] | 333 | 0 \ |
| 334 | -S "session successfully restored from cache" \ |
| 335 | -S "session successfully restored from ticket" \ |
| 336 | -S "a session has been resumed" \ |
| 337 | -C "a session has been resumed" |
| 338 | |
| 339 | run_test "Session resume using cache #7 (no timeout)" \ |
Manuel Pégourié-Gonnard | c1da664 | 2014-02-25 14:18:30 +0100 | [diff] [blame] | 340 | "$P_SRV debug_level=4 tickets=0 cache_timeout=0" \ |
| 341 | "$P_CLI debug_level=4 tickets=0 reconnect=1 reco_delay=2" \ |
Manuel Pégourié-Gonnard | 4c88345 | 2014-02-20 21:32:41 +0100 | [diff] [blame] | 342 | 0 \ |
| 343 | -s "session successfully restored from cache" \ |
| 344 | -S "session successfully restored from ticket" \ |
| 345 | -s "a session has been resumed" \ |
| 346 | -c "a session has been resumed" |
| 347 | |
Manuel Pégourié-Gonnard | 780d671 | 2014-02-20 17:19:59 +0100 | [diff] [blame] | 348 | # Tests for Max Fragment Length extension |
| 349 | |
Manuel Pégourié-Gonnard | de14378 | 2014-02-20 14:50:42 +0100 | [diff] [blame] | 350 | run_test "Max fragment length #1" \ |
Manuel Pégourié-Gonnard | c1da664 | 2014-02-25 14:18:30 +0100 | [diff] [blame] | 351 | "$P_SRV debug_level=4" \ |
| 352 | "$P_CLI debug_level=4" \ |
Manuel Pégourié-Gonnard | de14378 | 2014-02-20 14:50:42 +0100 | [diff] [blame] | 353 | 0 \ |
| 354 | -C "client hello, adding max_fragment_length extension" \ |
| 355 | -S "found max fragment length extension" \ |
| 356 | -S "server hello, max_fragment_length extension" \ |
| 357 | -C "found max_fragment_length extension" |
| 358 | |
| 359 | run_test "Max fragment length #2" \ |
Manuel Pégourié-Gonnard | c1da664 | 2014-02-25 14:18:30 +0100 | [diff] [blame] | 360 | "$P_SRV debug_level=4" \ |
| 361 | "$P_CLI debug_level=4 max_frag_len=4096" \ |
Manuel Pégourié-Gonnard | de14378 | 2014-02-20 14:50:42 +0100 | [diff] [blame] | 362 | 0 \ |
| 363 | -c "client hello, adding max_fragment_length extension" \ |
| 364 | -s "found max fragment length extension" \ |
| 365 | -s "server hello, max_fragment_length extension" \ |
| 366 | -c "found max_fragment_length extension" |
| 367 | |
| 368 | run_test "Max fragment length #3" \ |
Manuel Pégourié-Gonnard | c1da664 | 2014-02-25 14:18:30 +0100 | [diff] [blame] | 369 | "$P_SRV debug_level=4 max_frag_len=4096" \ |
| 370 | "$P_CLI debug_level=4" \ |
Manuel Pégourié-Gonnard | de14378 | 2014-02-20 14:50:42 +0100 | [diff] [blame] | 371 | 0 \ |
| 372 | -C "client hello, adding max_fragment_length extension" \ |
| 373 | -S "found max fragment length extension" \ |
| 374 | -S "server hello, max_fragment_length extension" \ |
| 375 | -C "found max_fragment_length extension" |
Manuel Pégourié-Gonnard | 780d671 | 2014-02-20 17:19:59 +0100 | [diff] [blame] | 376 | |
| 377 | # Tests for renegotiation |
| 378 | |
| 379 | run_test "Renegotiation #0 (none)" \ |
Manuel Pégourié-Gonnard | c1da664 | 2014-02-25 14:18:30 +0100 | [diff] [blame] | 380 | "$P_SRV debug_level=4" \ |
| 381 | "$P_CLI debug_level=4" \ |
Manuel Pégourié-Gonnard | 780d671 | 2014-02-20 17:19:59 +0100 | [diff] [blame] | 382 | 0 \ |
| 383 | -C "client hello, adding renegotiation extension" \ |
| 384 | -s "received TLS_EMPTY_RENEGOTIATION_INFO" \ |
| 385 | -S "found renegotiation extension" \ |
| 386 | -s "server hello, secure renegotiation extension" \ |
| 387 | -c "found renegotiation extension" \ |
| 388 | -C "renegotiate" \ |
| 389 | -S "renegotiate" \ |
| 390 | -S "write hello request" |
| 391 | |
| 392 | run_test "Renegotiation #1 (enabled, client-initiated)" \ |
Manuel Pégourié-Gonnard | c1da664 | 2014-02-25 14:18:30 +0100 | [diff] [blame] | 393 | "$P_SRV debug_level=4" \ |
| 394 | "$P_CLI debug_level=4 renegotiate=1" \ |
Manuel Pégourié-Gonnard | 780d671 | 2014-02-20 17:19:59 +0100 | [diff] [blame] | 395 | 0 \ |
| 396 | -c "client hello, adding renegotiation extension" \ |
| 397 | -s "received TLS_EMPTY_RENEGOTIATION_INFO" \ |
| 398 | -s "found renegotiation extension" \ |
| 399 | -s "server hello, secure renegotiation extension" \ |
| 400 | -c "found renegotiation extension" \ |
| 401 | -c "renegotiate" \ |
| 402 | -s "renegotiate" \ |
| 403 | -S "write hello request" |
| 404 | |
| 405 | run_test "Renegotiation #2 (enabled, server-initiated)" \ |
Manuel Pégourié-Gonnard | c1da664 | 2014-02-25 14:18:30 +0100 | [diff] [blame] | 406 | "$P_SRV debug_level=4 renegotiate=1" \ |
| 407 | "$P_CLI debug_level=4" \ |
Manuel Pégourié-Gonnard | 780d671 | 2014-02-20 17:19:59 +0100 | [diff] [blame] | 408 | 0 \ |
| 409 | -c "client hello, adding renegotiation extension" \ |
| 410 | -s "received TLS_EMPTY_RENEGOTIATION_INFO" \ |
| 411 | -s "found renegotiation extension" \ |
| 412 | -s "server hello, secure renegotiation extension" \ |
| 413 | -c "found renegotiation extension" \ |
| 414 | -c "renegotiate" \ |
| 415 | -s "renegotiate" \ |
| 416 | -s "write hello request" |
| 417 | |
| 418 | run_test "Renegotiation #3 (enabled, double)" \ |
Manuel Pégourié-Gonnard | c1da664 | 2014-02-25 14:18:30 +0100 | [diff] [blame] | 419 | "$P_SRV debug_level=4 renegotiate=1" \ |
| 420 | "$P_CLI debug_level=4 renegotiate=1" \ |
Manuel Pégourié-Gonnard | 780d671 | 2014-02-20 17:19:59 +0100 | [diff] [blame] | 421 | 0 \ |
| 422 | -c "client hello, adding renegotiation extension" \ |
| 423 | -s "received TLS_EMPTY_RENEGOTIATION_INFO" \ |
| 424 | -s "found renegotiation extension" \ |
| 425 | -s "server hello, secure renegotiation extension" \ |
| 426 | -c "found renegotiation extension" \ |
| 427 | -c "renegotiate" \ |
| 428 | -s "renegotiate" \ |
| 429 | -s "write hello request" |
| 430 | |
| 431 | run_test "Renegotiation #4 (client-initiated, server-rejected)" \ |
Manuel Pégourié-Gonnard | c1da664 | 2014-02-25 14:18:30 +0100 | [diff] [blame] | 432 | "$P_SRV debug_level=4 renegotiation=0" \ |
| 433 | "$P_CLI debug_level=4 renegotiate=1" \ |
Manuel Pégourié-Gonnard | 780d671 | 2014-02-20 17:19:59 +0100 | [diff] [blame] | 434 | 1 \ |
| 435 | -c "client hello, adding renegotiation extension" \ |
| 436 | -s "received TLS_EMPTY_RENEGOTIATION_INFO" \ |
| 437 | -S "found renegotiation extension" \ |
| 438 | -s "server hello, secure renegotiation extension" \ |
| 439 | -c "found renegotiation extension" \ |
| 440 | -c "renegotiate" \ |
| 441 | -S "renegotiate" \ |
| 442 | -S "write hello request" |
| 443 | |
| 444 | run_test "Renegotiation #5 (server-initiated, client-rejected)" \ |
Manuel Pégourié-Gonnard | c1da664 | 2014-02-25 14:18:30 +0100 | [diff] [blame] | 445 | "$P_SRV debug_level=4 renegotiate=1" \ |
| 446 | "$P_CLI debug_level=4 renegotiation=0" \ |
Manuel Pégourié-Gonnard | 780d671 | 2014-02-20 17:19:59 +0100 | [diff] [blame] | 447 | 0 \ |
| 448 | -C "client hello, adding renegotiation extension" \ |
| 449 | -s "received TLS_EMPTY_RENEGOTIATION_INFO" \ |
| 450 | -S "found renegotiation extension" \ |
| 451 | -s "server hello, secure renegotiation extension" \ |
| 452 | -c "found renegotiation extension" \ |
| 453 | -C "renegotiate" \ |
| 454 | -S "renegotiate" \ |
| 455 | -s "write hello request" \ |
| 456 | -s "SSL - An unexpected message was received from our peer" \ |
| 457 | -s "failed" |
Manuel Pégourié-Gonnard | 33a752e | 2014-02-21 09:47:37 +0100 | [diff] [blame] | 458 | |
Manuel Pégourié-Gonnard | 8520dac | 2014-02-21 12:12:23 +0100 | [diff] [blame] | 459 | # Tests for auth_mode |
| 460 | |
| 461 | run_test "Authentication #1 (server badcert, client required)" \ |
Manuel Pégourié-Gonnard | c1da664 | 2014-02-25 14:18:30 +0100 | [diff] [blame] | 462 | "$P_SRV crt_file=data_files/server5-badsign.crt \ |
Manuel Pégourié-Gonnard | 8520dac | 2014-02-21 12:12:23 +0100 | [diff] [blame] | 463 | key_file=data_files/server5.key" \ |
Manuel Pégourié-Gonnard | c1da664 | 2014-02-25 14:18:30 +0100 | [diff] [blame] | 464 | "$P_CLI debug_level=2 auth_mode=required" \ |
Manuel Pégourié-Gonnard | 8520dac | 2014-02-21 12:12:23 +0100 | [diff] [blame] | 465 | 1 \ |
| 466 | -c "x509_verify_cert() returned" \ |
| 467 | -c "! self-signed or not signed by a trusted CA" \ |
| 468 | -c "! ssl_handshake returned" \ |
| 469 | -c "X509 - Certificate verification failed" |
| 470 | |
| 471 | run_test "Authentication #2 (server badcert, client optional)" \ |
Manuel Pégourié-Gonnard | c1da664 | 2014-02-25 14:18:30 +0100 | [diff] [blame] | 472 | "$P_SRV crt_file=data_files/server5-badsign.crt \ |
Manuel Pégourié-Gonnard | 8520dac | 2014-02-21 12:12:23 +0100 | [diff] [blame] | 473 | key_file=data_files/server5.key" \ |
Manuel Pégourié-Gonnard | c1da664 | 2014-02-25 14:18:30 +0100 | [diff] [blame] | 474 | "$P_CLI debug_level=2 auth_mode=optional" \ |
Manuel Pégourié-Gonnard | 8520dac | 2014-02-21 12:12:23 +0100 | [diff] [blame] | 475 | 0 \ |
| 476 | -c "x509_verify_cert() returned" \ |
| 477 | -c "! self-signed or not signed by a trusted CA" \ |
| 478 | -C "! ssl_handshake returned" \ |
| 479 | -C "X509 - Certificate verification failed" |
| 480 | |
| 481 | run_test "Authentication #3 (server badcert, client none)" \ |
Manuel Pégourié-Gonnard | c1da664 | 2014-02-25 14:18:30 +0100 | [diff] [blame] | 482 | "$P_SRV crt_file=data_files/server5-badsign.crt \ |
Manuel Pégourié-Gonnard | 8520dac | 2014-02-21 12:12:23 +0100 | [diff] [blame] | 483 | key_file=data_files/server5.key" \ |
Manuel Pégourié-Gonnard | c1da664 | 2014-02-25 14:18:30 +0100 | [diff] [blame] | 484 | "$P_CLI debug_level=2 auth_mode=none" \ |
Manuel Pégourié-Gonnard | 8520dac | 2014-02-21 12:12:23 +0100 | [diff] [blame] | 485 | 0 \ |
| 486 | -C "x509_verify_cert() returned" \ |
| 487 | -C "! self-signed or not signed by a trusted CA" \ |
| 488 | -C "! ssl_handshake returned" \ |
| 489 | -C "X509 - Certificate verification failed" |
| 490 | |
| 491 | run_test "Authentication #4 (client badcert, server required)" \ |
Manuel Pégourié-Gonnard | c1da664 | 2014-02-25 14:18:30 +0100 | [diff] [blame] | 492 | "$P_SRV debug_level=4 auth_mode=required" \ |
| 493 | "$P_CLI debug_level=4 crt_file=data_files/server5-badsign.crt \ |
Manuel Pégourié-Gonnard | 8520dac | 2014-02-21 12:12:23 +0100 | [diff] [blame] | 494 | key_file=data_files/server5.key" \ |
| 495 | 1 \ |
| 496 | -S "skip write certificate request" \ |
| 497 | -C "skip parse certificate request" \ |
| 498 | -c "got a certificate request" \ |
| 499 | -C "skip write certificate" \ |
| 500 | -C "skip write certificate verify" \ |
| 501 | -S "skip parse certificate verify" \ |
| 502 | -s "x509_verify_cert() returned" \ |
| 503 | -S "! self-signed or not signed by a trusted CA" \ |
| 504 | -s "! ssl_handshake returned" \ |
| 505 | -c "! ssl_handshake returned" \ |
| 506 | -s "X509 - Certificate verification failed" |
| 507 | |
| 508 | run_test "Authentication #5 (client badcert, server optional)" \ |
Manuel Pégourié-Gonnard | c1da664 | 2014-02-25 14:18:30 +0100 | [diff] [blame] | 509 | "$P_SRV debug_level=4 auth_mode=optional" \ |
| 510 | "$P_CLI debug_level=4 crt_file=data_files/server5-badsign.crt \ |
Manuel Pégourié-Gonnard | 8520dac | 2014-02-21 12:12:23 +0100 | [diff] [blame] | 511 | key_file=data_files/server5.key" \ |
| 512 | 0 \ |
| 513 | -S "skip write certificate request" \ |
| 514 | -C "skip parse certificate request" \ |
| 515 | -c "got a certificate request" \ |
| 516 | -C "skip write certificate" \ |
| 517 | -C "skip write certificate verify" \ |
| 518 | -S "skip parse certificate verify" \ |
| 519 | -s "x509_verify_cert() returned" \ |
| 520 | -s "! self-signed or not signed by a trusted CA" \ |
| 521 | -S "! ssl_handshake returned" \ |
| 522 | -C "! ssl_handshake returned" \ |
| 523 | -S "X509 - Certificate verification failed" |
| 524 | |
| 525 | run_test "Authentication #6 (client badcert, server none)" \ |
Manuel Pégourié-Gonnard | c1da664 | 2014-02-25 14:18:30 +0100 | [diff] [blame] | 526 | "$P_SRV debug_level=4 auth_mode=none" \ |
| 527 | "$P_CLI debug_level=4 crt_file=data_files/server5-badsign.crt \ |
Manuel Pégourié-Gonnard | 8520dac | 2014-02-21 12:12:23 +0100 | [diff] [blame] | 528 | key_file=data_files/server5.key" \ |
| 529 | 0 \ |
| 530 | -s "skip write certificate request" \ |
| 531 | -C "skip parse certificate request" \ |
| 532 | -c "got no certificate request" \ |
| 533 | -c "skip write certificate" \ |
| 534 | -c "skip write certificate verify" \ |
| 535 | -s "skip parse certificate verify" \ |
| 536 | -S "x509_verify_cert() returned" \ |
| 537 | -S "! self-signed or not signed by a trusted CA" \ |
| 538 | -S "! ssl_handshake returned" \ |
| 539 | -C "! ssl_handshake returned" \ |
| 540 | -S "X509 - Certificate verification failed" |
| 541 | |
Manuel Pégourié-Gonnard | 96ea2f2 | 2014-02-25 12:26:29 +0100 | [diff] [blame] | 542 | # tests for SNI |
| 543 | |
| 544 | run_test "SNI #0 (no SNI callback)" \ |
Manuel Pégourié-Gonnard | c1da664 | 2014-02-25 14:18:30 +0100 | [diff] [blame] | 545 | "$P_SRV debug_level=4 server_addr=127.0.0.1 \ |
Manuel Pégourié-Gonnard | 96ea2f2 | 2014-02-25 12:26:29 +0100 | [diff] [blame] | 546 | crt_file=data_files/server5.crt key_file=data_files/server5.key" \ |
Manuel Pégourié-Gonnard | c1da664 | 2014-02-25 14:18:30 +0100 | [diff] [blame] | 547 | "$P_CLI debug_level=0 server_addr=127.0.0.1 \ |
Manuel Pégourié-Gonnard | 96ea2f2 | 2014-02-25 12:26:29 +0100 | [diff] [blame] | 548 | server_name=localhost" \ |
| 549 | 0 \ |
| 550 | -S "parse ServerName extension" \ |
| 551 | -c "issuer name *: C=NL, O=PolarSSL, CN=Polarssl Test EC CA" \ |
| 552 | -c "subject name *: C=NL, O=PolarSSL, CN=localhost" |
| 553 | |
| 554 | run_test "SNI #1 (matching cert 1)" \ |
Manuel Pégourié-Gonnard | c1da664 | 2014-02-25 14:18:30 +0100 | [diff] [blame] | 555 | "$P_SRV debug_level=4 server_addr=127.0.0.1 \ |
Manuel Pégourié-Gonnard | 96ea2f2 | 2014-02-25 12:26:29 +0100 | [diff] [blame] | 556 | crt_file=data_files/server5.crt key_file=data_files/server5.key \ |
| 557 | sni='localhost,data_files/server2.crt,data_files/server2.key,PolarSSL Server 1,data_files/server1.crt,data_files/server1.key'" \ |
Manuel Pégourié-Gonnard | c1da664 | 2014-02-25 14:18:30 +0100 | [diff] [blame] | 558 | "$P_CLI debug_level=0 server_addr=127.0.0.1 \ |
Manuel Pégourié-Gonnard | 96ea2f2 | 2014-02-25 12:26:29 +0100 | [diff] [blame] | 559 | server_name=localhost" \ |
| 560 | 0 \ |
| 561 | -s "parse ServerName extension" \ |
| 562 | -c "issuer name *: C=NL, O=PolarSSL, CN=PolarSSL Test CA" \ |
| 563 | -c "subject name *: C=NL, O=PolarSSL, CN=localhost" |
| 564 | |
| 565 | run_test "SNI #2 (matching cert 2)" \ |
Manuel Pégourié-Gonnard | c1da664 | 2014-02-25 14:18:30 +0100 | [diff] [blame] | 566 | "$P_SRV debug_level=4 server_addr=127.0.0.1 \ |
Manuel Pégourié-Gonnard | 96ea2f2 | 2014-02-25 12:26:29 +0100 | [diff] [blame] | 567 | crt_file=data_files/server5.crt key_file=data_files/server5.key \ |
| 568 | sni='localhost,data_files/server2.crt,data_files/server2.key,PolarSSL Server 1,data_files/server1.crt,data_files/server1.key'" \ |
Manuel Pégourié-Gonnard | c1da664 | 2014-02-25 14:18:30 +0100 | [diff] [blame] | 569 | "$P_CLI debug_level=0 server_addr=127.0.0.1 \ |
Manuel Pégourié-Gonnard | 96ea2f2 | 2014-02-25 12:26:29 +0100 | [diff] [blame] | 570 | server_name='PolarSSL Server 1'" \ |
| 571 | 0 \ |
| 572 | -s "parse ServerName extension" \ |
| 573 | -c "issuer name *: C=NL, O=PolarSSL, CN=PolarSSL Test CA" \ |
| 574 | -c "subject name *: C=NL, O=PolarSSL, CN=PolarSSL Server 1" |
| 575 | |
| 576 | run_test "SNI #3 (no matching cert)" \ |
Manuel Pégourié-Gonnard | c1da664 | 2014-02-25 14:18:30 +0100 | [diff] [blame] | 577 | "$P_SRV debug_level=4 server_addr=127.0.0.1 \ |
Manuel Pégourié-Gonnard | 96ea2f2 | 2014-02-25 12:26:29 +0100 | [diff] [blame] | 578 | crt_file=data_files/server5.crt key_file=data_files/server5.key \ |
| 579 | sni='localhost,data_files/server2.crt,data_files/server2.key,PolarSSL Server 1,data_files/server1.crt,data_files/server1.key'" \ |
Manuel Pégourié-Gonnard | c1da664 | 2014-02-25 14:18:30 +0100 | [diff] [blame] | 580 | "$P_CLI debug_level=0 server_addr=127.0.0.1 \ |
Manuel Pégourié-Gonnard | 96ea2f2 | 2014-02-25 12:26:29 +0100 | [diff] [blame] | 581 | server_name='PolarSSL Server 2'" \ |
| 582 | 1 \ |
| 583 | -s "parse ServerName extension" \ |
| 584 | -s "ssl_sni_wrapper() returned" \ |
| 585 | -s "ssl_handshake returned" \ |
| 586 | -c "ssl_handshake returned" \ |
| 587 | -c "SSL - A fatal alert message was received from our peer" |
| 588 | |
Manuel Pégourié-Gonnard | 8520dac | 2014-02-21 12:12:23 +0100 | [diff] [blame] | 589 | # Final report |
| 590 | |
Manuel Pégourié-Gonnard | 33a752e | 2014-02-21 09:47:37 +0100 | [diff] [blame] | 591 | echo "------------------------------------------------------------------------" |
| 592 | |
| 593 | if [ $FAILS = 0 ]; then |
| 594 | echo -n "PASSED" |
| 595 | else |
| 596 | echo -n "FAILED" |
| 597 | fi |
| 598 | PASSES=`echo $TESTS - $FAILS | bc` |
Manuel Pégourié-Gonnard | 4145b89 | 2014-02-24 13:20:14 +0100 | [diff] [blame] | 599 | echo " ($PASSES / $TESTS tests)" |
Manuel Pégourié-Gonnard | 33a752e | 2014-02-21 09:47:37 +0100 | [diff] [blame] | 600 | |
| 601 | exit $FAILS |