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 | # |
Manuel Pégourié-Gonnard | 0eb6cab | 2014-07-23 20:17:47 +0200 | [diff] [blame] | 9 | # Assumes a build with default options. |
Manuel Pégourié-Gonnard | eaadc50 | 2014-02-20 11:01:30 +0100 | [diff] [blame] | 10 | |
Manuel Pégourié-Gonnard | fccd325 | 2014-02-25 17:14:15 +0100 | [diff] [blame] | 11 | set -u |
| 12 | |
Manuel Pégourié-Gonnard | f7a2690 | 2014-02-27 12:25:54 +0100 | [diff] [blame] | 13 | # default values, can be overriden by the environment |
| 14 | : ${P_SRV:=../programs/ssl/ssl_server2} |
| 15 | : ${P_CLI:=../programs/ssl/ssl_client2} |
Manuel Pégourié-Gonnard | be9eb87 | 2014-09-05 17:45:19 +0200 | [diff] [blame] | 16 | : ${P_PXY:=../programs/test/udp_proxy} |
Manuel Pégourié-Gonnard | 74faf3c | 2014-03-13 18:47:44 +0100 | [diff] [blame] | 17 | : ${OPENSSL_CMD:=openssl} # OPENSSL would conflict with the build system |
Manuel Pégourié-Gonnard | baa7f07 | 2014-08-20 20:15:53 +0200 | [diff] [blame] | 18 | : ${GNUTLS_CLI:=gnutls-cli} |
| 19 | : ${GNUTLS_SERV:=gnutls-serv} |
Manuel Pégourié-Gonnard | eaadc50 | 2014-02-20 11:01:30 +0100 | [diff] [blame] | 20 | |
Manuel Pégourié-Gonnard | a775617 | 2014-08-31 18:37:01 +0200 | [diff] [blame] | 21 | O_SRV="$OPENSSL_CMD s_server -cert data_files/server5.crt -key data_files/server5.key" |
Manuel Pégourié-Gonnard | 74faf3c | 2014-03-13 18:47:44 +0100 | [diff] [blame] | 22 | O_CLI="echo 'GET / HTTP/1.0' | $OPENSSL_CMD s_client" |
Manuel Pégourié-Gonnard | baa7f07 | 2014-08-20 20:15:53 +0200 | [diff] [blame] | 23 | G_SRV="$GNUTLS_SERV --x509certfile data_files/server5.crt --x509keyfile data_files/server5.key" |
| 24 | G_CLI="$GNUTLS_CLI" |
Manuel Pégourié-Gonnard | fccd325 | 2014-02-25 17:14:15 +0100 | [diff] [blame] | 25 | |
Manuel Pégourié-Gonnard | 33a752e | 2014-02-21 09:47:37 +0100 | [diff] [blame] | 26 | TESTS=0 |
| 27 | FAILS=0 |
Manuel Pégourié-Gonnard | 6f4fbbb | 2014-08-14 14:31:29 +0200 | [diff] [blame] | 28 | SKIPS=0 |
Manuel Pégourié-Gonnard | 33a752e | 2014-02-21 09:47:37 +0100 | [diff] [blame] | 29 | |
Manuel Pégourié-Gonnard | 83d8c73 | 2014-04-07 13:24:21 +0200 | [diff] [blame] | 30 | CONFIG_H='../include/polarssl/config.h' |
| 31 | |
Manuel Pégourié-Gonnard | c73339f | 2014-02-26 16:35:27 +0100 | [diff] [blame] | 32 | MEMCHECK=0 |
Manuel Pégourié-Gonnard | 417d46c | 2014-03-13 19:17:53 +0100 | [diff] [blame] | 33 | FILTER='.*' |
Manuel Pégourié-Gonnard | 6f4fbbb | 2014-08-14 14:31:29 +0200 | [diff] [blame] | 34 | EXCLUDE='^$' |
Manuel Pégourié-Gonnard | c73339f | 2014-02-26 16:35:27 +0100 | [diff] [blame] | 35 | |
| 36 | print_usage() { |
| 37 | echo "Usage: $0 [options]" |
Manuel Pégourié-Gonnard | 417d46c | 2014-03-13 19:17:53 +0100 | [diff] [blame] | 38 | echo -e " -h|--help\tPrint this help." |
| 39 | echo -e " -m|--memcheck\tCheck memory leaks and errors." |
| 40 | echo -e " -f|--filter\tOnly matching tests are executed (default: '$FILTER')" |
| 41 | echo -e " -e|--exclude\tMatching tests are excluded (default: '$EXCLUDE')" |
Manuel Pégourié-Gonnard | c73339f | 2014-02-26 16:35:27 +0100 | [diff] [blame] | 42 | } |
| 43 | |
| 44 | get_options() { |
| 45 | while [ $# -gt 0 ]; do |
| 46 | case "$1" in |
Manuel Pégourié-Gonnard | 417d46c | 2014-03-13 19:17:53 +0100 | [diff] [blame] | 47 | -f|--filter) |
| 48 | shift; FILTER=$1 |
| 49 | ;; |
| 50 | -e|--exclude) |
| 51 | shift; EXCLUDE=$1 |
| 52 | ;; |
Manuel Pégourié-Gonnard | c73339f | 2014-02-26 16:35:27 +0100 | [diff] [blame] | 53 | -m|--memcheck) |
| 54 | MEMCHECK=1 |
| 55 | ;; |
| 56 | -h|--help) |
| 57 | print_usage |
| 58 | exit 0 |
| 59 | ;; |
| 60 | *) |
Paul Bakker | 1ebc0c5 | 2014-05-22 15:47:58 +0200 | [diff] [blame] | 61 | echo "Unknown argument: '$1'" |
Manuel Pégourié-Gonnard | c73339f | 2014-02-26 16:35:27 +0100 | [diff] [blame] | 62 | print_usage |
| 63 | exit 1 |
| 64 | ;; |
| 65 | esac |
| 66 | shift |
| 67 | done |
| 68 | } |
| 69 | |
Manuel Pégourié-Gonnard | 6f4fbbb | 2014-08-14 14:31:29 +0200 | [diff] [blame] | 70 | # skip next test if OpenSSL can't send SSLv2 ClientHello |
| 71 | requires_openssl_with_sslv2() { |
| 72 | if [ -z "${OPENSSL_HAS_SSL2:-}" ]; then |
Manuel Pégourié-Gonnard | a4afadf | 2014-08-30 22:09:36 +0200 | [diff] [blame] | 73 | if $OPENSSL_CMD ciphers -ssl2 >/dev/null 2>&1; then |
Manuel Pégourié-Gonnard | 6f4fbbb | 2014-08-14 14:31:29 +0200 | [diff] [blame] | 74 | OPENSSL_HAS_SSL2="YES" |
| 75 | else |
| 76 | OPENSSL_HAS_SSL2="NO" |
| 77 | fi |
| 78 | fi |
Manuel Pégourié-Gonnard | 0eb6cab | 2014-07-23 20:17:47 +0200 | [diff] [blame] | 79 | |
Manuel Pégourié-Gonnard | 6f4fbbb | 2014-08-14 14:31:29 +0200 | [diff] [blame] | 80 | if [ "$OPENSSL_HAS_SSL2" = "NO" ]; then |
| 81 | SKIP_NEXT="YES" |
| 82 | fi |
| 83 | } |
| 84 | |
Manuel Pégourié-Gonnard | baa7f07 | 2014-08-20 20:15:53 +0200 | [diff] [blame] | 85 | # skip next test if GnuTLS isn't available |
| 86 | requires_gnutls() { |
| 87 | if [ -z "${GNUTLS_AVAILABLE:-}" ]; then |
| 88 | if ( which "$GNUTLS_CLI" && which "$GNUTLS_SERV" ) >/dev/null; then |
| 89 | GNUTLS_AVAILABLE="YES" |
| 90 | else |
| 91 | GNUTLS_AVAILABLE="NO" |
| 92 | fi |
| 93 | fi |
| 94 | if [ "$GNUTLS_AVAILABLE" = "NO" ]; then |
| 95 | SKIP_NEXT="YES" |
| 96 | fi |
| 97 | } |
| 98 | |
Manuel Pégourié-Gonnard | 0eb6cab | 2014-07-23 20:17:47 +0200 | [diff] [blame] | 99 | # skip next test if IPv6 isn't available on this host |
| 100 | requires_ipv6() { |
| 101 | if [ -z "${HAS_IPV6:-}" ]; then |
| 102 | $P_SRV server_addr='::1' > $SRV_OUT 2>&1 & |
| 103 | SRV_PID=$! |
| 104 | sleep 1 |
| 105 | kill $SRV_PID >/dev/null 2>&1 |
| 106 | if grep "NET - Binding of the socket failed" $SRV_OUT >/dev/null; then |
| 107 | HAS_IPV6="NO" |
| 108 | else |
| 109 | HAS_IPV6="YES" |
| 110 | fi |
| 111 | rm -r $SRV_OUT |
| 112 | fi |
| 113 | |
| 114 | if [ "$HAS_IPV6" = "NO" ]; then |
| 115 | SKIP_NEXT="YES" |
| 116 | fi |
| 117 | } |
| 118 | |
Manuel Pégourié-Gonnard | a071972 | 2014-09-20 12:46:27 +0200 | [diff] [blame^] | 119 | # multiply the client timeout delay by the given factor for the next test |
| 120 | needs_more_time() { |
| 121 | CLI_DELAY_FACTOR=$1 |
| 122 | } |
| 123 | |
Manuel Pégourié-Gonnard | f8bdbb5 | 2014-02-21 09:20:14 +0100 | [diff] [blame] | 124 | # print_name <name> |
| 125 | print_name() { |
| 126 | echo -n "$1 " |
Manuel Pégourié-Gonnard | 72e51ee | 2014-08-31 10:22:11 +0200 | [diff] [blame] | 127 | LEN=$(( 72 - `echo "$1" | wc -c` )) |
Manuel Pégourié-Gonnard | f8bdbb5 | 2014-02-21 09:20:14 +0100 | [diff] [blame] | 128 | for i in `seq 1 $LEN`; do echo -n '.'; done |
| 129 | echo -n ' ' |
Manuel Pégourié-Gonnard | 33a752e | 2014-02-21 09:47:37 +0100 | [diff] [blame] | 130 | |
Manuel Pégourié-Gonnard | 72e51ee | 2014-08-31 10:22:11 +0200 | [diff] [blame] | 131 | TESTS=$(( $TESTS + 1 )) |
Manuel Pégourié-Gonnard | f8bdbb5 | 2014-02-21 09:20:14 +0100 | [diff] [blame] | 132 | } |
| 133 | |
| 134 | # fail <message> |
| 135 | fail() { |
| 136 | echo "FAIL" |
Manuel Pégourié-Gonnard | 3eec604 | 2014-02-27 15:37:24 +0100 | [diff] [blame] | 137 | echo " ! $1" |
Manuel Pégourié-Gonnard | 33a752e | 2014-02-21 09:47:37 +0100 | [diff] [blame] | 138 | |
Manuel Pégourié-Gonnard | c2b0092 | 2014-08-31 16:46:04 +0200 | [diff] [blame] | 139 | mv $SRV_OUT o-srv-${TESTS}.log |
| 140 | mv $CLI_OUT o-cli-${TESTS}.log |
Manuel Pégourié-Gonnard | be9eb87 | 2014-09-05 17:45:19 +0200 | [diff] [blame] | 141 | if [ -n "$PXY_CMD" ]; then |
| 142 | mv $PXY_OUT o-pxy-${TESTS}.log |
| 143 | fi |
| 144 | echo " ! outputs saved to o-XXX-${TESTS}.log" |
Manuel Pégourié-Gonnard | 33a752e | 2014-02-21 09:47:37 +0100 | [diff] [blame] | 145 | |
Manuel Pégourié-Gonnard | 7fa6772 | 2014-08-31 17:42:53 +0200 | [diff] [blame] | 146 | if [ "X${USER:-}" = Xbuildbot -o "X${LOGNAME:-}" = Xbuildbot ]; then |
| 147 | echo " ! server output:" |
| 148 | cat o-srv-${TESTS}.log |
Manuel Pégourié-Gonnard | be9eb87 | 2014-09-05 17:45:19 +0200 | [diff] [blame] | 149 | echo " ! ========================================================" |
Manuel Pégourié-Gonnard | 7fa6772 | 2014-08-31 17:42:53 +0200 | [diff] [blame] | 150 | echo " ! client output:" |
| 151 | cat o-cli-${TESTS}.log |
Manuel Pégourié-Gonnard | be9eb87 | 2014-09-05 17:45:19 +0200 | [diff] [blame] | 152 | if [ -n "$PXY_CMD" ]; then |
| 153 | echo " ! ========================================================" |
| 154 | echo " ! proxy output:" |
| 155 | cat o-pxy-${TESTS}.log |
| 156 | fi |
| 157 | echo "" |
Manuel Pégourié-Gonnard | 7fa6772 | 2014-08-31 17:42:53 +0200 | [diff] [blame] | 158 | fi |
| 159 | |
Manuel Pégourié-Gonnard | 72e51ee | 2014-08-31 10:22:11 +0200 | [diff] [blame] | 160 | FAILS=$(( $FAILS + 1 )) |
Manuel Pégourié-Gonnard | f8bdbb5 | 2014-02-21 09:20:14 +0100 | [diff] [blame] | 161 | } |
| 162 | |
Manuel Pégourié-Gonnard | 677884d | 2014-02-25 16:42:31 +0100 | [diff] [blame] | 163 | # is_polar <cmd_line> |
| 164 | is_polar() { |
| 165 | echo "$1" | grep 'ssl_server2\|ssl_client2' > /dev/null |
| 166 | } |
| 167 | |
Manuel Pégourié-Gonnard | c73339f | 2014-02-26 16:35:27 +0100 | [diff] [blame] | 168 | # has_mem_err <log_file_name> |
| 169 | has_mem_err() { |
| 170 | if ( grep -F 'All heap blocks were freed -- no leaks are possible' "$1" && |
| 171 | grep -F 'ERROR SUMMARY: 0 errors from 0 contexts' "$1" ) > /dev/null |
| 172 | then |
| 173 | return 1 # false: does not have errors |
| 174 | else |
| 175 | return 0 # true: has errors |
| 176 | fi |
| 177 | } |
| 178 | |
Manuel Pégourié-Gonnard | 0c1ec47 | 2014-06-20 18:41:11 +0200 | [diff] [blame] | 179 | # wait for server to start: two versions depending on lsof availability |
| 180 | wait_server_start() { |
| 181 | if which lsof >/dev/null; then |
| 182 | # make sure we don't loop forever |
| 183 | ( sleep "$DOG_DELAY"; echo "SERVERSTART TIMEOUT"; kill $MAIN_PID ) & |
| 184 | WATCHDOG_PID=$! |
| 185 | |
| 186 | # make a tight loop, server usually takes less than 1 sec to start |
Manuel Pégourié-Gonnard | 0eb6cab | 2014-07-23 20:17:47 +0200 | [diff] [blame] | 187 | if [ "$DTLS" -eq 1 ]; then |
Manuel Pégourié-Gonnard | be9eb87 | 2014-09-05 17:45:19 +0200 | [diff] [blame] | 188 | until lsof -nbi UDP:"$SRV_PORT" | grep UDP >/dev/null; do :; done |
Manuel Pégourié-Gonnard | 0eb6cab | 2014-07-23 20:17:47 +0200 | [diff] [blame] | 189 | else |
Manuel Pégourié-Gonnard | be9eb87 | 2014-09-05 17:45:19 +0200 | [diff] [blame] | 190 | until lsof -nbi TCP:"$SRV_PORT" | grep LISTEN >/dev/null; do :; done |
Manuel Pégourié-Gonnard | 0eb6cab | 2014-07-23 20:17:47 +0200 | [diff] [blame] | 191 | fi |
Manuel Pégourié-Gonnard | 0c1ec47 | 2014-06-20 18:41:11 +0200 | [diff] [blame] | 192 | |
| 193 | kill $WATCHDOG_PID |
| 194 | wait $WATCHDOG_PID |
| 195 | else |
| 196 | sleep "$START_DELAY" |
| 197 | fi |
| 198 | } |
| 199 | |
Manuel Pégourié-Gonnard | c0f6a69 | 2014-08-30 22:41:47 +0200 | [diff] [blame] | 200 | # wait for client to terminate and set CLI_EXIT |
| 201 | # must be called right after starting the client |
| 202 | wait_client_done() { |
| 203 | CLI_PID=$! |
| 204 | |
Manuel Pégourié-Gonnard | a071972 | 2014-09-20 12:46:27 +0200 | [diff] [blame^] | 205 | CLI_DELAY=$(( $DOG_DELAY * $CLI_DELAY_FACTOR )) |
| 206 | CLI_DELAY_FACTOR=1 |
| 207 | |
| 208 | ( sleep $CLI_DELAY; echo "TIMEOUT" >> $CLI_OUT; kill $CLI_PID ) & |
Manuel Pégourié-Gonnard | c0f6a69 | 2014-08-30 22:41:47 +0200 | [diff] [blame] | 209 | WATCHDOG_PID=$! |
| 210 | |
| 211 | wait $CLI_PID |
| 212 | CLI_EXIT=$? |
| 213 | |
Manuel Pégourié-Gonnard | a071972 | 2014-09-20 12:46:27 +0200 | [diff] [blame^] | 214 | kill $WATCHDOG_PID >/dev/null 2>&1 |
Manuel Pégourié-Gonnard | c0f6a69 | 2014-08-30 22:41:47 +0200 | [diff] [blame] | 215 | wait $WATCHDOG_PID |
| 216 | |
| 217 | echo "EXIT: $CLI_EXIT" >> $CLI_OUT |
| 218 | } |
| 219 | |
Manuel Pégourié-Gonnard | 0eb6cab | 2014-07-23 20:17:47 +0200 | [diff] [blame] | 220 | # check if the given command uses dtls and sets global variable DTLS |
| 221 | detect_dtls() { |
Manuel Pégourié-Gonnard | be9eb87 | 2014-09-05 17:45:19 +0200 | [diff] [blame] | 222 | if echo "$1" | grep 'dtls=1\|-dtls1\|-u' >/dev/null; then |
Manuel Pégourié-Gonnard | 0eb6cab | 2014-07-23 20:17:47 +0200 | [diff] [blame] | 223 | DTLS=1 |
| 224 | else |
| 225 | DTLS=0 |
| 226 | fi |
| 227 | } |
| 228 | |
Manuel Pégourié-Gonnard | be9eb87 | 2014-09-05 17:45:19 +0200 | [diff] [blame] | 229 | # Usage: run_test name [-p proxy_cmd] srv_cmd cli_cmd cli_exit [option [...]] |
Manuel Pégourié-Gonnard | eaadc50 | 2014-02-20 11:01:30 +0100 | [diff] [blame] | 230 | # Options: -s pattern pattern that must be present in server output |
| 231 | # -c pattern pattern that must be present in client output |
| 232 | # -S pattern pattern that must be absent in server output |
| 233 | # -C pattern pattern that must be absent in client output |
| 234 | run_test() { |
Manuel Pégourié-Gonnard | fccd325 | 2014-02-25 17:14:15 +0100 | [diff] [blame] | 235 | NAME="$1" |
Manuel Pégourié-Gonnard | be9eb87 | 2014-09-05 17:45:19 +0200 | [diff] [blame] | 236 | shift 1 |
Manuel Pégourié-Gonnard | fccd325 | 2014-02-25 17:14:15 +0100 | [diff] [blame] | 237 | |
Manuel Pégourié-Gonnard | 417d46c | 2014-03-13 19:17:53 +0100 | [diff] [blame] | 238 | if echo "$NAME" | grep "$FILTER" | grep -v "$EXCLUDE" >/dev/null; then : |
| 239 | else |
| 240 | return |
| 241 | fi |
| 242 | |
Manuel Pégourié-Gonnard | fccd325 | 2014-02-25 17:14:15 +0100 | [diff] [blame] | 243 | print_name "$NAME" |
Manuel Pégourié-Gonnard | eaadc50 | 2014-02-20 11:01:30 +0100 | [diff] [blame] | 244 | |
Manuel Pégourié-Gonnard | 6f4fbbb | 2014-08-14 14:31:29 +0200 | [diff] [blame] | 245 | # should we skip? |
| 246 | if [ "X$SKIP_NEXT" = "XYES" ]; then |
| 247 | SKIP_NEXT="NO" |
| 248 | echo "SKIP" |
Manuel Pégourié-Gonnard | 72e51ee | 2014-08-31 10:22:11 +0200 | [diff] [blame] | 249 | SKIPS=$(( $SKIPS + 1 )) |
Manuel Pégourié-Gonnard | 6f4fbbb | 2014-08-14 14:31:29 +0200 | [diff] [blame] | 250 | return |
| 251 | fi |
| 252 | |
Manuel Pégourié-Gonnard | be9eb87 | 2014-09-05 17:45:19 +0200 | [diff] [blame] | 253 | # does this test use a proxy? |
| 254 | if [ "X$1" = "X-p" ]; then |
| 255 | PXY_CMD="$2" |
| 256 | shift 2 |
| 257 | else |
| 258 | PXY_CMD="" |
| 259 | fi |
| 260 | |
| 261 | # get commands and client output |
| 262 | SRV_CMD="$1" |
| 263 | CLI_CMD="$2" |
| 264 | CLI_EXPECT="$3" |
| 265 | shift 3 |
| 266 | |
| 267 | # fix client port |
| 268 | if [ -n "$PXY_CMD" ]; then |
| 269 | CLI_CMD=$( echo "$CLI_CMD" | sed s/+SRV_PORT/$PXY_PORT/g ) |
| 270 | else |
| 271 | CLI_CMD=$( echo "$CLI_CMD" | sed s/+SRV_PORT/$SRV_PORT/g ) |
| 272 | fi |
| 273 | |
Manuel Pégourié-Gonnard | 0eb6cab | 2014-07-23 20:17:47 +0200 | [diff] [blame] | 274 | # update DTLS variable |
| 275 | detect_dtls "$SRV_CMD" |
| 276 | |
Manuel Pégourié-Gonnard | c73339f | 2014-02-26 16:35:27 +0100 | [diff] [blame] | 277 | # prepend valgrind to our commands if active |
| 278 | if [ "$MEMCHECK" -gt 0 ]; then |
| 279 | if is_polar "$SRV_CMD"; then |
| 280 | SRV_CMD="valgrind --leak-check=full $SRV_CMD" |
| 281 | fi |
| 282 | if is_polar "$CLI_CMD"; then |
| 283 | CLI_CMD="valgrind --leak-check=full $CLI_CMD" |
| 284 | fi |
| 285 | fi |
| 286 | |
Manuel Pégourié-Gonnard | eaadc50 | 2014-02-20 11:01:30 +0100 | [diff] [blame] | 287 | # run the commands |
Manuel Pégourié-Gonnard | be9eb87 | 2014-09-05 17:45:19 +0200 | [diff] [blame] | 288 | if [ -n "$PXY_CMD" ]; then |
| 289 | echo "$PXY_CMD" > $PXY_OUT |
| 290 | eval "$PXY_CMD" >> $PXY_OUT 2>&1 & |
| 291 | PXY_PID=$! |
| 292 | # assume proxy starts faster than server |
| 293 | fi |
| 294 | |
Manuel Pégourié-Gonnard | bc3b16c | 2014-05-28 23:06:50 +0200 | [diff] [blame] | 295 | echo "$SRV_CMD" > $SRV_OUT |
Manuel Pégourié-Gonnard | be9eb87 | 2014-09-05 17:45:19 +0200 | [diff] [blame] | 296 | # "yes" is for servers without -www (openssl with DTLS) |
Manuel Pégourié-Gonnard | a775617 | 2014-08-31 18:37:01 +0200 | [diff] [blame] | 297 | yes blabla | $SRV_CMD >> $SRV_OUT 2>&1 & |
Manuel Pégourié-Gonnard | eaadc50 | 2014-02-20 11:01:30 +0100 | [diff] [blame] | 298 | SRV_PID=$! |
Manuel Pégourié-Gonnard | 0c1ec47 | 2014-06-20 18:41:11 +0200 | [diff] [blame] | 299 | wait_server_start |
Manuel Pégourié-Gonnard | c0f6a69 | 2014-08-30 22:41:47 +0200 | [diff] [blame] | 300 | |
Manuel Pégourié-Gonnard | bc3b16c | 2014-05-28 23:06:50 +0200 | [diff] [blame] | 301 | echo "$CLI_CMD" > $CLI_OUT |
Manuel Pégourié-Gonnard | c0f6a69 | 2014-08-30 22:41:47 +0200 | [diff] [blame] | 302 | eval "$CLI_CMD" >> $CLI_OUT 2>&1 & |
| 303 | wait_client_done |
Manuel Pégourié-Gonnard | e01af4c | 2014-03-25 14:16:44 +0100 | [diff] [blame] | 304 | |
Manuel Pégourié-Gonnard | be9eb87 | 2014-09-05 17:45:19 +0200 | [diff] [blame] | 305 | # terminate the server (and the proxy) |
Manuel Pégourié-Gonnard | 74b1170 | 2014-08-14 15:47:33 +0200 | [diff] [blame] | 306 | kill $SRV_PID |
| 307 | wait $SRV_PID |
Manuel Pégourié-Gonnard | be9eb87 | 2014-09-05 17:45:19 +0200 | [diff] [blame] | 308 | if [ -n "$PXY_CMD" ]; then |
Manuel Pégourié-Gonnard | a071972 | 2014-09-20 12:46:27 +0200 | [diff] [blame^] | 309 | kill $PXY_PID >/dev/null 2>&1 |
Manuel Pégourié-Gonnard | be9eb87 | 2014-09-05 17:45:19 +0200 | [diff] [blame] | 310 | wait $PXY_PID |
| 311 | fi |
Manuel Pégourié-Gonnard | 677884d | 2014-02-25 16:42:31 +0100 | [diff] [blame] | 312 | |
| 313 | # check if the client and server went at least to the handshake stage |
Paul Bakker | 1ebc0c5 | 2014-05-22 15:47:58 +0200 | [diff] [blame] | 314 | # (useful to avoid tests with only negative assertions and non-zero |
Manuel Pégourié-Gonnard | 677884d | 2014-02-25 16:42:31 +0100 | [diff] [blame] | 315 | # expected client exit to incorrectly succeed in case of catastrophic |
| 316 | # failure) |
Manuel Pégourié-Gonnard | fccd325 | 2014-02-25 17:14:15 +0100 | [diff] [blame] | 317 | if is_polar "$SRV_CMD"; then |
Manuel Pégourié-Gonnard | bc3b16c | 2014-05-28 23:06:50 +0200 | [diff] [blame] | 318 | if grep "Performing the SSL/TLS handshake" $SRV_OUT >/dev/null; then :; |
Manuel Pégourié-Gonnard | 677884d | 2014-02-25 16:42:31 +0100 | [diff] [blame] | 319 | else |
| 320 | fail "server failed to start" |
| 321 | return |
| 322 | fi |
| 323 | fi |
Manuel Pégourié-Gonnard | fccd325 | 2014-02-25 17:14:15 +0100 | [diff] [blame] | 324 | if is_polar "$CLI_CMD"; then |
Manuel Pégourié-Gonnard | bc3b16c | 2014-05-28 23:06:50 +0200 | [diff] [blame] | 325 | if grep "Performing the SSL/TLS handshake" $CLI_OUT >/dev/null; then :; |
Manuel Pégourié-Gonnard | 677884d | 2014-02-25 16:42:31 +0100 | [diff] [blame] | 326 | else |
| 327 | fail "client failed to start" |
| 328 | return |
| 329 | fi |
| 330 | fi |
| 331 | |
Manuel Pégourié-Gonnard | f8bdbb5 | 2014-02-21 09:20:14 +0100 | [diff] [blame] | 332 | # check server exit code |
| 333 | if [ $? != 0 ]; then |
| 334 | fail "server fail" |
| 335 | return |
| 336 | fi |
| 337 | |
Manuel Pégourié-Gonnard | eaadc50 | 2014-02-20 11:01:30 +0100 | [diff] [blame] | 338 | # check client exit code |
Manuel Pégourié-Gonnard | fccd325 | 2014-02-25 17:14:15 +0100 | [diff] [blame] | 339 | if [ \( "$CLI_EXPECT" = 0 -a "$CLI_EXIT" != 0 \) -o \ |
| 340 | \( "$CLI_EXPECT" != 0 -a "$CLI_EXIT" = 0 \) ] |
Manuel Pégourié-Gonnard | 780d671 | 2014-02-20 17:19:59 +0100 | [diff] [blame] | 341 | then |
Manuel Pégourié-Gonnard | be9eb87 | 2014-09-05 17:45:19 +0200 | [diff] [blame] | 342 | fail "bad client exit code (expected $CLI_EXPECT, got $CLI_EXIT)" |
Manuel Pégourié-Gonnard | eaadc50 | 2014-02-20 11:01:30 +0100 | [diff] [blame] | 343 | return |
| 344 | fi |
Manuel Pégourié-Gonnard | eaadc50 | 2014-02-20 11:01:30 +0100 | [diff] [blame] | 345 | |
Manuel Pégourié-Gonnard | c73339f | 2014-02-26 16:35:27 +0100 | [diff] [blame] | 346 | # check other assertions |
Manuel Pégourié-Gonnard | 480905d | 2014-08-21 19:38:32 +0200 | [diff] [blame] | 347 | # lines beginning with == are added by valgrind, ignore them |
Manuel Pégourié-Gonnard | eaadc50 | 2014-02-20 11:01:30 +0100 | [diff] [blame] | 348 | while [ $# -gt 0 ] |
| 349 | do |
| 350 | case $1 in |
| 351 | "-s") |
Manuel Pégourié-Gonnard | 480905d | 2014-08-21 19:38:32 +0200 | [diff] [blame] | 352 | if grep -v '^==' $SRV_OUT | grep "$2" >/dev/null; then :; else |
Manuel Pégourié-Gonnard | f8bdbb5 | 2014-02-21 09:20:14 +0100 | [diff] [blame] | 353 | fail "-s $2" |
Manuel Pégourié-Gonnard | eaadc50 | 2014-02-20 11:01:30 +0100 | [diff] [blame] | 354 | return |
| 355 | fi |
| 356 | ;; |
| 357 | |
| 358 | "-c") |
Manuel Pégourié-Gonnard | 480905d | 2014-08-21 19:38:32 +0200 | [diff] [blame] | 359 | if grep -v '^==' $CLI_OUT | grep "$2" >/dev/null; then :; else |
Manuel Pégourié-Gonnard | f8bdbb5 | 2014-02-21 09:20:14 +0100 | [diff] [blame] | 360 | fail "-c $2" |
Manuel Pégourié-Gonnard | eaadc50 | 2014-02-20 11:01:30 +0100 | [diff] [blame] | 361 | return |
| 362 | fi |
| 363 | ;; |
| 364 | |
| 365 | "-S") |
Manuel Pégourié-Gonnard | 480905d | 2014-08-21 19:38:32 +0200 | [diff] [blame] | 366 | if grep -v '^==' $SRV_OUT | grep "$2" >/dev/null; then |
Manuel Pégourié-Gonnard | f8bdbb5 | 2014-02-21 09:20:14 +0100 | [diff] [blame] | 367 | fail "-S $2" |
Manuel Pégourié-Gonnard | eaadc50 | 2014-02-20 11:01:30 +0100 | [diff] [blame] | 368 | return |
| 369 | fi |
| 370 | ;; |
| 371 | |
| 372 | "-C") |
Manuel Pégourié-Gonnard | 480905d | 2014-08-21 19:38:32 +0200 | [diff] [blame] | 373 | if grep -v '^==' $CLI_OUT | grep "$2" >/dev/null; then |
Manuel Pégourié-Gonnard | f8bdbb5 | 2014-02-21 09:20:14 +0100 | [diff] [blame] | 374 | fail "-C $2" |
Manuel Pégourié-Gonnard | eaadc50 | 2014-02-20 11:01:30 +0100 | [diff] [blame] | 375 | return |
| 376 | fi |
| 377 | ;; |
| 378 | |
| 379 | *) |
Paul Bakker | 1ebc0c5 | 2014-05-22 15:47:58 +0200 | [diff] [blame] | 380 | echo "Unknown test: $1" >&2 |
Manuel Pégourié-Gonnard | eaadc50 | 2014-02-20 11:01:30 +0100 | [diff] [blame] | 381 | exit 1 |
| 382 | esac |
| 383 | shift 2 |
| 384 | done |
| 385 | |
Manuel Pégourié-Gonnard | c73339f | 2014-02-26 16:35:27 +0100 | [diff] [blame] | 386 | # check valgrind's results |
| 387 | if [ "$MEMCHECK" -gt 0 ]; then |
Manuel Pégourié-Gonnard | bc3b16c | 2014-05-28 23:06:50 +0200 | [diff] [blame] | 388 | if is_polar "$SRV_CMD" && has_mem_err $SRV_OUT; then |
Manuel Pégourié-Gonnard | c73339f | 2014-02-26 16:35:27 +0100 | [diff] [blame] | 389 | fail "Server has memory errors" |
| 390 | return |
| 391 | fi |
Manuel Pégourié-Gonnard | bc3b16c | 2014-05-28 23:06:50 +0200 | [diff] [blame] | 392 | if is_polar "$CLI_CMD" && has_mem_err $CLI_OUT; then |
Manuel Pégourié-Gonnard | c73339f | 2014-02-26 16:35:27 +0100 | [diff] [blame] | 393 | fail "Client has memory errors" |
| 394 | return |
| 395 | fi |
| 396 | fi |
| 397 | |
Manuel Pégourié-Gonnard | eaadc50 | 2014-02-20 11:01:30 +0100 | [diff] [blame] | 398 | # if we're here, everything is ok |
| 399 | echo "PASS" |
Manuel Pégourié-Gonnard | be9eb87 | 2014-09-05 17:45:19 +0200 | [diff] [blame] | 400 | rm -f $SRV_OUT $CLI_OUT $PXY_OUT |
Manuel Pégourié-Gonnard | eaadc50 | 2014-02-20 11:01:30 +0100 | [diff] [blame] | 401 | } |
| 402 | |
Manuel Pégourié-Gonnard | a9062e9 | 2014-02-25 16:21:22 +0100 | [diff] [blame] | 403 | cleanup() { |
Manuel Pégourié-Gonnard | be9eb87 | 2014-09-05 17:45:19 +0200 | [diff] [blame] | 404 | rm -f $CLI_OUT $SRV_OUT $PXY_OUT $SESSION |
Manuel Pégourié-Gonnard | 0c1ec47 | 2014-06-20 18:41:11 +0200 | [diff] [blame] | 405 | kill $SRV_PID >/dev/null 2>&1 |
| 406 | kill $WATCHDOG_PID >/dev/null 2>&1 |
Manuel Pégourié-Gonnard | be9eb87 | 2014-09-05 17:45:19 +0200 | [diff] [blame] | 407 | if [ -n "$PXY_CMD" ]; then |
| 408 | kill $PXY_PID >/dev/null 2>&1 |
| 409 | fi |
Manuel Pégourié-Gonnard | a9062e9 | 2014-02-25 16:21:22 +0100 | [diff] [blame] | 410 | exit 1 |
| 411 | } |
| 412 | |
Manuel Pégourié-Gonnard | 9dea8bd | 2014-02-26 18:21:02 +0100 | [diff] [blame] | 413 | # |
| 414 | # MAIN |
| 415 | # |
| 416 | |
Manuel Pégourié-Gonnard | 913030c | 2014-03-28 10:12:38 +0100 | [diff] [blame] | 417 | get_options "$@" |
| 418 | |
Manuel Pégourié-Gonnard | f7a2690 | 2014-02-27 12:25:54 +0100 | [diff] [blame] | 419 | # sanity checks, avoid an avalanche of errors |
| 420 | if [ ! -x "$P_SRV" ]; then |
| 421 | echo "Command '$P_SRV' is not an executable file" |
| 422 | exit 1 |
| 423 | fi |
| 424 | if [ ! -x "$P_CLI" ]; then |
| 425 | echo "Command '$P_CLI' is not an executable file" |
| 426 | exit 1 |
| 427 | fi |
Manuel Pégourié-Gonnard | be9eb87 | 2014-09-05 17:45:19 +0200 | [diff] [blame] | 428 | if [ ! -x "$P_PXY" ]; then |
| 429 | echo "Command '$P_PXY' is not an executable file" |
| 430 | exit 1 |
| 431 | fi |
Manuel Pégourié-Gonnard | 74faf3c | 2014-03-13 18:47:44 +0100 | [diff] [blame] | 432 | if which $OPENSSL_CMD >/dev/null 2>&1; then :; else |
| 433 | echo "Command '$OPENSSL_CMD' not found" |
Manuel Pégourié-Gonnard | f7a2690 | 2014-02-27 12:25:54 +0100 | [diff] [blame] | 434 | exit 1 |
| 435 | fi |
| 436 | |
Manuel Pégourié-Gonnard | 32f8f4d | 2014-05-29 11:31:20 +0200 | [diff] [blame] | 437 | # used by watchdog |
| 438 | MAIN_PID="$$" |
| 439 | |
Manuel Pégourié-Gonnard | 0c1ec47 | 2014-06-20 18:41:11 +0200 | [diff] [blame] | 440 | # be more patient with valgrind |
| 441 | if [ "$MEMCHECK" -gt 0 ]; then |
| 442 | START_DELAY=3 |
| 443 | DOG_DELAY=30 |
| 444 | else |
| 445 | START_DELAY=1 |
| 446 | DOG_DELAY=10 |
| 447 | fi |
Manuel Pégourié-Gonnard | a071972 | 2014-09-20 12:46:27 +0200 | [diff] [blame^] | 448 | CLI_DELAY_FACTOR=1 |
Manuel Pégourié-Gonnard | 0c1ec47 | 2014-06-20 18:41:11 +0200 | [diff] [blame] | 449 | |
Manuel Pégourié-Gonnard | be9eb87 | 2014-09-05 17:45:19 +0200 | [diff] [blame] | 450 | # Pick a "unique" server port in the range 10000-19999, and a proxy port |
| 451 | PORT_BASE="0000$$" |
| 452 | PORT_BASE="$( echo -n $PORT_BASE | tail -c 4 )" |
| 453 | SRV_PORT="1$PORT_BASE" |
| 454 | PXY_PORT="2$PORT_BASE" |
| 455 | unset PORT_BASE |
Manuel Pégourié-Gonnard | 8066b81 | 2014-05-28 22:59:30 +0200 | [diff] [blame] | 456 | |
Manuel Pégourié-Gonnard | 0eb6cab | 2014-07-23 20:17:47 +0200 | [diff] [blame] | 457 | # fix commands to use this port, force IPv4 while at it |
Manuel Pégourié-Gonnard | be9eb87 | 2014-09-05 17:45:19 +0200 | [diff] [blame] | 458 | P_SRV="$P_SRV server_addr=127.0.0.1 server_port=$SRV_PORT" |
| 459 | P_CLI="$P_CLI server_addr=127.0.0.1 server_port=+SRV_PORT" |
| 460 | P_PXY="$P_PXY server_addr=127.0.0.1 server_port=$SRV_PORT listen_addr=127.0.0.1 listen_port=$PXY_PORT" |
| 461 | O_SRV="$O_SRV -accept $SRV_PORT" |
| 462 | O_CLI="$O_CLI -connect localhost:+SRV_PORT" |
| 463 | G_SRV="$G_SRV -p $SRV_PORT" |
| 464 | G_CLI="$G_CLI -p +SRV_PORT" |
Manuel Pégourié-Gonnard | 8066b81 | 2014-05-28 22:59:30 +0200 | [diff] [blame] | 465 | |
Manuel Pégourié-Gonnard | bc3b16c | 2014-05-28 23:06:50 +0200 | [diff] [blame] | 466 | # Also pick a unique name for intermediate files |
| 467 | SRV_OUT="srv_out.$$" |
| 468 | CLI_OUT="cli_out.$$" |
Manuel Pégourié-Gonnard | be9eb87 | 2014-09-05 17:45:19 +0200 | [diff] [blame] | 469 | PXY_OUT="pxy_out.$$" |
Manuel Pégourié-Gonnard | bc3b16c | 2014-05-28 23:06:50 +0200 | [diff] [blame] | 470 | SESSION="session.$$" |
| 471 | |
Manuel Pégourié-Gonnard | 6f4fbbb | 2014-08-14 14:31:29 +0200 | [diff] [blame] | 472 | SKIP_NEXT="NO" |
| 473 | |
Manuel Pégourié-Gonnard | a9062e9 | 2014-02-25 16:21:22 +0100 | [diff] [blame] | 474 | trap cleanup INT TERM HUP |
Manuel Pégourié-Gonnard | eaadc50 | 2014-02-20 11:01:30 +0100 | [diff] [blame] | 475 | |
Manuel Pégourié-Gonnard | e73b263 | 2014-07-12 04:00:00 +0200 | [diff] [blame] | 476 | # Basic test |
| 477 | |
Manuel Pégourié-Gonnard | 480905d | 2014-08-21 19:38:32 +0200 | [diff] [blame] | 478 | # Checks that: |
| 479 | # - things work with all ciphersuites active (used with config-full in all.sh) |
| 480 | # - the expected (highest security) parameters are selected |
| 481 | # ("signature_algorithm ext: 6" means SHA-512 (highest common hash)) |
Manuel Pégourié-Gonnard | e73b263 | 2014-07-12 04:00:00 +0200 | [diff] [blame] | 482 | run_test "Default" \ |
Manuel Pégourié-Gonnard | 480905d | 2014-08-21 19:38:32 +0200 | [diff] [blame] | 483 | "$P_SRV debug_level=3" \ |
Manuel Pégourié-Gonnard | e73b263 | 2014-07-12 04:00:00 +0200 | [diff] [blame] | 484 | "$P_CLI" \ |
| 485 | 0 \ |
Manuel Pégourié-Gonnard | 480905d | 2014-08-21 19:38:32 +0200 | [diff] [blame] | 486 | -s "Protocol is TLSv1.2" \ |
| 487 | -s "Ciphersuite is TLS-ECDHE-ECDSA-WITH-AES-256-GCM-SHA384" \ |
| 488 | -s "client hello v3, signature_algorithm ext: 6" \ |
| 489 | -s "ECDHE curve: secp521r1" \ |
| 490 | -S "error" \ |
| 491 | -C "error" |
Manuel Pégourié-Gonnard | e73b263 | 2014-07-12 04:00:00 +0200 | [diff] [blame] | 492 | |
Manuel Pégourié-Gonnard | c1da664 | 2014-02-25 14:18:30 +0100 | [diff] [blame] | 493 | # Test for SSLv2 ClientHello |
| 494 | |
Manuel Pégourié-Gonnard | 6f4fbbb | 2014-08-14 14:31:29 +0200 | [diff] [blame] | 495 | requires_openssl_with_sslv2 |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 496 | run_test "SSLv2 ClientHello: reference" \ |
Manuel Pégourié-Gonnard | c1da664 | 2014-02-25 14:18:30 +0100 | [diff] [blame] | 497 | "$P_SRV debug_level=3" \ |
Manuel Pégourié-Gonnard | a3d808e | 2014-02-26 16:33:03 +0100 | [diff] [blame] | 498 | "$O_CLI -no_ssl2" \ |
Manuel Pégourié-Gonnard | c1da664 | 2014-02-25 14:18:30 +0100 | [diff] [blame] | 499 | 0 \ |
| 500 | -S "parse client hello v2" \ |
| 501 | -S "ssl_handshake returned" |
| 502 | |
| 503 | # Adding a SSL2-only suite makes OpenSSL client send SSLv2 ClientHello |
Manuel Pégourié-Gonnard | 6f4fbbb | 2014-08-14 14:31:29 +0200 | [diff] [blame] | 504 | requires_openssl_with_sslv2 |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 505 | run_test "SSLv2 ClientHello: actual test" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 506 | "$P_SRV debug_level=2" \ |
Manuel Pégourié-Gonnard | fccd325 | 2014-02-25 17:14:15 +0100 | [diff] [blame] | 507 | "$O_CLI -cipher 'DES-CBC-MD5:ALL'" \ |
Manuel Pégourié-Gonnard | c1da664 | 2014-02-25 14:18:30 +0100 | [diff] [blame] | 508 | 0 \ |
| 509 | -s "parse client hello v2" \ |
| 510 | -S "ssl_handshake returned" |
| 511 | |
Manuel Pégourié-Gonnard | 780d671 | 2014-02-20 17:19:59 +0100 | [diff] [blame] | 512 | # Tests for Truncated HMAC extension |
| 513 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 514 | run_test "Truncated HMAC: reference" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 515 | "$P_SRV debug_level=4" \ |
Manuel Pégourié-Gonnard | c1da664 | 2014-02-25 14:18:30 +0100 | [diff] [blame] | 516 | "$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] | 517 | 0 \ |
| 518 | -s "dumping 'computed mac' (20 bytes)" |
| 519 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 520 | run_test "Truncated HMAC: actual test" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 521 | "$P_SRV debug_level=4" \ |
Manuel Pégourié-Gonnard | c1da664 | 2014-02-25 14:18:30 +0100 | [diff] [blame] | 522 | "$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] | 523 | 0 \ |
Manuel Pégourié-Gonnard | f7c5201 | 2014-02-20 11:43:46 +0100 | [diff] [blame] | 524 | -s "dumping 'computed mac' (10 bytes)" |
| 525 | |
Manuel Pégourié-Gonnard | 780d671 | 2014-02-20 17:19:59 +0100 | [diff] [blame] | 526 | # Tests for Session Tickets |
| 527 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 528 | run_test "Session resume using tickets: basic" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 529 | "$P_SRV debug_level=3 tickets=1" \ |
| 530 | "$P_CLI debug_level=3 tickets=1 reconnect=1" \ |
Manuel Pégourié-Gonnard | f7c5201 | 2014-02-20 11:43:46 +0100 | [diff] [blame] | 531 | 0 \ |
Manuel Pégourié-Gonnard | c55a5b7 | 2014-02-20 22:50:56 +0100 | [diff] [blame] | 532 | -c "client hello, adding session ticket extension" \ |
| 533 | -s "found session ticket extension" \ |
| 534 | -s "server hello, adding session ticket extension" \ |
| 535 | -c "found session_ticket extension" \ |
| 536 | -c "parse new session ticket" \ |
Manuel Pégourié-Gonnard | f7c5201 | 2014-02-20 11:43:46 +0100 | [diff] [blame] | 537 | -S "session successfully restored from cache" \ |
| 538 | -s "session successfully restored from ticket" \ |
| 539 | -s "a session has been resumed" \ |
| 540 | -c "a session has been resumed" |
| 541 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 542 | run_test "Session resume using tickets: cache disabled" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 543 | "$P_SRV debug_level=3 tickets=1 cache_max=0" \ |
| 544 | "$P_CLI debug_level=3 tickets=1 reconnect=1" \ |
Manuel Pégourié-Gonnard | dbe1ee1 | 2014-02-21 09:18:13 +0100 | [diff] [blame] | 545 | 0 \ |
| 546 | -c "client hello, adding session ticket extension" \ |
| 547 | -s "found session ticket extension" \ |
| 548 | -s "server hello, adding session ticket extension" \ |
| 549 | -c "found session_ticket extension" \ |
| 550 | -c "parse new session ticket" \ |
| 551 | -S "session successfully restored from cache" \ |
| 552 | -s "session successfully restored from ticket" \ |
| 553 | -s "a session has been resumed" \ |
| 554 | -c "a session has been resumed" |
| 555 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 556 | run_test "Session resume using tickets: timeout" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 557 | "$P_SRV debug_level=3 tickets=1 cache_max=0 ticket_timeout=1" \ |
| 558 | "$P_CLI debug_level=3 tickets=1 reconnect=1 reco_delay=2" \ |
Manuel Pégourié-Gonnard | dbe1ee1 | 2014-02-21 09:18:13 +0100 | [diff] [blame] | 559 | 0 \ |
| 560 | -c "client hello, adding session ticket extension" \ |
| 561 | -s "found session ticket extension" \ |
| 562 | -s "server hello, adding session ticket extension" \ |
| 563 | -c "found session_ticket extension" \ |
| 564 | -c "parse new session ticket" \ |
| 565 | -S "session successfully restored from cache" \ |
| 566 | -S "session successfully restored from ticket" \ |
| 567 | -S "a session has been resumed" \ |
| 568 | -C "a session has been resumed" |
| 569 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 570 | run_test "Session resume using tickets: openssl server" \ |
Manuel Pégourié-Gonnard | f7a2690 | 2014-02-27 12:25:54 +0100 | [diff] [blame] | 571 | "$O_SRV" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 572 | "$P_CLI debug_level=3 tickets=1 reconnect=1" \ |
Manuel Pégourié-Gonnard | fccd325 | 2014-02-25 17:14:15 +0100 | [diff] [blame] | 573 | 0 \ |
| 574 | -c "client hello, adding session ticket extension" \ |
| 575 | -c "found session_ticket extension" \ |
| 576 | -c "parse new session ticket" \ |
| 577 | -c "a session has been resumed" |
| 578 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 579 | run_test "Session resume using tickets: openssl client" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 580 | "$P_SRV debug_level=3 tickets=1" \ |
Manuel Pégourié-Gonnard | bc3b16c | 2014-05-28 23:06:50 +0200 | [diff] [blame] | 581 | "( $O_CLI -sess_out $SESSION; \ |
| 582 | $O_CLI -sess_in $SESSION; \ |
| 583 | rm -f $SESSION )" \ |
Manuel Pégourié-Gonnard | fccd325 | 2014-02-25 17:14:15 +0100 | [diff] [blame] | 584 | 0 \ |
| 585 | -s "found session ticket extension" \ |
| 586 | -s "server hello, adding session ticket extension" \ |
| 587 | -S "session successfully restored from cache" \ |
| 588 | -s "session successfully restored from ticket" \ |
| 589 | -s "a session has been resumed" |
| 590 | |
Manuel Pégourié-Gonnard | c55a5b7 | 2014-02-20 22:50:56 +0100 | [diff] [blame] | 591 | # Tests for Session Resume based on session-ID and cache |
Manuel Pégourié-Gonnard | 780d671 | 2014-02-20 17:19:59 +0100 | [diff] [blame] | 592 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 593 | run_test "Session resume using cache: tickets enabled on client" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 594 | "$P_SRV debug_level=3 tickets=0" \ |
| 595 | "$P_CLI debug_level=3 tickets=1 reconnect=1" \ |
Manuel Pégourié-Gonnard | f7c5201 | 2014-02-20 11:43:46 +0100 | [diff] [blame] | 596 | 0 \ |
Manuel Pégourié-Gonnard | c55a5b7 | 2014-02-20 22:50:56 +0100 | [diff] [blame] | 597 | -c "client hello, adding session ticket extension" \ |
| 598 | -s "found session ticket extension" \ |
| 599 | -S "server hello, adding session ticket extension" \ |
| 600 | -C "found session_ticket extension" \ |
| 601 | -C "parse new session ticket" \ |
Manuel Pégourié-Gonnard | f7c5201 | 2014-02-20 11:43:46 +0100 | [diff] [blame] | 602 | -s "session successfully restored from cache" \ |
| 603 | -S "session successfully restored from ticket" \ |
| 604 | -s "a session has been resumed" \ |
| 605 | -c "a session has been resumed" |
| 606 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 607 | run_test "Session resume using cache: tickets enabled on server" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 608 | "$P_SRV debug_level=3 tickets=1" \ |
| 609 | "$P_CLI debug_level=3 tickets=0 reconnect=1" \ |
Manuel Pégourié-Gonnard | f7c5201 | 2014-02-20 11:43:46 +0100 | [diff] [blame] | 610 | 0 \ |
Manuel Pégourié-Gonnard | c55a5b7 | 2014-02-20 22:50:56 +0100 | [diff] [blame] | 611 | -C "client hello, adding session ticket extension" \ |
| 612 | -S "found session ticket extension" \ |
| 613 | -S "server hello, adding session ticket extension" \ |
| 614 | -C "found session_ticket extension" \ |
| 615 | -C "parse new session ticket" \ |
Manuel Pégourié-Gonnard | f7c5201 | 2014-02-20 11:43:46 +0100 | [diff] [blame] | 616 | -s "session successfully restored from cache" \ |
| 617 | -S "session successfully restored from ticket" \ |
| 618 | -s "a session has been resumed" \ |
| 619 | -c "a session has been resumed" |
Manuel Pégourié-Gonnard | de14378 | 2014-02-20 14:50:42 +0100 | [diff] [blame] | 620 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 621 | run_test "Session resume using cache: cache_max=0" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 622 | "$P_SRV debug_level=3 tickets=0 cache_max=0" \ |
| 623 | "$P_CLI debug_level=3 tickets=0 reconnect=1" \ |
Manuel Pégourié-Gonnard | 4c88345 | 2014-02-20 21:32:41 +0100 | [diff] [blame] | 624 | 0 \ |
| 625 | -S "session successfully restored from cache" \ |
| 626 | -S "session successfully restored from ticket" \ |
Manuel Pégourié-Gonnard | c55a5b7 | 2014-02-20 22:50:56 +0100 | [diff] [blame] | 627 | -S "a session has been resumed" \ |
| 628 | -C "a session has been resumed" |
Manuel Pégourié-Gonnard | 4c88345 | 2014-02-20 21:32:41 +0100 | [diff] [blame] | 629 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 630 | run_test "Session resume using cache: cache_max=1" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 631 | "$P_SRV debug_level=3 tickets=0 cache_max=1" \ |
| 632 | "$P_CLI debug_level=3 tickets=0 reconnect=1" \ |
Manuel Pégourié-Gonnard | c55a5b7 | 2014-02-20 22:50:56 +0100 | [diff] [blame] | 633 | 0 \ |
| 634 | -s "session successfully restored from cache" \ |
| 635 | -S "session successfully restored from ticket" \ |
| 636 | -s "a session has been resumed" \ |
| 637 | -c "a session has been resumed" |
| 638 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 639 | run_test "Session resume using cache: timemout > delay" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 640 | "$P_SRV debug_level=3 tickets=0" \ |
| 641 | "$P_CLI debug_level=3 tickets=0 reconnect=1 reco_delay=0" \ |
Manuel Pégourié-Gonnard | c55a5b7 | 2014-02-20 22:50:56 +0100 | [diff] [blame] | 642 | 0 \ |
| 643 | -s "session successfully restored from cache" \ |
| 644 | -S "session successfully restored from ticket" \ |
| 645 | -s "a session has been resumed" \ |
| 646 | -c "a session has been resumed" |
| 647 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 648 | run_test "Session resume using cache: timeout < delay" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 649 | "$P_SRV debug_level=3 tickets=0 cache_timeout=1" \ |
| 650 | "$P_CLI debug_level=3 tickets=0 reconnect=1 reco_delay=2" \ |
Manuel Pégourié-Gonnard | c55a5b7 | 2014-02-20 22:50:56 +0100 | [diff] [blame] | 651 | 0 \ |
| 652 | -S "session successfully restored from cache" \ |
| 653 | -S "session successfully restored from ticket" \ |
| 654 | -S "a session has been resumed" \ |
| 655 | -C "a session has been resumed" |
| 656 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 657 | run_test "Session resume using cache: no timeout" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 658 | "$P_SRV debug_level=3 tickets=0 cache_timeout=0" \ |
| 659 | "$P_CLI debug_level=3 tickets=0 reconnect=1 reco_delay=2" \ |
Manuel Pégourié-Gonnard | 4c88345 | 2014-02-20 21:32:41 +0100 | [diff] [blame] | 660 | 0 \ |
| 661 | -s "session successfully restored from cache" \ |
| 662 | -S "session successfully restored from ticket" \ |
| 663 | -s "a session has been resumed" \ |
| 664 | -c "a session has been resumed" |
| 665 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 666 | run_test "Session resume using cache: openssl client" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 667 | "$P_SRV debug_level=3 tickets=0" \ |
Manuel Pégourié-Gonnard | bc3b16c | 2014-05-28 23:06:50 +0200 | [diff] [blame] | 668 | "( $O_CLI -sess_out $SESSION; \ |
| 669 | $O_CLI -sess_in $SESSION; \ |
| 670 | rm -f $SESSION )" \ |
Manuel Pégourié-Gonnard | db735f6 | 2014-02-25 17:57:59 +0100 | [diff] [blame] | 671 | 0 \ |
| 672 | -s "found session ticket extension" \ |
| 673 | -S "server hello, adding session ticket extension" \ |
| 674 | -s "session successfully restored from cache" \ |
| 675 | -S "session successfully restored from ticket" \ |
| 676 | -s "a session has been resumed" |
| 677 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 678 | run_test "Session resume using cache: openssl server" \ |
Manuel Pégourié-Gonnard | f7a2690 | 2014-02-27 12:25:54 +0100 | [diff] [blame] | 679 | "$O_SRV" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 680 | "$P_CLI debug_level=3 tickets=0 reconnect=1" \ |
Manuel Pégourié-Gonnard | db735f6 | 2014-02-25 17:57:59 +0100 | [diff] [blame] | 681 | 0 \ |
| 682 | -C "found session_ticket extension" \ |
| 683 | -C "parse new session ticket" \ |
| 684 | -c "a session has been resumed" |
| 685 | |
Manuel Pégourié-Gonnard | 780d671 | 2014-02-20 17:19:59 +0100 | [diff] [blame] | 686 | # Tests for Max Fragment Length extension |
| 687 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 688 | run_test "Max fragment length: not used, reference" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 689 | "$P_SRV debug_level=3" \ |
| 690 | "$P_CLI debug_level=3" \ |
Manuel Pégourié-Gonnard | de14378 | 2014-02-20 14:50:42 +0100 | [diff] [blame] | 691 | 0 \ |
| 692 | -C "client hello, adding max_fragment_length extension" \ |
| 693 | -S "found max fragment length extension" \ |
| 694 | -S "server hello, max_fragment_length extension" \ |
| 695 | -C "found max_fragment_length extension" |
| 696 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 697 | run_test "Max fragment length: used by client" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 698 | "$P_SRV debug_level=3" \ |
| 699 | "$P_CLI debug_level=3 max_frag_len=4096" \ |
Manuel Pégourié-Gonnard | de14378 | 2014-02-20 14:50:42 +0100 | [diff] [blame] | 700 | 0 \ |
| 701 | -c "client hello, adding max_fragment_length extension" \ |
| 702 | -s "found max fragment length extension" \ |
| 703 | -s "server hello, max_fragment_length extension" \ |
| 704 | -c "found max_fragment_length extension" |
| 705 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 706 | run_test "Max fragment length: used by server" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 707 | "$P_SRV debug_level=3 max_frag_len=4096" \ |
| 708 | "$P_CLI debug_level=3" \ |
Manuel Pégourié-Gonnard | de14378 | 2014-02-20 14:50:42 +0100 | [diff] [blame] | 709 | 0 \ |
| 710 | -C "client hello, adding max_fragment_length extension" \ |
| 711 | -S "found max fragment length extension" \ |
| 712 | -S "server hello, max_fragment_length extension" \ |
| 713 | -C "found max_fragment_length extension" |
Manuel Pégourié-Gonnard | 780d671 | 2014-02-20 17:19:59 +0100 | [diff] [blame] | 714 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 715 | requires_gnutls |
| 716 | run_test "Max fragment length: gnutls server" \ |
Manuel Pégourié-Gonnard | baa7f07 | 2014-08-20 20:15:53 +0200 | [diff] [blame] | 717 | "$G_SRV" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 718 | "$P_CLI debug_level=3 max_frag_len=4096" \ |
Manuel Pégourié-Gonnard | baa7f07 | 2014-08-20 20:15:53 +0200 | [diff] [blame] | 719 | 0 \ |
| 720 | -c "client hello, adding max_fragment_length extension" \ |
| 721 | -c "found max_fragment_length extension" |
| 722 | |
Manuel Pégourié-Gonnard | 780d671 | 2014-02-20 17:19:59 +0100 | [diff] [blame] | 723 | # Tests for renegotiation |
| 724 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 725 | run_test "Renegotiation: none, for reference" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 726 | "$P_SRV debug_level=3 exchanges=2" \ |
| 727 | "$P_CLI debug_level=3 exchanges=2" \ |
Manuel Pégourié-Gonnard | 780d671 | 2014-02-20 17:19:59 +0100 | [diff] [blame] | 728 | 0 \ |
| 729 | -C "client hello, adding renegotiation extension" \ |
| 730 | -s "received TLS_EMPTY_RENEGOTIATION_INFO" \ |
| 731 | -S "found renegotiation extension" \ |
| 732 | -s "server hello, secure renegotiation extension" \ |
| 733 | -c "found renegotiation extension" \ |
Manuel Pégourié-Gonnard | c73339f | 2014-02-26 16:35:27 +0100 | [diff] [blame] | 734 | -C "=> renegotiate" \ |
| 735 | -S "=> renegotiate" \ |
Manuel Pégourié-Gonnard | 780d671 | 2014-02-20 17:19:59 +0100 | [diff] [blame] | 736 | -S "write hello request" |
| 737 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 738 | run_test "Renegotiation: client-initiated" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 739 | "$P_SRV debug_level=3 exchanges=2 renegotiation=1" \ |
| 740 | "$P_CLI debug_level=3 exchanges=2 renegotiation=1 renegotiate=1" \ |
Manuel Pégourié-Gonnard | 780d671 | 2014-02-20 17:19:59 +0100 | [diff] [blame] | 741 | 0 \ |
| 742 | -c "client hello, adding renegotiation extension" \ |
| 743 | -s "received TLS_EMPTY_RENEGOTIATION_INFO" \ |
| 744 | -s "found renegotiation extension" \ |
| 745 | -s "server hello, secure renegotiation extension" \ |
| 746 | -c "found renegotiation extension" \ |
Manuel Pégourié-Gonnard | c73339f | 2014-02-26 16:35:27 +0100 | [diff] [blame] | 747 | -c "=> renegotiate" \ |
| 748 | -s "=> renegotiate" \ |
Manuel Pégourié-Gonnard | 780d671 | 2014-02-20 17:19:59 +0100 | [diff] [blame] | 749 | -S "write hello request" |
| 750 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 751 | run_test "Renegotiation: server-initiated" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 752 | "$P_SRV debug_level=3 exchanges=2 renegotiation=1 renegotiate=1" \ |
| 753 | "$P_CLI debug_level=3 exchanges=2 renegotiation=1" \ |
Manuel Pégourié-Gonnard | 780d671 | 2014-02-20 17:19:59 +0100 | [diff] [blame] | 754 | 0 \ |
| 755 | -c "client hello, adding renegotiation extension" \ |
| 756 | -s "received TLS_EMPTY_RENEGOTIATION_INFO" \ |
| 757 | -s "found renegotiation extension" \ |
| 758 | -s "server hello, secure renegotiation extension" \ |
| 759 | -c "found renegotiation extension" \ |
Manuel Pégourié-Gonnard | c73339f | 2014-02-26 16:35:27 +0100 | [diff] [blame] | 760 | -c "=> renegotiate" \ |
| 761 | -s "=> renegotiate" \ |
Manuel Pégourié-Gonnard | 780d671 | 2014-02-20 17:19:59 +0100 | [diff] [blame] | 762 | -s "write hello request" |
| 763 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 764 | run_test "Renegotiation: double" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 765 | "$P_SRV debug_level=3 exchanges=2 renegotiation=1 renegotiate=1" \ |
| 766 | "$P_CLI debug_level=3 exchanges=2 renegotiation=1 renegotiate=1" \ |
Manuel Pégourié-Gonnard | 780d671 | 2014-02-20 17:19:59 +0100 | [diff] [blame] | 767 | 0 \ |
| 768 | -c "client hello, adding renegotiation extension" \ |
| 769 | -s "received TLS_EMPTY_RENEGOTIATION_INFO" \ |
| 770 | -s "found renegotiation extension" \ |
| 771 | -s "server hello, secure renegotiation extension" \ |
| 772 | -c "found renegotiation extension" \ |
Manuel Pégourié-Gonnard | c73339f | 2014-02-26 16:35:27 +0100 | [diff] [blame] | 773 | -c "=> renegotiate" \ |
| 774 | -s "=> renegotiate" \ |
Manuel Pégourié-Gonnard | 780d671 | 2014-02-20 17:19:59 +0100 | [diff] [blame] | 775 | -s "write hello request" |
| 776 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 777 | run_test "Renegotiation: client-initiated, server-rejected" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 778 | "$P_SRV debug_level=3 exchanges=2 renegotiation=0" \ |
| 779 | "$P_CLI debug_level=3 exchanges=2 renegotiation=1 renegotiate=1" \ |
Manuel Pégourié-Gonnard | 780d671 | 2014-02-20 17:19:59 +0100 | [diff] [blame] | 780 | 1 \ |
| 781 | -c "client hello, adding renegotiation extension" \ |
| 782 | -s "received TLS_EMPTY_RENEGOTIATION_INFO" \ |
| 783 | -S "found renegotiation extension" \ |
| 784 | -s "server hello, secure renegotiation extension" \ |
| 785 | -c "found renegotiation extension" \ |
Manuel Pégourié-Gonnard | c73339f | 2014-02-26 16:35:27 +0100 | [diff] [blame] | 786 | -c "=> renegotiate" \ |
| 787 | -S "=> renegotiate" \ |
Manuel Pégourié-Gonnard | fae355e | 2014-07-04 14:32:27 +0200 | [diff] [blame] | 788 | -S "write hello request" \ |
Manuel Pégourié-Gonnard | 6591962 | 2014-08-19 12:50:30 +0200 | [diff] [blame] | 789 | -c "SSL - Unexpected message at ServerHello in renegotiation" \ |
Manuel Pégourié-Gonnard | fae355e | 2014-07-04 14:32:27 +0200 | [diff] [blame] | 790 | -c "failed" |
Manuel Pégourié-Gonnard | 780d671 | 2014-02-20 17:19:59 +0100 | [diff] [blame] | 791 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 792 | run_test "Renegotiation: server-initiated, client-rejected, default" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 793 | "$P_SRV debug_level=3 exchanges=2 renegotiation=1 renegotiate=1" \ |
| 794 | "$P_CLI debug_level=3 exchanges=2 renegotiation=0" \ |
Manuel Pégourié-Gonnard | 780d671 | 2014-02-20 17:19:59 +0100 | [diff] [blame] | 795 | 0 \ |
| 796 | -C "client hello, adding renegotiation extension" \ |
| 797 | -s "received TLS_EMPTY_RENEGOTIATION_INFO" \ |
| 798 | -S "found renegotiation extension" \ |
| 799 | -s "server hello, secure renegotiation extension" \ |
| 800 | -c "found renegotiation extension" \ |
Manuel Pégourié-Gonnard | c73339f | 2014-02-26 16:35:27 +0100 | [diff] [blame] | 801 | -C "=> renegotiate" \ |
| 802 | -S "=> renegotiate" \ |
Manuel Pégourié-Gonnard | 780d671 | 2014-02-20 17:19:59 +0100 | [diff] [blame] | 803 | -s "write hello request" \ |
Manuel Pégourié-Gonnard | a9964db | 2014-07-03 19:29:16 +0200 | [diff] [blame] | 804 | -S "SSL - An unexpected message was received from our peer" \ |
| 805 | -S "failed" |
Manuel Pégourié-Gonnard | 33a752e | 2014-02-21 09:47:37 +0100 | [diff] [blame] | 806 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 807 | run_test "Renegotiation: server-initiated, client-rejected, not enforced" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 808 | "$P_SRV debug_level=3 exchanges=2 renegotiation=1 renegotiate=1 \ |
Manuel Pégourié-Gonnard | fae355e | 2014-07-04 14:32:27 +0200 | [diff] [blame] | 809 | renego_delay=-1" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 810 | "$P_CLI debug_level=3 exchanges=2 renegotiation=0" \ |
Manuel Pégourié-Gonnard | fae355e | 2014-07-04 14:32:27 +0200 | [diff] [blame] | 811 | 0 \ |
| 812 | -C "client hello, adding renegotiation extension" \ |
| 813 | -s "received TLS_EMPTY_RENEGOTIATION_INFO" \ |
| 814 | -S "found renegotiation extension" \ |
| 815 | -s "server hello, secure renegotiation extension" \ |
| 816 | -c "found renegotiation extension" \ |
| 817 | -C "=> renegotiate" \ |
| 818 | -S "=> renegotiate" \ |
| 819 | -s "write hello request" \ |
| 820 | -S "SSL - An unexpected message was received from our peer" \ |
| 821 | -S "failed" |
| 822 | |
Manuel Pégourié-Gonnard | a8c0a0d | 2014-08-15 12:07:38 +0200 | [diff] [blame] | 823 | # delay 2 for 1 alert record + 1 application data record |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 824 | run_test "Renegotiation: server-initiated, client-rejected, delay 2" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 825 | "$P_SRV debug_level=3 exchanges=2 renegotiation=1 renegotiate=1 \ |
Manuel Pégourié-Gonnard | a8c0a0d | 2014-08-15 12:07:38 +0200 | [diff] [blame] | 826 | renego_delay=2" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 827 | "$P_CLI debug_level=3 exchanges=2 renegotiation=0" \ |
Manuel Pégourié-Gonnard | fae355e | 2014-07-04 14:32:27 +0200 | [diff] [blame] | 828 | 0 \ |
| 829 | -C "client hello, adding renegotiation extension" \ |
| 830 | -s "received TLS_EMPTY_RENEGOTIATION_INFO" \ |
| 831 | -S "found renegotiation extension" \ |
| 832 | -s "server hello, secure renegotiation extension" \ |
| 833 | -c "found renegotiation extension" \ |
| 834 | -C "=> renegotiate" \ |
| 835 | -S "=> renegotiate" \ |
| 836 | -s "write hello request" \ |
| 837 | -S "SSL - An unexpected message was received from our peer" \ |
| 838 | -S "failed" |
| 839 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 840 | run_test "Renegotiation: server-initiated, client-rejected, delay 0" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 841 | "$P_SRV debug_level=3 exchanges=2 renegotiation=1 renegotiate=1 \ |
Manuel Pégourié-Gonnard | fae355e | 2014-07-04 14:32:27 +0200 | [diff] [blame] | 842 | renego_delay=0" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 843 | "$P_CLI debug_level=3 exchanges=2 renegotiation=0" \ |
Manuel Pégourié-Gonnard | fae355e | 2014-07-04 14:32:27 +0200 | [diff] [blame] | 844 | 0 \ |
| 845 | -C "client hello, adding renegotiation extension" \ |
| 846 | -s "received TLS_EMPTY_RENEGOTIATION_INFO" \ |
| 847 | -S "found renegotiation extension" \ |
| 848 | -s "server hello, secure renegotiation extension" \ |
| 849 | -c "found renegotiation extension" \ |
| 850 | -C "=> renegotiate" \ |
| 851 | -S "=> renegotiate" \ |
| 852 | -s "write hello request" \ |
Manuel Pégourié-Gonnard | a8c0a0d | 2014-08-15 12:07:38 +0200 | [diff] [blame] | 853 | -s "SSL - An unexpected message was received from our peer" |
Manuel Pégourié-Gonnard | fae355e | 2014-07-04 14:32:27 +0200 | [diff] [blame] | 854 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 855 | run_test "Renegotiation: server-initiated, client-accepted, delay 0" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 856 | "$P_SRV debug_level=3 exchanges=2 renegotiation=1 renegotiate=1 \ |
Manuel Pégourié-Gonnard | fae355e | 2014-07-04 14:32:27 +0200 | [diff] [blame] | 857 | renego_delay=0" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 858 | "$P_CLI debug_level=3 exchanges=2 renegotiation=1" \ |
Manuel Pégourié-Gonnard | fae355e | 2014-07-04 14:32:27 +0200 | [diff] [blame] | 859 | 0 \ |
| 860 | -c "client hello, adding renegotiation extension" \ |
| 861 | -s "received TLS_EMPTY_RENEGOTIATION_INFO" \ |
| 862 | -s "found renegotiation extension" \ |
| 863 | -s "server hello, secure renegotiation extension" \ |
| 864 | -c "found renegotiation extension" \ |
| 865 | -c "=> renegotiate" \ |
| 866 | -s "=> renegotiate" \ |
| 867 | -s "write hello request" \ |
| 868 | -S "SSL - An unexpected message was received from our peer" \ |
| 869 | -S "failed" |
| 870 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 871 | run_test "Renegotiation: nbio, client-initiated" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 872 | "$P_SRV debug_level=3 nbio=2 exchanges=2 renegotiation=1" \ |
| 873 | "$P_CLI debug_level=3 nbio=2 exchanges=2 renegotiation=1 renegotiate=1" \ |
Manuel Pégourié-Gonnard | f07f421 | 2014-08-15 19:04:47 +0200 | [diff] [blame] | 874 | 0 \ |
| 875 | -c "client hello, adding renegotiation extension" \ |
| 876 | -s "received TLS_EMPTY_RENEGOTIATION_INFO" \ |
| 877 | -s "found renegotiation extension" \ |
| 878 | -s "server hello, secure renegotiation extension" \ |
| 879 | -c "found renegotiation extension" \ |
| 880 | -c "=> renegotiate" \ |
| 881 | -s "=> renegotiate" \ |
| 882 | -S "write hello request" |
| 883 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 884 | run_test "Renegotiation: nbio, server-initiated" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 885 | "$P_SRV debug_level=3 nbio=2 exchanges=2 renegotiation=1 renegotiate=1" \ |
| 886 | "$P_CLI debug_level=3 nbio=2 exchanges=2 renegotiation=1" \ |
Manuel Pégourié-Gonnard | f07f421 | 2014-08-15 19:04:47 +0200 | [diff] [blame] | 887 | 0 \ |
| 888 | -c "client hello, adding renegotiation extension" \ |
| 889 | -s "received TLS_EMPTY_RENEGOTIATION_INFO" \ |
| 890 | -s "found renegotiation extension" \ |
| 891 | -s "server hello, secure renegotiation extension" \ |
| 892 | -c "found renegotiation extension" \ |
| 893 | -c "=> renegotiate" \ |
| 894 | -s "=> renegotiate" \ |
| 895 | -s "write hello request" |
| 896 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 897 | run_test "Renegotiation: openssl server, client-initiated" \ |
Manuel Pégourié-Gonnard | a775617 | 2014-08-31 18:37:01 +0200 | [diff] [blame] | 898 | "$O_SRV -www" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 899 | "$P_CLI debug_level=3 exchanges=1 renegotiation=1 renegotiate=1" \ |
Manuel Pégourié-Gonnard | 5136296 | 2014-08-30 21:22:47 +0200 | [diff] [blame] | 900 | 0 \ |
| 901 | -c "client hello, adding renegotiation extension" \ |
| 902 | -c "found renegotiation extension" \ |
| 903 | -c "=> renegotiate" \ |
| 904 | -C "ssl_handshake returned" \ |
| 905 | -C "error" \ |
| 906 | -c "HTTP/1.0 200 [Oo][Kk]" |
| 907 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 908 | run_test "Renegotiation: gnutls server, client-initiated" \ |
Manuel Pégourié-Gonnard | 5136296 | 2014-08-30 21:22:47 +0200 | [diff] [blame] | 909 | "$G_SRV" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 910 | "$P_CLI debug_level=3 exchanges=1 renegotiation=1 renegotiate=1" \ |
Manuel Pégourié-Gonnard | 5136296 | 2014-08-30 21:22:47 +0200 | [diff] [blame] | 911 | 0 \ |
| 912 | -c "client hello, adding renegotiation extension" \ |
| 913 | -c "found renegotiation extension" \ |
| 914 | -c "=> renegotiate" \ |
| 915 | -C "ssl_handshake returned" \ |
| 916 | -C "error" \ |
| 917 | -c "HTTP/1.0 200 [Oo][Kk]" |
| 918 | |
Manuel Pégourié-Gonnard | 30d16eb | 2014-08-19 17:43:50 +0200 | [diff] [blame] | 919 | run_test "Renegotiation: DTLS, client-initiated" \ |
| 920 | "$P_SRV debug_level=3 dtls=1 exchanges=2 renegotiation=1" \ |
| 921 | "$P_CLI debug_level=3 dtls=1 exchanges=2 renegotiation=1 renegotiate=1" \ |
| 922 | 0 \ |
| 923 | -c "client hello, adding renegotiation extension" \ |
| 924 | -s "received TLS_EMPTY_RENEGOTIATION_INFO" \ |
| 925 | -s "found renegotiation extension" \ |
| 926 | -s "server hello, secure renegotiation extension" \ |
| 927 | -c "found renegotiation extension" \ |
| 928 | -c "=> renegotiate" \ |
| 929 | -s "=> renegotiate" \ |
| 930 | -S "write hello request" |
| 931 | |
Manuel Pégourié-Gonnard | c392b24 | 2014-08-19 17:53:11 +0200 | [diff] [blame] | 932 | run_test "Renegotiation: DTLS, server-initiated" \ |
| 933 | "$P_SRV debug_level=3 dtls=1 exchanges=2 renegotiation=1 renegotiate=1" \ |
| 934 | "$P_CLI debug_level=3 dtls=1 exchanges=2 renegotiation=1" \ |
| 935 | 0 \ |
| 936 | -c "client hello, adding renegotiation extension" \ |
| 937 | -s "received TLS_EMPTY_RENEGOTIATION_INFO" \ |
| 938 | -s "found renegotiation extension" \ |
| 939 | -s "server hello, secure renegotiation extension" \ |
| 940 | -c "found renegotiation extension" \ |
| 941 | -c "=> renegotiate" \ |
| 942 | -s "=> renegotiate" \ |
| 943 | -s "write hello request" |
| 944 | |
Manuel Pégourié-Gonnard | f1499f6 | 2014-08-31 17:13:13 +0200 | [diff] [blame] | 945 | run_test "Renegotiation: DTLS, gnutls server, client-initiated" \ |
| 946 | "$G_SRV -u --mtu 4096" \ |
| 947 | "$P_CLI debug_level=3 dtls=1 exchanges=1 renegotiation=1 renegotiate=1" \ |
| 948 | 0 \ |
| 949 | -c "client hello, adding renegotiation extension" \ |
| 950 | -c "found renegotiation extension" \ |
| 951 | -c "=> renegotiate" \ |
| 952 | -C "ssl_handshake returned" \ |
| 953 | -C "error" \ |
| 954 | -s "Extra-header:" |
| 955 | |
Manuel Pégourié-Gonnard | 8520dac | 2014-02-21 12:12:23 +0100 | [diff] [blame] | 956 | # Tests for auth_mode |
| 957 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 958 | run_test "Authentication: server badcert, client required" \ |
Manuel Pégourié-Gonnard | c1da664 | 2014-02-25 14:18:30 +0100 | [diff] [blame] | 959 | "$P_SRV crt_file=data_files/server5-badsign.crt \ |
Manuel Pégourié-Gonnard | 8520dac | 2014-02-21 12:12:23 +0100 | [diff] [blame] | 960 | key_file=data_files/server5.key" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 961 | "$P_CLI debug_level=1 auth_mode=required" \ |
Manuel Pégourié-Gonnard | 8520dac | 2014-02-21 12:12:23 +0100 | [diff] [blame] | 962 | 1 \ |
| 963 | -c "x509_verify_cert() returned" \ |
| 964 | -c "! self-signed or not signed by a trusted CA" \ |
| 965 | -c "! ssl_handshake returned" \ |
| 966 | -c "X509 - Certificate verification failed" |
| 967 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 968 | run_test "Authentication: server badcert, client optional" \ |
Manuel Pégourié-Gonnard | c1da664 | 2014-02-25 14:18:30 +0100 | [diff] [blame] | 969 | "$P_SRV crt_file=data_files/server5-badsign.crt \ |
Manuel Pégourié-Gonnard | 8520dac | 2014-02-21 12:12:23 +0100 | [diff] [blame] | 970 | key_file=data_files/server5.key" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 971 | "$P_CLI debug_level=1 auth_mode=optional" \ |
Manuel Pégourié-Gonnard | 8520dac | 2014-02-21 12:12:23 +0100 | [diff] [blame] | 972 | 0 \ |
| 973 | -c "x509_verify_cert() returned" \ |
| 974 | -c "! self-signed or not signed by a trusted CA" \ |
| 975 | -C "! ssl_handshake returned" \ |
| 976 | -C "X509 - Certificate verification failed" |
| 977 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 978 | run_test "Authentication: server badcert, client none" \ |
Manuel Pégourié-Gonnard | c1da664 | 2014-02-25 14:18:30 +0100 | [diff] [blame] | 979 | "$P_SRV crt_file=data_files/server5-badsign.crt \ |
Manuel Pégourié-Gonnard | 8520dac | 2014-02-21 12:12:23 +0100 | [diff] [blame] | 980 | key_file=data_files/server5.key" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 981 | "$P_CLI debug_level=1 auth_mode=none" \ |
Manuel Pégourié-Gonnard | 8520dac | 2014-02-21 12:12:23 +0100 | [diff] [blame] | 982 | 0 \ |
| 983 | -C "x509_verify_cert() returned" \ |
| 984 | -C "! self-signed or not signed by a trusted CA" \ |
| 985 | -C "! ssl_handshake returned" \ |
| 986 | -C "X509 - Certificate verification failed" |
| 987 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 988 | run_test "Authentication: client badcert, server required" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 989 | "$P_SRV debug_level=3 auth_mode=required" \ |
| 990 | "$P_CLI debug_level=3 crt_file=data_files/server5-badsign.crt \ |
Manuel Pégourié-Gonnard | 8520dac | 2014-02-21 12:12:23 +0100 | [diff] [blame] | 991 | key_file=data_files/server5.key" \ |
| 992 | 1 \ |
| 993 | -S "skip write certificate request" \ |
| 994 | -C "skip parse certificate request" \ |
| 995 | -c "got a certificate request" \ |
| 996 | -C "skip write certificate" \ |
| 997 | -C "skip write certificate verify" \ |
| 998 | -S "skip parse certificate verify" \ |
| 999 | -s "x509_verify_cert() returned" \ |
| 1000 | -S "! self-signed or not signed by a trusted CA" \ |
| 1001 | -s "! ssl_handshake returned" \ |
| 1002 | -c "! ssl_handshake returned" \ |
| 1003 | -s "X509 - Certificate verification failed" |
| 1004 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1005 | run_test "Authentication: client badcert, server optional" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 1006 | "$P_SRV debug_level=3 auth_mode=optional" \ |
| 1007 | "$P_CLI debug_level=3 crt_file=data_files/server5-badsign.crt \ |
Manuel Pégourié-Gonnard | 8520dac | 2014-02-21 12:12:23 +0100 | [diff] [blame] | 1008 | key_file=data_files/server5.key" \ |
| 1009 | 0 \ |
| 1010 | -S "skip write certificate request" \ |
| 1011 | -C "skip parse certificate request" \ |
| 1012 | -c "got a certificate request" \ |
| 1013 | -C "skip write certificate" \ |
| 1014 | -C "skip write certificate verify" \ |
| 1015 | -S "skip parse certificate verify" \ |
| 1016 | -s "x509_verify_cert() returned" \ |
| 1017 | -s "! self-signed or not signed by a trusted CA" \ |
| 1018 | -S "! ssl_handshake returned" \ |
| 1019 | -C "! ssl_handshake returned" \ |
| 1020 | -S "X509 - Certificate verification failed" |
| 1021 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1022 | run_test "Authentication: client badcert, server none" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 1023 | "$P_SRV debug_level=3 auth_mode=none" \ |
| 1024 | "$P_CLI debug_level=3 crt_file=data_files/server5-badsign.crt \ |
Manuel Pégourié-Gonnard | 8520dac | 2014-02-21 12:12:23 +0100 | [diff] [blame] | 1025 | key_file=data_files/server5.key" \ |
| 1026 | 0 \ |
| 1027 | -s "skip write certificate request" \ |
| 1028 | -C "skip parse certificate request" \ |
| 1029 | -c "got no certificate request" \ |
| 1030 | -c "skip write certificate" \ |
| 1031 | -c "skip write certificate verify" \ |
| 1032 | -s "skip parse certificate verify" \ |
| 1033 | -S "x509_verify_cert() returned" \ |
| 1034 | -S "! self-signed or not signed by a trusted CA" \ |
| 1035 | -S "! ssl_handshake returned" \ |
| 1036 | -C "! ssl_handshake returned" \ |
| 1037 | -S "X509 - Certificate verification failed" |
| 1038 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1039 | run_test "Authentication: client no cert, server optional" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 1040 | "$P_SRV debug_level=3 auth_mode=optional" \ |
| 1041 | "$P_CLI debug_level=3 crt_file=none key_file=none" \ |
Manuel Pégourié-Gonnard | de515cc | 2014-02-27 14:58:26 +0100 | [diff] [blame] | 1042 | 0 \ |
| 1043 | -S "skip write certificate request" \ |
| 1044 | -C "skip parse certificate request" \ |
| 1045 | -c "got a certificate request" \ |
| 1046 | -C "skip write certificate$" \ |
| 1047 | -C "got no certificate to send" \ |
| 1048 | -S "SSLv3 client has no certificate" \ |
| 1049 | -c "skip write certificate verify" \ |
| 1050 | -s "skip parse certificate verify" \ |
| 1051 | -s "! no client certificate sent" \ |
| 1052 | -S "! ssl_handshake returned" \ |
| 1053 | -C "! ssl_handshake returned" \ |
| 1054 | -S "X509 - Certificate verification failed" |
| 1055 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1056 | run_test "Authentication: openssl client no cert, server optional" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 1057 | "$P_SRV debug_level=3 auth_mode=optional" \ |
Manuel Pégourié-Gonnard | de515cc | 2014-02-27 14:58:26 +0100 | [diff] [blame] | 1058 | "$O_CLI" \ |
| 1059 | 0 \ |
| 1060 | -S "skip write certificate request" \ |
| 1061 | -s "skip parse certificate verify" \ |
| 1062 | -s "! no client certificate sent" \ |
| 1063 | -S "! ssl_handshake returned" \ |
| 1064 | -S "X509 - Certificate verification failed" |
| 1065 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1066 | run_test "Authentication: client no cert, openssl server optional" \ |
Manuel Pégourié-Gonnard | de515cc | 2014-02-27 14:58:26 +0100 | [diff] [blame] | 1067 | "$O_SRV -verify 10" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 1068 | "$P_CLI debug_level=3 crt_file=none key_file=none" \ |
Manuel Pégourié-Gonnard | de515cc | 2014-02-27 14:58:26 +0100 | [diff] [blame] | 1069 | 0 \ |
| 1070 | -C "skip parse certificate request" \ |
| 1071 | -c "got a certificate request" \ |
| 1072 | -C "skip write certificate$" \ |
| 1073 | -c "skip write certificate verify" \ |
| 1074 | -C "! ssl_handshake returned" |
| 1075 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1076 | run_test "Authentication: client no cert, ssl3" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 1077 | "$P_SRV debug_level=3 auth_mode=optional force_version=ssl3" \ |
| 1078 | "$P_CLI debug_level=3 crt_file=none key_file=none" \ |
Manuel Pégourié-Gonnard | de515cc | 2014-02-27 14:58:26 +0100 | [diff] [blame] | 1079 | 0 \ |
| 1080 | -S "skip write certificate request" \ |
| 1081 | -C "skip parse certificate request" \ |
| 1082 | -c "got a certificate request" \ |
| 1083 | -C "skip write certificate$" \ |
| 1084 | -c "skip write certificate verify" \ |
| 1085 | -c "got no certificate to send" \ |
| 1086 | -s "SSLv3 client has no certificate" \ |
| 1087 | -s "skip parse certificate verify" \ |
| 1088 | -s "! no client certificate sent" \ |
| 1089 | -S "! ssl_handshake returned" \ |
| 1090 | -C "! ssl_handshake returned" \ |
| 1091 | -S "X509 - Certificate verification failed" |
| 1092 | |
Manuel Pégourié-Gonnard | 96ea2f2 | 2014-02-25 12:26:29 +0100 | [diff] [blame] | 1093 | # tests for SNI |
| 1094 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1095 | run_test "SNI: no SNI callback" \ |
Manuel Pégourié-Gonnard | 0eb6cab | 2014-07-23 20:17:47 +0200 | [diff] [blame] | 1096 | "$P_SRV debug_level=3 \ |
Manuel Pégourié-Gonnard | 96ea2f2 | 2014-02-25 12:26:29 +0100 | [diff] [blame] | 1097 | crt_file=data_files/server5.crt key_file=data_files/server5.key" \ |
Manuel Pégourié-Gonnard | 0eb6cab | 2014-07-23 20:17:47 +0200 | [diff] [blame] | 1098 | "$P_CLI server_name=localhost" \ |
Manuel Pégourié-Gonnard | 96ea2f2 | 2014-02-25 12:26:29 +0100 | [diff] [blame] | 1099 | 0 \ |
| 1100 | -S "parse ServerName extension" \ |
| 1101 | -c "issuer name *: C=NL, O=PolarSSL, CN=Polarssl Test EC CA" \ |
| 1102 | -c "subject name *: C=NL, O=PolarSSL, CN=localhost" |
| 1103 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1104 | run_test "SNI: matching cert 1" \ |
Manuel Pégourié-Gonnard | 0eb6cab | 2014-07-23 20:17:47 +0200 | [diff] [blame] | 1105 | "$P_SRV debug_level=3 \ |
Manuel Pégourié-Gonnard | 96ea2f2 | 2014-02-25 12:26:29 +0100 | [diff] [blame] | 1106 | crt_file=data_files/server5.crt key_file=data_files/server5.key \ |
Manuel Pégourié-Gonnard | 76b8ab7 | 2014-03-26 09:31:35 +0100 | [diff] [blame] | 1107 | sni=localhost,data_files/server2.crt,data_files/server2.key,polarssl.example,data_files/server1-nospace.crt,data_files/server1.key" \ |
Manuel Pégourié-Gonnard | 0eb6cab | 2014-07-23 20:17:47 +0200 | [diff] [blame] | 1108 | "$P_CLI server_name=localhost" \ |
Manuel Pégourié-Gonnard | 96ea2f2 | 2014-02-25 12:26:29 +0100 | [diff] [blame] | 1109 | 0 \ |
| 1110 | -s "parse ServerName extension" \ |
| 1111 | -c "issuer name *: C=NL, O=PolarSSL, CN=PolarSSL Test CA" \ |
| 1112 | -c "subject name *: C=NL, O=PolarSSL, CN=localhost" |
| 1113 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1114 | run_test "SNI: matching cert 2" \ |
Manuel Pégourié-Gonnard | 0eb6cab | 2014-07-23 20:17:47 +0200 | [diff] [blame] | 1115 | "$P_SRV debug_level=3 \ |
Manuel Pégourié-Gonnard | 96ea2f2 | 2014-02-25 12:26:29 +0100 | [diff] [blame] | 1116 | crt_file=data_files/server5.crt key_file=data_files/server5.key \ |
Manuel Pégourié-Gonnard | 76b8ab7 | 2014-03-26 09:31:35 +0100 | [diff] [blame] | 1117 | sni=localhost,data_files/server2.crt,data_files/server2.key,polarssl.example,data_files/server1-nospace.crt,data_files/server1.key" \ |
Manuel Pégourié-Gonnard | 0eb6cab | 2014-07-23 20:17:47 +0200 | [diff] [blame] | 1118 | "$P_CLI server_name=polarssl.example" \ |
Manuel Pégourié-Gonnard | 96ea2f2 | 2014-02-25 12:26:29 +0100 | [diff] [blame] | 1119 | 0 \ |
| 1120 | -s "parse ServerName extension" \ |
| 1121 | -c "issuer name *: C=NL, O=PolarSSL, CN=PolarSSL Test CA" \ |
Manuel Pégourié-Gonnard | 76b8ab7 | 2014-03-26 09:31:35 +0100 | [diff] [blame] | 1122 | -c "subject name *: C=NL, O=PolarSSL, CN=polarssl.example" |
Manuel Pégourié-Gonnard | 96ea2f2 | 2014-02-25 12:26:29 +0100 | [diff] [blame] | 1123 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1124 | run_test "SNI: no matching cert" \ |
Manuel Pégourié-Gonnard | 0eb6cab | 2014-07-23 20:17:47 +0200 | [diff] [blame] | 1125 | "$P_SRV debug_level=3 \ |
Manuel Pégourié-Gonnard | 96ea2f2 | 2014-02-25 12:26:29 +0100 | [diff] [blame] | 1126 | crt_file=data_files/server5.crt key_file=data_files/server5.key \ |
Manuel Pégourié-Gonnard | 76b8ab7 | 2014-03-26 09:31:35 +0100 | [diff] [blame] | 1127 | sni=localhost,data_files/server2.crt,data_files/server2.key,polarssl.example,data_files/server1-nospace.crt,data_files/server1.key" \ |
Manuel Pégourié-Gonnard | 0eb6cab | 2014-07-23 20:17:47 +0200 | [diff] [blame] | 1128 | "$P_CLI server_name=nonesuch.example" \ |
Manuel Pégourié-Gonnard | 96ea2f2 | 2014-02-25 12:26:29 +0100 | [diff] [blame] | 1129 | 1 \ |
| 1130 | -s "parse ServerName extension" \ |
| 1131 | -s "ssl_sni_wrapper() returned" \ |
| 1132 | -s "ssl_handshake returned" \ |
| 1133 | -c "ssl_handshake returned" \ |
| 1134 | -c "SSL - A fatal alert message was received from our peer" |
| 1135 | |
Manuel Pégourié-Gonnard | 0b6609b | 2014-02-26 14:45:12 +0100 | [diff] [blame] | 1136 | # Tests for non-blocking I/O: exercise a variety of handshake flows |
| 1137 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1138 | run_test "Non-blocking I/O: basic handshake" \ |
Manuel Pégourié-Gonnard | 0b6609b | 2014-02-26 14:45:12 +0100 | [diff] [blame] | 1139 | "$P_SRV nbio=2 tickets=0 auth_mode=none" \ |
| 1140 | "$P_CLI nbio=2 tickets=0" \ |
| 1141 | 0 \ |
| 1142 | -S "ssl_handshake returned" \ |
| 1143 | -C "ssl_handshake returned" \ |
| 1144 | -c "Read from server: .* bytes read" |
| 1145 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1146 | run_test "Non-blocking I/O: client auth" \ |
Manuel Pégourié-Gonnard | 0b6609b | 2014-02-26 14:45:12 +0100 | [diff] [blame] | 1147 | "$P_SRV nbio=2 tickets=0 auth_mode=required" \ |
| 1148 | "$P_CLI nbio=2 tickets=0" \ |
| 1149 | 0 \ |
| 1150 | -S "ssl_handshake returned" \ |
| 1151 | -C "ssl_handshake returned" \ |
| 1152 | -c "Read from server: .* bytes read" |
| 1153 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1154 | run_test "Non-blocking I/O: ticket" \ |
Manuel Pégourié-Gonnard | 0b6609b | 2014-02-26 14:45:12 +0100 | [diff] [blame] | 1155 | "$P_SRV nbio=2 tickets=1 auth_mode=none" \ |
| 1156 | "$P_CLI nbio=2 tickets=1" \ |
| 1157 | 0 \ |
| 1158 | -S "ssl_handshake returned" \ |
| 1159 | -C "ssl_handshake returned" \ |
| 1160 | -c "Read from server: .* bytes read" |
| 1161 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1162 | run_test "Non-blocking I/O: ticket + client auth" \ |
Manuel Pégourié-Gonnard | 0b6609b | 2014-02-26 14:45:12 +0100 | [diff] [blame] | 1163 | "$P_SRV nbio=2 tickets=1 auth_mode=required" \ |
| 1164 | "$P_CLI nbio=2 tickets=1" \ |
| 1165 | 0 \ |
| 1166 | -S "ssl_handshake returned" \ |
| 1167 | -C "ssl_handshake returned" \ |
| 1168 | -c "Read from server: .* bytes read" |
| 1169 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1170 | run_test "Non-blocking I/O: ticket + client auth + resume" \ |
Manuel Pégourié-Gonnard | 0b6609b | 2014-02-26 14:45:12 +0100 | [diff] [blame] | 1171 | "$P_SRV nbio=2 tickets=1 auth_mode=required" \ |
| 1172 | "$P_CLI nbio=2 tickets=1 reconnect=1" \ |
| 1173 | 0 \ |
| 1174 | -S "ssl_handshake returned" \ |
| 1175 | -C "ssl_handshake returned" \ |
| 1176 | -c "Read from server: .* bytes read" |
| 1177 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1178 | run_test "Non-blocking I/O: ticket + resume" \ |
Manuel Pégourié-Gonnard | 0b6609b | 2014-02-26 14:45:12 +0100 | [diff] [blame] | 1179 | "$P_SRV nbio=2 tickets=1 auth_mode=none" \ |
| 1180 | "$P_CLI nbio=2 tickets=1 reconnect=1" \ |
| 1181 | 0 \ |
| 1182 | -S "ssl_handshake returned" \ |
| 1183 | -C "ssl_handshake returned" \ |
| 1184 | -c "Read from server: .* bytes read" |
| 1185 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1186 | run_test "Non-blocking I/O: session-id resume" \ |
Manuel Pégourié-Gonnard | 0b6609b | 2014-02-26 14:45:12 +0100 | [diff] [blame] | 1187 | "$P_SRV nbio=2 tickets=0 auth_mode=none" \ |
| 1188 | "$P_CLI nbio=2 tickets=0 reconnect=1" \ |
| 1189 | 0 \ |
| 1190 | -S "ssl_handshake returned" \ |
| 1191 | -C "ssl_handshake returned" \ |
| 1192 | -c "Read from server: .* bytes read" |
| 1193 | |
Manuel Pégourié-Gonnard | f6521de | 2014-04-07 12:42:04 +0200 | [diff] [blame] | 1194 | # Tests for version negotiation |
| 1195 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1196 | run_test "Version check: all -> 1.2" \ |
Manuel Pégourié-Gonnard | a3d808e | 2014-02-26 16:33:03 +0100 | [diff] [blame] | 1197 | "$P_SRV" \ |
| 1198 | "$P_CLI" \ |
| 1199 | 0 \ |
| 1200 | -S "ssl_handshake returned" \ |
| 1201 | -C "ssl_handshake returned" \ |
| 1202 | -s "Protocol is TLSv1.2" \ |
| 1203 | -c "Protocol is TLSv1.2" |
| 1204 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1205 | run_test "Version check: cli max 1.1 -> 1.1" \ |
Manuel Pégourié-Gonnard | a3d808e | 2014-02-26 16:33:03 +0100 | [diff] [blame] | 1206 | "$P_SRV" \ |
| 1207 | "$P_CLI max_version=tls1_1" \ |
| 1208 | 0 \ |
| 1209 | -S "ssl_handshake returned" \ |
| 1210 | -C "ssl_handshake returned" \ |
| 1211 | -s "Protocol is TLSv1.1" \ |
| 1212 | -c "Protocol is TLSv1.1" |
| 1213 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1214 | run_test "Version check: srv max 1.1 -> 1.1" \ |
Manuel Pégourié-Gonnard | a3d808e | 2014-02-26 16:33:03 +0100 | [diff] [blame] | 1215 | "$P_SRV max_version=tls1_1" \ |
| 1216 | "$P_CLI" \ |
| 1217 | 0 \ |
| 1218 | -S "ssl_handshake returned" \ |
| 1219 | -C "ssl_handshake returned" \ |
| 1220 | -s "Protocol is TLSv1.1" \ |
| 1221 | -c "Protocol is TLSv1.1" |
| 1222 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1223 | run_test "Version check: cli+srv max 1.1 -> 1.1" \ |
Manuel Pégourié-Gonnard | a3d808e | 2014-02-26 16:33:03 +0100 | [diff] [blame] | 1224 | "$P_SRV max_version=tls1_1" \ |
| 1225 | "$P_CLI max_version=tls1_1" \ |
| 1226 | 0 \ |
| 1227 | -S "ssl_handshake returned" \ |
| 1228 | -C "ssl_handshake returned" \ |
| 1229 | -s "Protocol is TLSv1.1" \ |
| 1230 | -c "Protocol is TLSv1.1" |
| 1231 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1232 | run_test "Version check: cli max 1.1, srv min 1.1 -> 1.1" \ |
Manuel Pégourié-Gonnard | a3d808e | 2014-02-26 16:33:03 +0100 | [diff] [blame] | 1233 | "$P_SRV min_version=tls1_1" \ |
| 1234 | "$P_CLI max_version=tls1_1" \ |
| 1235 | 0 \ |
| 1236 | -S "ssl_handshake returned" \ |
| 1237 | -C "ssl_handshake returned" \ |
| 1238 | -s "Protocol is TLSv1.1" \ |
| 1239 | -c "Protocol is TLSv1.1" |
| 1240 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1241 | run_test "Version check: cli min 1.1, srv max 1.1 -> 1.1" \ |
Manuel Pégourié-Gonnard | a3d808e | 2014-02-26 16:33:03 +0100 | [diff] [blame] | 1242 | "$P_SRV max_version=tls1_1" \ |
| 1243 | "$P_CLI min_version=tls1_1" \ |
| 1244 | 0 \ |
| 1245 | -S "ssl_handshake returned" \ |
| 1246 | -C "ssl_handshake returned" \ |
| 1247 | -s "Protocol is TLSv1.1" \ |
| 1248 | -c "Protocol is TLSv1.1" |
| 1249 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1250 | run_test "Version check: cli min 1.2, srv max 1.1 -> fail" \ |
Manuel Pégourié-Gonnard | a3d808e | 2014-02-26 16:33:03 +0100 | [diff] [blame] | 1251 | "$P_SRV max_version=tls1_1" \ |
| 1252 | "$P_CLI min_version=tls1_2" \ |
| 1253 | 1 \ |
| 1254 | -s "ssl_handshake returned" \ |
| 1255 | -c "ssl_handshake returned" \ |
| 1256 | -c "SSL - Handshake protocol not within min/max boundaries" |
| 1257 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1258 | run_test "Version check: srv min 1.2, cli max 1.1 -> fail" \ |
Manuel Pégourié-Gonnard | a3d808e | 2014-02-26 16:33:03 +0100 | [diff] [blame] | 1259 | "$P_SRV min_version=tls1_2" \ |
| 1260 | "$P_CLI max_version=tls1_1" \ |
| 1261 | 1 \ |
| 1262 | -s "ssl_handshake returned" \ |
| 1263 | -c "ssl_handshake returned" \ |
| 1264 | -s "SSL - Handshake protocol not within min/max boundaries" |
| 1265 | |
Manuel Pégourié-Gonnard | f6521de | 2014-04-07 12:42:04 +0200 | [diff] [blame] | 1266 | # Tests for ALPN extension |
| 1267 | |
Manuel Pégourié-Gonnard | 83d8c73 | 2014-04-07 13:24:21 +0200 | [diff] [blame] | 1268 | if grep '^#define POLARSSL_SSL_ALPN' $CONFIG_H >/dev/null; then |
| 1269 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1270 | run_test "ALPN: none" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 1271 | "$P_SRV debug_level=3" \ |
| 1272 | "$P_CLI debug_level=3" \ |
Manuel Pégourié-Gonnard | f6521de | 2014-04-07 12:42:04 +0200 | [diff] [blame] | 1273 | 0 \ |
| 1274 | -C "client hello, adding alpn extension" \ |
| 1275 | -S "found alpn extension" \ |
| 1276 | -C "got an alert message, type: \\[2:120]" \ |
| 1277 | -S "server hello, adding alpn extension" \ |
| 1278 | -C "found alpn extension " \ |
| 1279 | -C "Application Layer Protocol is" \ |
| 1280 | -S "Application Layer Protocol is" |
| 1281 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1282 | run_test "ALPN: client only" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 1283 | "$P_SRV debug_level=3" \ |
| 1284 | "$P_CLI debug_level=3 alpn=abc,1234" \ |
Manuel Pégourié-Gonnard | f6521de | 2014-04-07 12:42:04 +0200 | [diff] [blame] | 1285 | 0 \ |
| 1286 | -c "client hello, adding alpn extension" \ |
| 1287 | -s "found alpn extension" \ |
| 1288 | -C "got an alert message, type: \\[2:120]" \ |
| 1289 | -S "server hello, adding alpn extension" \ |
| 1290 | -C "found alpn extension " \ |
| 1291 | -c "Application Layer Protocol is (none)" \ |
| 1292 | -S "Application Layer Protocol is" |
| 1293 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1294 | run_test "ALPN: server only" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 1295 | "$P_SRV debug_level=3 alpn=abc,1234" \ |
| 1296 | "$P_CLI debug_level=3" \ |
Manuel Pégourié-Gonnard | f6521de | 2014-04-07 12:42:04 +0200 | [diff] [blame] | 1297 | 0 \ |
| 1298 | -C "client hello, adding alpn extension" \ |
| 1299 | -S "found alpn extension" \ |
| 1300 | -C "got an alert message, type: \\[2:120]" \ |
| 1301 | -S "server hello, adding alpn extension" \ |
| 1302 | -C "found alpn extension " \ |
| 1303 | -C "Application Layer Protocol is" \ |
| 1304 | -s "Application Layer Protocol is (none)" |
| 1305 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1306 | run_test "ALPN: both, common cli1-srv1" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 1307 | "$P_SRV debug_level=3 alpn=abc,1234" \ |
| 1308 | "$P_CLI debug_level=3 alpn=abc,1234" \ |
Manuel Pégourié-Gonnard | f6521de | 2014-04-07 12:42:04 +0200 | [diff] [blame] | 1309 | 0 \ |
| 1310 | -c "client hello, adding alpn extension" \ |
| 1311 | -s "found alpn extension" \ |
| 1312 | -C "got an alert message, type: \\[2:120]" \ |
| 1313 | -s "server hello, adding alpn extension" \ |
| 1314 | -c "found alpn extension" \ |
| 1315 | -c "Application Layer Protocol is abc" \ |
| 1316 | -s "Application Layer Protocol is abc" |
| 1317 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1318 | run_test "ALPN: both, common cli2-srv1" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 1319 | "$P_SRV debug_level=3 alpn=abc,1234" \ |
| 1320 | "$P_CLI debug_level=3 alpn=1234,abc" \ |
Manuel Pégourié-Gonnard | f6521de | 2014-04-07 12:42:04 +0200 | [diff] [blame] | 1321 | 0 \ |
| 1322 | -c "client hello, adding alpn extension" \ |
| 1323 | -s "found alpn extension" \ |
| 1324 | -C "got an alert message, type: \\[2:120]" \ |
| 1325 | -s "server hello, adding alpn extension" \ |
| 1326 | -c "found alpn extension" \ |
| 1327 | -c "Application Layer Protocol is abc" \ |
| 1328 | -s "Application Layer Protocol is abc" |
| 1329 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1330 | run_test "ALPN: both, common cli1-srv2" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 1331 | "$P_SRV debug_level=3 alpn=abc,1234" \ |
| 1332 | "$P_CLI debug_level=3 alpn=1234,abcde" \ |
Manuel Pégourié-Gonnard | f6521de | 2014-04-07 12:42:04 +0200 | [diff] [blame] | 1333 | 0 \ |
| 1334 | -c "client hello, adding alpn extension" \ |
| 1335 | -s "found alpn extension" \ |
| 1336 | -C "got an alert message, type: \\[2:120]" \ |
| 1337 | -s "server hello, adding alpn extension" \ |
| 1338 | -c "found alpn extension" \ |
| 1339 | -c "Application Layer Protocol is 1234" \ |
| 1340 | -s "Application Layer Protocol is 1234" |
| 1341 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1342 | run_test "ALPN: both, no common" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 1343 | "$P_SRV debug_level=3 alpn=abc,123" \ |
| 1344 | "$P_CLI debug_level=3 alpn=1234,abcde" \ |
Manuel Pégourié-Gonnard | f6521de | 2014-04-07 12:42:04 +0200 | [diff] [blame] | 1345 | 1 \ |
| 1346 | -c "client hello, adding alpn extension" \ |
| 1347 | -s "found alpn extension" \ |
| 1348 | -c "got an alert message, type: \\[2:120]" \ |
| 1349 | -S "server hello, adding alpn extension" \ |
| 1350 | -C "found alpn extension" \ |
| 1351 | -C "Application Layer Protocol is 1234" \ |
| 1352 | -S "Application Layer Protocol is 1234" |
| 1353 | |
Manuel Pégourié-Gonnard | 83d8c73 | 2014-04-07 13:24:21 +0200 | [diff] [blame] | 1354 | fi |
| 1355 | |
Manuel Pégourié-Gonnard | 7f2a07d | 2014-04-09 09:50:57 +0200 | [diff] [blame] | 1356 | # Tests for keyUsage in leaf certificates, part 1: |
| 1357 | # server-side certificate/suite selection |
| 1358 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1359 | run_test "keyUsage srv: RSA, digitalSignature -> (EC)DHE-RSA" \ |
Manuel Pégourié-Gonnard | 7f2a07d | 2014-04-09 09:50:57 +0200 | [diff] [blame] | 1360 | "$P_SRV key_file=data_files/server2.key \ |
| 1361 | crt_file=data_files/server2.ku-ds.crt" \ |
| 1362 | "$P_CLI" \ |
| 1363 | 0 \ |
Manuel Pégourié-Gonnard | 17cde5f | 2014-05-22 14:42:39 +0200 | [diff] [blame] | 1364 | -c "Ciphersuite is TLS-[EC]*DHE-RSA-WITH-" |
Manuel Pégourié-Gonnard | 7f2a07d | 2014-04-09 09:50:57 +0200 | [diff] [blame] | 1365 | |
| 1366 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1367 | run_test "keyUsage srv: RSA, keyEncipherment -> RSA" \ |
Manuel Pégourié-Gonnard | 7f2a07d | 2014-04-09 09:50:57 +0200 | [diff] [blame] | 1368 | "$P_SRV key_file=data_files/server2.key \ |
| 1369 | crt_file=data_files/server2.ku-ke.crt" \ |
| 1370 | "$P_CLI" \ |
| 1371 | 0 \ |
| 1372 | -c "Ciphersuite is TLS-RSA-WITH-" |
| 1373 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1374 | run_test "keyUsage srv: RSA, keyAgreement -> fail" \ |
Manuel Pégourié-Gonnard | f2629b9 | 2014-08-30 14:20:14 +0200 | [diff] [blame] | 1375 | "$P_SRV key_file=data_files/server2.key \ |
Manuel Pégourié-Gonnard | 7f2a07d | 2014-04-09 09:50:57 +0200 | [diff] [blame] | 1376 | crt_file=data_files/server2.ku-ka.crt" \ |
Manuel Pégourié-Gonnard | f2629b9 | 2014-08-30 14:20:14 +0200 | [diff] [blame] | 1377 | "$P_CLI" \ |
Manuel Pégourié-Gonnard | 7f2a07d | 2014-04-09 09:50:57 +0200 | [diff] [blame] | 1378 | 1 \ |
| 1379 | -C "Ciphersuite is " |
| 1380 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1381 | run_test "keyUsage srv: ECDSA, digitalSignature -> ECDHE-ECDSA" \ |
Manuel Pégourié-Gonnard | 7f2a07d | 2014-04-09 09:50:57 +0200 | [diff] [blame] | 1382 | "$P_SRV key_file=data_files/server5.key \ |
| 1383 | crt_file=data_files/server5.ku-ds.crt" \ |
| 1384 | "$P_CLI" \ |
| 1385 | 0 \ |
| 1386 | -c "Ciphersuite is TLS-ECDHE-ECDSA-WITH-" |
| 1387 | |
| 1388 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1389 | run_test "keyUsage srv: ECDSA, keyAgreement -> ECDH-" \ |
Manuel Pégourié-Gonnard | 7f2a07d | 2014-04-09 09:50:57 +0200 | [diff] [blame] | 1390 | "$P_SRV key_file=data_files/server5.key \ |
| 1391 | crt_file=data_files/server5.ku-ka.crt" \ |
| 1392 | "$P_CLI" \ |
| 1393 | 0 \ |
| 1394 | -c "Ciphersuite is TLS-ECDH-" |
| 1395 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1396 | run_test "keyUsage srv: ECDSA, keyEncipherment -> fail" \ |
Manuel Pégourié-Gonnard | f2629b9 | 2014-08-30 14:20:14 +0200 | [diff] [blame] | 1397 | "$P_SRV key_file=data_files/server5.key \ |
Manuel Pégourié-Gonnard | 7f2a07d | 2014-04-09 09:50:57 +0200 | [diff] [blame] | 1398 | crt_file=data_files/server5.ku-ke.crt" \ |
Manuel Pégourié-Gonnard | f2629b9 | 2014-08-30 14:20:14 +0200 | [diff] [blame] | 1399 | "$P_CLI" \ |
Manuel Pégourié-Gonnard | 7f2a07d | 2014-04-09 09:50:57 +0200 | [diff] [blame] | 1400 | 1 \ |
| 1401 | -C "Ciphersuite is " |
| 1402 | |
| 1403 | # Tests for keyUsage in leaf certificates, part 2: |
Manuel Pégourié-Gonnard | a9db85d | 2014-04-09 14:53:05 +0200 | [diff] [blame] | 1404 | # client-side checking of server cert |
Manuel Pégourié-Gonnard | 7f2a07d | 2014-04-09 09:50:57 +0200 | [diff] [blame] | 1405 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1406 | run_test "keyUsage cli: DigitalSignature+KeyEncipherment, RSA: OK" \ |
Manuel Pégourié-Gonnard | 7f2a07d | 2014-04-09 09:50:57 +0200 | [diff] [blame] | 1407 | "$O_SRV -key data_files/server2.key \ |
| 1408 | -cert data_files/server2.ku-ds_ke.crt" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 1409 | "$P_CLI debug_level=1 \ |
Manuel Pégourié-Gonnard | 7f2a07d | 2014-04-09 09:50:57 +0200 | [diff] [blame] | 1410 | force_ciphersuite=TLS-RSA-WITH-AES-128-CBC-SHA" \ |
| 1411 | 0 \ |
Manuel Pégourié-Gonnard | a9db85d | 2014-04-09 14:53:05 +0200 | [diff] [blame] | 1412 | -C "bad certificate (usage extensions)" \ |
Manuel Pégourié-Gonnard | 7f2a07d | 2014-04-09 09:50:57 +0200 | [diff] [blame] | 1413 | -C "Processing of the Certificate handshake message failed" \ |
| 1414 | -c "Ciphersuite is TLS-" |
| 1415 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1416 | run_test "keyUsage cli: DigitalSignature+KeyEncipherment, DHE-RSA: OK" \ |
Manuel Pégourié-Gonnard | 7f2a07d | 2014-04-09 09:50:57 +0200 | [diff] [blame] | 1417 | "$O_SRV -key data_files/server2.key \ |
| 1418 | -cert data_files/server2.ku-ds_ke.crt" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 1419 | "$P_CLI debug_level=1 \ |
Manuel Pégourié-Gonnard | 7f2a07d | 2014-04-09 09:50:57 +0200 | [diff] [blame] | 1420 | force_ciphersuite=TLS-DHE-RSA-WITH-AES-128-CBC-SHA" \ |
| 1421 | 0 \ |
Manuel Pégourié-Gonnard | a9db85d | 2014-04-09 14:53:05 +0200 | [diff] [blame] | 1422 | -C "bad certificate (usage extensions)" \ |
Manuel Pégourié-Gonnard | 7f2a07d | 2014-04-09 09:50:57 +0200 | [diff] [blame] | 1423 | -C "Processing of the Certificate handshake message failed" \ |
| 1424 | -c "Ciphersuite is TLS-" |
| 1425 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1426 | run_test "keyUsage cli: KeyEncipherment, RSA: OK" \ |
Manuel Pégourié-Gonnard | 7f2a07d | 2014-04-09 09:50:57 +0200 | [diff] [blame] | 1427 | "$O_SRV -key data_files/server2.key \ |
| 1428 | -cert data_files/server2.ku-ke.crt" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 1429 | "$P_CLI debug_level=1 \ |
Manuel Pégourié-Gonnard | 7f2a07d | 2014-04-09 09:50:57 +0200 | [diff] [blame] | 1430 | force_ciphersuite=TLS-RSA-WITH-AES-128-CBC-SHA" \ |
| 1431 | 0 \ |
Manuel Pégourié-Gonnard | a9db85d | 2014-04-09 14:53:05 +0200 | [diff] [blame] | 1432 | -C "bad certificate (usage extensions)" \ |
Manuel Pégourié-Gonnard | 7f2a07d | 2014-04-09 09:50:57 +0200 | [diff] [blame] | 1433 | -C "Processing of the Certificate handshake message failed" \ |
| 1434 | -c "Ciphersuite is TLS-" |
| 1435 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1436 | run_test "keyUsage cli: KeyEncipherment, DHE-RSA: fail" \ |
Manuel Pégourié-Gonnard | 7f2a07d | 2014-04-09 09:50:57 +0200 | [diff] [blame] | 1437 | "$O_SRV -key data_files/server2.key \ |
| 1438 | -cert data_files/server2.ku-ke.crt" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 1439 | "$P_CLI debug_level=1 \ |
Manuel Pégourié-Gonnard | 7f2a07d | 2014-04-09 09:50:57 +0200 | [diff] [blame] | 1440 | force_ciphersuite=TLS-DHE-RSA-WITH-AES-128-CBC-SHA" \ |
| 1441 | 1 \ |
Manuel Pégourié-Gonnard | a9db85d | 2014-04-09 14:53:05 +0200 | [diff] [blame] | 1442 | -c "bad certificate (usage extensions)" \ |
Manuel Pégourié-Gonnard | 7f2a07d | 2014-04-09 09:50:57 +0200 | [diff] [blame] | 1443 | -c "Processing of the Certificate handshake message failed" \ |
| 1444 | -C "Ciphersuite is TLS-" |
| 1445 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1446 | run_test "keyUsage cli: DigitalSignature, DHE-RSA: OK" \ |
Manuel Pégourié-Gonnard | 7f2a07d | 2014-04-09 09:50:57 +0200 | [diff] [blame] | 1447 | "$O_SRV -key data_files/server2.key \ |
| 1448 | -cert data_files/server2.ku-ds.crt" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 1449 | "$P_CLI debug_level=1 \ |
Manuel Pégourié-Gonnard | 7f2a07d | 2014-04-09 09:50:57 +0200 | [diff] [blame] | 1450 | force_ciphersuite=TLS-DHE-RSA-WITH-AES-128-CBC-SHA" \ |
| 1451 | 0 \ |
Manuel Pégourié-Gonnard | a9db85d | 2014-04-09 14:53:05 +0200 | [diff] [blame] | 1452 | -C "bad certificate (usage extensions)" \ |
Manuel Pégourié-Gonnard | 7f2a07d | 2014-04-09 09:50:57 +0200 | [diff] [blame] | 1453 | -C "Processing of the Certificate handshake message failed" \ |
| 1454 | -c "Ciphersuite is TLS-" |
| 1455 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1456 | run_test "keyUsage cli: DigitalSignature, RSA: fail" \ |
Manuel Pégourié-Gonnard | 7f2a07d | 2014-04-09 09:50:57 +0200 | [diff] [blame] | 1457 | "$O_SRV -key data_files/server2.key \ |
| 1458 | -cert data_files/server2.ku-ds.crt" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 1459 | "$P_CLI debug_level=1 \ |
Manuel Pégourié-Gonnard | 7f2a07d | 2014-04-09 09:50:57 +0200 | [diff] [blame] | 1460 | force_ciphersuite=TLS-RSA-WITH-AES-128-CBC-SHA" \ |
| 1461 | 1 \ |
Manuel Pégourié-Gonnard | a9db85d | 2014-04-09 14:53:05 +0200 | [diff] [blame] | 1462 | -c "bad certificate (usage extensions)" \ |
Manuel Pégourié-Gonnard | 7f2a07d | 2014-04-09 09:50:57 +0200 | [diff] [blame] | 1463 | -c "Processing of the Certificate handshake message failed" \ |
| 1464 | -C "Ciphersuite is TLS-" |
| 1465 | |
Manuel Pégourié-Gonnard | a9db85d | 2014-04-09 14:53:05 +0200 | [diff] [blame] | 1466 | # Tests for keyUsage in leaf certificates, part 3: |
| 1467 | # server-side checking of client cert |
| 1468 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1469 | run_test "keyUsage cli-auth: RSA, DigitalSignature: OK" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 1470 | "$P_SRV debug_level=1 auth_mode=optional" \ |
Manuel Pégourié-Gonnard | a9db85d | 2014-04-09 14:53:05 +0200 | [diff] [blame] | 1471 | "$O_CLI -key data_files/server2.key \ |
| 1472 | -cert data_files/server2.ku-ds.crt" \ |
| 1473 | 0 \ |
| 1474 | -S "bad certificate (usage extensions)" \ |
| 1475 | -S "Processing of the Certificate handshake message failed" |
| 1476 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1477 | run_test "keyUsage cli-auth: RSA, KeyEncipherment: fail (soft)" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 1478 | "$P_SRV debug_level=1 auth_mode=optional" \ |
Manuel Pégourié-Gonnard | a9db85d | 2014-04-09 14:53:05 +0200 | [diff] [blame] | 1479 | "$O_CLI -key data_files/server2.key \ |
| 1480 | -cert data_files/server2.ku-ke.crt" \ |
| 1481 | 0 \ |
| 1482 | -s "bad certificate (usage extensions)" \ |
| 1483 | -S "Processing of the Certificate handshake message failed" |
| 1484 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1485 | run_test "keyUsage cli-auth: RSA, KeyEncipherment: fail (hard)" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 1486 | "$P_SRV debug_level=1 auth_mode=required" \ |
Manuel Pégourié-Gonnard | a9db85d | 2014-04-09 14:53:05 +0200 | [diff] [blame] | 1487 | "$O_CLI -key data_files/server2.key \ |
| 1488 | -cert data_files/server2.ku-ke.crt" \ |
| 1489 | 1 \ |
| 1490 | -s "bad certificate (usage extensions)" \ |
| 1491 | -s "Processing of the Certificate handshake message failed" |
| 1492 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1493 | run_test "keyUsage cli-auth: ECDSA, DigitalSignature: OK" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 1494 | "$P_SRV debug_level=1 auth_mode=optional" \ |
Manuel Pégourié-Gonnard | a9db85d | 2014-04-09 14:53:05 +0200 | [diff] [blame] | 1495 | "$O_CLI -key data_files/server5.key \ |
| 1496 | -cert data_files/server5.ku-ds.crt" \ |
| 1497 | 0 \ |
| 1498 | -S "bad certificate (usage extensions)" \ |
| 1499 | -S "Processing of the Certificate handshake message failed" |
| 1500 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1501 | run_test "keyUsage cli-auth: ECDSA, KeyAgreement: fail (soft)" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 1502 | "$P_SRV debug_level=1 auth_mode=optional" \ |
Manuel Pégourié-Gonnard | a9db85d | 2014-04-09 14:53:05 +0200 | [diff] [blame] | 1503 | "$O_CLI -key data_files/server5.key \ |
| 1504 | -cert data_files/server5.ku-ka.crt" \ |
| 1505 | 0 \ |
| 1506 | -s "bad certificate (usage extensions)" \ |
| 1507 | -S "Processing of the Certificate handshake message failed" |
| 1508 | |
Manuel Pégourié-Gonnard | 0408fd1 | 2014-04-11 11:06:22 +0200 | [diff] [blame] | 1509 | # Tests for extendedKeyUsage, part 1: server-side certificate/suite selection |
| 1510 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1511 | run_test "extKeyUsage srv: serverAuth -> OK" \ |
Manuel Pégourié-Gonnard | 0408fd1 | 2014-04-11 11:06:22 +0200 | [diff] [blame] | 1512 | "$P_SRV key_file=data_files/server5.key \ |
| 1513 | crt_file=data_files/server5.eku-srv.crt" \ |
| 1514 | "$P_CLI" \ |
| 1515 | 0 |
| 1516 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1517 | run_test "extKeyUsage srv: serverAuth,clientAuth -> OK" \ |
Manuel Pégourié-Gonnard | 0408fd1 | 2014-04-11 11:06:22 +0200 | [diff] [blame] | 1518 | "$P_SRV key_file=data_files/server5.key \ |
| 1519 | crt_file=data_files/server5.eku-srv.crt" \ |
| 1520 | "$P_CLI" \ |
| 1521 | 0 |
| 1522 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1523 | run_test "extKeyUsage srv: codeSign,anyEKU -> OK" \ |
Manuel Pégourié-Gonnard | 0408fd1 | 2014-04-11 11:06:22 +0200 | [diff] [blame] | 1524 | "$P_SRV key_file=data_files/server5.key \ |
| 1525 | crt_file=data_files/server5.eku-cs_any.crt" \ |
| 1526 | "$P_CLI" \ |
| 1527 | 0 |
| 1528 | |
| 1529 | # add psk to leave an option for client to send SERVERQUIT |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1530 | run_test "extKeyUsage srv: codeSign -> fail" \ |
Manuel Pégourié-Gonnard | 0408fd1 | 2014-04-11 11:06:22 +0200 | [diff] [blame] | 1531 | "$P_SRV psk=abc123 key_file=data_files/server5.key \ |
| 1532 | crt_file=data_files/server5.eku-cli.crt" \ |
| 1533 | "$P_CLI psk=badbad" \ |
| 1534 | 1 |
| 1535 | |
| 1536 | # Tests for extendedKeyUsage, part 2: client-side checking of server cert |
| 1537 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1538 | run_test "extKeyUsage cli: serverAuth -> OK" \ |
Manuel Pégourié-Gonnard | 0408fd1 | 2014-04-11 11:06:22 +0200 | [diff] [blame] | 1539 | "$O_SRV -key data_files/server5.key \ |
| 1540 | -cert data_files/server5.eku-srv.crt" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 1541 | "$P_CLI debug_level=1" \ |
Manuel Pégourié-Gonnard | 0408fd1 | 2014-04-11 11:06:22 +0200 | [diff] [blame] | 1542 | 0 \ |
| 1543 | -C "bad certificate (usage extensions)" \ |
| 1544 | -C "Processing of the Certificate handshake message failed" \ |
| 1545 | -c "Ciphersuite is TLS-" |
| 1546 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1547 | run_test "extKeyUsage cli: serverAuth,clientAuth -> OK" \ |
Manuel Pégourié-Gonnard | 0408fd1 | 2014-04-11 11:06:22 +0200 | [diff] [blame] | 1548 | "$O_SRV -key data_files/server5.key \ |
| 1549 | -cert data_files/server5.eku-srv_cli.crt" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 1550 | "$P_CLI debug_level=1" \ |
Manuel Pégourié-Gonnard | 0408fd1 | 2014-04-11 11:06:22 +0200 | [diff] [blame] | 1551 | 0 \ |
| 1552 | -C "bad certificate (usage extensions)" \ |
| 1553 | -C "Processing of the Certificate handshake message failed" \ |
| 1554 | -c "Ciphersuite is TLS-" |
| 1555 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1556 | run_test "extKeyUsage cli: codeSign,anyEKU -> OK" \ |
Manuel Pégourié-Gonnard | 0408fd1 | 2014-04-11 11:06:22 +0200 | [diff] [blame] | 1557 | "$O_SRV -key data_files/server5.key \ |
| 1558 | -cert data_files/server5.eku-cs_any.crt" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 1559 | "$P_CLI debug_level=1" \ |
Manuel Pégourié-Gonnard | 0408fd1 | 2014-04-11 11:06:22 +0200 | [diff] [blame] | 1560 | 0 \ |
| 1561 | -C "bad certificate (usage extensions)" \ |
| 1562 | -C "Processing of the Certificate handshake message failed" \ |
| 1563 | -c "Ciphersuite is TLS-" |
| 1564 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1565 | run_test "extKeyUsage cli: codeSign -> fail" \ |
Manuel Pégourié-Gonnard | 0408fd1 | 2014-04-11 11:06:22 +0200 | [diff] [blame] | 1566 | "$O_SRV -key data_files/server5.key \ |
| 1567 | -cert data_files/server5.eku-cs.crt" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 1568 | "$P_CLI debug_level=1" \ |
Manuel Pégourié-Gonnard | 0408fd1 | 2014-04-11 11:06:22 +0200 | [diff] [blame] | 1569 | 1 \ |
| 1570 | -c "bad certificate (usage extensions)" \ |
| 1571 | -c "Processing of the Certificate handshake message failed" \ |
| 1572 | -C "Ciphersuite is TLS-" |
| 1573 | |
| 1574 | # Tests for extendedKeyUsage, part 3: server-side checking of client cert |
| 1575 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1576 | run_test "extKeyUsage cli-auth: clientAuth -> OK" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 1577 | "$P_SRV debug_level=1 auth_mode=optional" \ |
Manuel Pégourié-Gonnard | 0408fd1 | 2014-04-11 11:06:22 +0200 | [diff] [blame] | 1578 | "$O_CLI -key data_files/server5.key \ |
| 1579 | -cert data_files/server5.eku-cli.crt" \ |
| 1580 | 0 \ |
| 1581 | -S "bad certificate (usage extensions)" \ |
| 1582 | -S "Processing of the Certificate handshake message failed" |
| 1583 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1584 | run_test "extKeyUsage cli-auth: serverAuth,clientAuth -> OK" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 1585 | "$P_SRV debug_level=1 auth_mode=optional" \ |
Manuel Pégourié-Gonnard | 0408fd1 | 2014-04-11 11:06:22 +0200 | [diff] [blame] | 1586 | "$O_CLI -key data_files/server5.key \ |
| 1587 | -cert data_files/server5.eku-srv_cli.crt" \ |
| 1588 | 0 \ |
| 1589 | -S "bad certificate (usage extensions)" \ |
| 1590 | -S "Processing of the Certificate handshake message failed" |
| 1591 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1592 | run_test "extKeyUsage cli-auth: codeSign,anyEKU -> OK" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 1593 | "$P_SRV debug_level=1 auth_mode=optional" \ |
Manuel Pégourié-Gonnard | 0408fd1 | 2014-04-11 11:06:22 +0200 | [diff] [blame] | 1594 | "$O_CLI -key data_files/server5.key \ |
| 1595 | -cert data_files/server5.eku-cs_any.crt" \ |
| 1596 | 0 \ |
| 1597 | -S "bad certificate (usage extensions)" \ |
| 1598 | -S "Processing of the Certificate handshake message failed" |
| 1599 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1600 | run_test "extKeyUsage cli-auth: codeSign -> fail (soft)" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 1601 | "$P_SRV debug_level=1 auth_mode=optional" \ |
Manuel Pégourié-Gonnard | 0408fd1 | 2014-04-11 11:06:22 +0200 | [diff] [blame] | 1602 | "$O_CLI -key data_files/server5.key \ |
| 1603 | -cert data_files/server5.eku-cs.crt" \ |
| 1604 | 0 \ |
| 1605 | -s "bad certificate (usage extensions)" \ |
| 1606 | -S "Processing of the Certificate handshake message failed" |
| 1607 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1608 | run_test "extKeyUsage cli-auth: codeSign -> fail (hard)" \ |
Manuel Pégourié-Gonnard | 644e8f3 | 2014-08-30 21:59:31 +0200 | [diff] [blame] | 1609 | "$P_SRV debug_level=1 auth_mode=required" \ |
Manuel Pégourié-Gonnard | 0408fd1 | 2014-04-11 11:06:22 +0200 | [diff] [blame] | 1610 | "$O_CLI -key data_files/server5.key \ |
| 1611 | -cert data_files/server5.eku-cs.crt" \ |
| 1612 | 1 \ |
| 1613 | -s "bad certificate (usage extensions)" \ |
| 1614 | -s "Processing of the Certificate handshake message failed" |
| 1615 | |
Manuel Pégourié-Gonnard | 0cc7e31 | 2014-06-09 11:36:47 +0200 | [diff] [blame] | 1616 | # Tests for DHM parameters loading |
| 1617 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1618 | run_test "DHM parameters: reference" \ |
Manuel Pégourié-Gonnard | 0cc7e31 | 2014-06-09 11:36:47 +0200 | [diff] [blame] | 1619 | "$P_SRV" \ |
| 1620 | "$P_CLI force_ciphersuite=TLS-DHE-RSA-WITH-AES-128-CBC-SHA \ |
| 1621 | debug_level=3" \ |
| 1622 | 0 \ |
| 1623 | -c "value of 'DHM: P ' (2048 bits)" \ |
| 1624 | -c "value of 'DHM: G ' (2048 bits)" |
| 1625 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1626 | run_test "DHM parameters: other parameters" \ |
Manuel Pégourié-Gonnard | 0cc7e31 | 2014-06-09 11:36:47 +0200 | [diff] [blame] | 1627 | "$P_SRV dhm_file=data_files/dhparams.pem" \ |
| 1628 | "$P_CLI force_ciphersuite=TLS-DHE-RSA-WITH-AES-128-CBC-SHA \ |
| 1629 | debug_level=3" \ |
| 1630 | 0 \ |
| 1631 | -c "value of 'DHM: P ' (1024 bits)" \ |
| 1632 | -c "value of 'DHM: G ' (2 bits)" |
| 1633 | |
Manuel Pégourié-Gonnard | a6781c9 | 2014-06-10 15:00:46 +0200 | [diff] [blame] | 1634 | # Tests for PSK callback |
| 1635 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1636 | run_test "PSK callback: psk, no callback" \ |
Manuel Pégourié-Gonnard | a6781c9 | 2014-06-10 15:00:46 +0200 | [diff] [blame] | 1637 | "$P_SRV psk=abc123 psk_identity=foo" \ |
| 1638 | "$P_CLI force_ciphersuite=TLS-PSK-WITH-AES-128-CBC-SHA \ |
| 1639 | psk_identity=foo psk=abc123" \ |
| 1640 | 0 \ |
Manuel Pégourié-Gonnard | 10c3c9f | 2014-06-10 15:28:52 +0200 | [diff] [blame] | 1641 | -S "SSL - The server has no ciphersuites in common" \ |
| 1642 | -S "SSL - Unknown identity received" \ |
| 1643 | -S "SSL - Verification of the message MAC failed" |
| 1644 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1645 | run_test "PSK callback: no psk, no callback" \ |
Manuel Pégourié-Gonnard | 10c3c9f | 2014-06-10 15:28:52 +0200 | [diff] [blame] | 1646 | "$P_SRV" \ |
| 1647 | "$P_CLI force_ciphersuite=TLS-PSK-WITH-AES-128-CBC-SHA \ |
| 1648 | psk_identity=foo psk=abc123" \ |
| 1649 | 1 \ |
| 1650 | -s "SSL - The server has no ciphersuites in common" \ |
Manuel Pégourié-Gonnard | a6781c9 | 2014-06-10 15:00:46 +0200 | [diff] [blame] | 1651 | -S "SSL - Unknown identity received" \ |
| 1652 | -S "SSL - Verification of the message MAC failed" |
| 1653 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1654 | run_test "PSK callback: callback overrides other settings" \ |
Manuel Pégourié-Gonnard | a6781c9 | 2014-06-10 15:00:46 +0200 | [diff] [blame] | 1655 | "$P_SRV psk=abc123 psk_identity=foo psk_list=abc,dead,def,beef" \ |
| 1656 | "$P_CLI force_ciphersuite=TLS-PSK-WITH-AES-128-CBC-SHA \ |
| 1657 | psk_identity=foo psk=abc123" \ |
| 1658 | 1 \ |
Manuel Pégourié-Gonnard | 10c3c9f | 2014-06-10 15:28:52 +0200 | [diff] [blame] | 1659 | -S "SSL - The server has no ciphersuites in common" \ |
Manuel Pégourié-Gonnard | a6781c9 | 2014-06-10 15:00:46 +0200 | [diff] [blame] | 1660 | -s "SSL - Unknown identity received" \ |
| 1661 | -S "SSL - Verification of the message MAC failed" |
| 1662 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1663 | run_test "PSK callback: first id matches" \ |
Manuel Pégourié-Gonnard | a6781c9 | 2014-06-10 15:00:46 +0200 | [diff] [blame] | 1664 | "$P_SRV psk_list=abc,dead,def,beef" \ |
| 1665 | "$P_CLI force_ciphersuite=TLS-PSK-WITH-AES-128-CBC-SHA \ |
| 1666 | psk_identity=abc psk=dead" \ |
| 1667 | 0 \ |
Manuel Pégourié-Gonnard | 10c3c9f | 2014-06-10 15:28:52 +0200 | [diff] [blame] | 1668 | -S "SSL - The server has no ciphersuites in common" \ |
Manuel Pégourié-Gonnard | a6781c9 | 2014-06-10 15:00:46 +0200 | [diff] [blame] | 1669 | -S "SSL - Unknown identity received" \ |
| 1670 | -S "SSL - Verification of the message MAC failed" |
| 1671 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1672 | run_test "PSK callback: second id matches" \ |
Manuel Pégourié-Gonnard | a6781c9 | 2014-06-10 15:00:46 +0200 | [diff] [blame] | 1673 | "$P_SRV psk_list=abc,dead,def,beef" \ |
| 1674 | "$P_CLI force_ciphersuite=TLS-PSK-WITH-AES-128-CBC-SHA \ |
| 1675 | psk_identity=def psk=beef" \ |
| 1676 | 0 \ |
Manuel Pégourié-Gonnard | 10c3c9f | 2014-06-10 15:28:52 +0200 | [diff] [blame] | 1677 | -S "SSL - The server has no ciphersuites in common" \ |
Manuel Pégourié-Gonnard | a6781c9 | 2014-06-10 15:00:46 +0200 | [diff] [blame] | 1678 | -S "SSL - Unknown identity received" \ |
| 1679 | -S "SSL - Verification of the message MAC failed" |
| 1680 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1681 | run_test "PSK callback: no match" \ |
Manuel Pégourié-Gonnard | a6781c9 | 2014-06-10 15:00:46 +0200 | [diff] [blame] | 1682 | "$P_SRV psk_list=abc,dead,def,beef" \ |
| 1683 | "$P_CLI force_ciphersuite=TLS-PSK-WITH-AES-128-CBC-SHA \ |
| 1684 | psk_identity=ghi psk=beef" \ |
| 1685 | 1 \ |
Manuel Pégourié-Gonnard | 10c3c9f | 2014-06-10 15:28:52 +0200 | [diff] [blame] | 1686 | -S "SSL - The server has no ciphersuites in common" \ |
Manuel Pégourié-Gonnard | a6781c9 | 2014-06-10 15:00:46 +0200 | [diff] [blame] | 1687 | -s "SSL - Unknown identity received" \ |
| 1688 | -S "SSL - Verification of the message MAC failed" |
| 1689 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1690 | run_test "PSK callback: wrong key" \ |
Manuel Pégourié-Gonnard | a6781c9 | 2014-06-10 15:00:46 +0200 | [diff] [blame] | 1691 | "$P_SRV psk_list=abc,dead,def,beef" \ |
| 1692 | "$P_CLI force_ciphersuite=TLS-PSK-WITH-AES-128-CBC-SHA \ |
| 1693 | psk_identity=abc psk=beef" \ |
| 1694 | 1 \ |
Manuel Pégourié-Gonnard | 10c3c9f | 2014-06-10 15:28:52 +0200 | [diff] [blame] | 1695 | -S "SSL - The server has no ciphersuites in common" \ |
Manuel Pégourié-Gonnard | a6781c9 | 2014-06-10 15:00:46 +0200 | [diff] [blame] | 1696 | -S "SSL - Unknown identity received" \ |
| 1697 | -s "SSL - Verification of the message MAC failed" |
Manuel Pégourié-Gonnard | 0cc7e31 | 2014-06-09 11:36:47 +0200 | [diff] [blame] | 1698 | |
Manuel Pégourié-Gonnard | 90805a8 | 2014-06-11 14:06:01 +0200 | [diff] [blame] | 1699 | # Tests for ciphersuites per version |
| 1700 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1701 | run_test "Per-version suites: SSL3" \ |
Manuel Pégourié-Gonnard | 90805a8 | 2014-06-11 14:06:01 +0200 | [diff] [blame] | 1702 | "$P_SRV version_suites=TLS-RSA-WITH-3DES-EDE-CBC-SHA,TLS-RSA-WITH-RC4-128-SHA,TLS-RSA-WITH-AES-128-CBC-SHA,TLS-RSA-WITH-AES-128-GCM-SHA256" \ |
| 1703 | "$P_CLI force_version=ssl3" \ |
| 1704 | 0 \ |
| 1705 | -c "Ciphersuite is TLS-RSA-WITH-3DES-EDE-CBC-SHA" |
| 1706 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1707 | run_test "Per-version suites: TLS 1.0" \ |
Manuel Pégourié-Gonnard | 90805a8 | 2014-06-11 14:06:01 +0200 | [diff] [blame] | 1708 | "$P_SRV version_suites=TLS-RSA-WITH-3DES-EDE-CBC-SHA,TLS-RSA-WITH-RC4-128-SHA,TLS-RSA-WITH-AES-128-CBC-SHA,TLS-RSA-WITH-AES-128-GCM-SHA256" \ |
| 1709 | "$P_CLI force_version=tls1" \ |
| 1710 | 0 \ |
| 1711 | -c "Ciphersuite is TLS-RSA-WITH-RC4-128-SHA" |
| 1712 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1713 | run_test "Per-version suites: TLS 1.1" \ |
Manuel Pégourié-Gonnard | 90805a8 | 2014-06-11 14:06:01 +0200 | [diff] [blame] | 1714 | "$P_SRV version_suites=TLS-RSA-WITH-3DES-EDE-CBC-SHA,TLS-RSA-WITH-RC4-128-SHA,TLS-RSA-WITH-AES-128-CBC-SHA,TLS-RSA-WITH-AES-128-GCM-SHA256" \ |
| 1715 | "$P_CLI force_version=tls1_1" \ |
| 1716 | 0 \ |
| 1717 | -c "Ciphersuite is TLS-RSA-WITH-AES-128-CBC-SHA" |
| 1718 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1719 | run_test "Per-version suites: TLS 1.2" \ |
Manuel Pégourié-Gonnard | 90805a8 | 2014-06-11 14:06:01 +0200 | [diff] [blame] | 1720 | "$P_SRV version_suites=TLS-RSA-WITH-3DES-EDE-CBC-SHA,TLS-RSA-WITH-RC4-128-SHA,TLS-RSA-WITH-AES-128-CBC-SHA,TLS-RSA-WITH-AES-128-GCM-SHA256" \ |
| 1721 | "$P_CLI force_version=tls1_2" \ |
| 1722 | 0 \ |
| 1723 | -c "Ciphersuite is TLS-RSA-WITH-AES-128-GCM-SHA256" |
| 1724 | |
Manuel Pégourié-Gonnard | 95c0a63 | 2014-06-11 18:32:36 +0200 | [diff] [blame] | 1725 | # Tests for ssl_get_bytes_avail() |
| 1726 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1727 | run_test "ssl_get_bytes_avail: no extra data" \ |
Manuel Pégourié-Gonnard | 95c0a63 | 2014-06-11 18:32:36 +0200 | [diff] [blame] | 1728 | "$P_SRV" \ |
| 1729 | "$P_CLI request_size=100" \ |
| 1730 | 0 \ |
| 1731 | -s "Read from client: 100 bytes read$" |
| 1732 | |
Manuel Pégourié-Gonnard | 8e03c71 | 2014-08-30 21:42:40 +0200 | [diff] [blame] | 1733 | run_test "ssl_get_bytes_avail: extra data" \ |
Manuel Pégourié-Gonnard | 95c0a63 | 2014-06-11 18:32:36 +0200 | [diff] [blame] | 1734 | "$P_SRV" \ |
| 1735 | "$P_CLI request_size=500" \ |
| 1736 | 0 \ |
| 1737 | -s "Read from client: 500 bytes read (.*+.*)" |
Manuel Pégourié-Gonnard | 90805a8 | 2014-06-11 14:06:01 +0200 | [diff] [blame] | 1738 | |
Manuel Pégourié-Gonnard | ee41503 | 2014-06-18 15:08:56 +0200 | [diff] [blame] | 1739 | # Tests for small packets |
| 1740 | |
| 1741 | run_test "Small packet SSLv3 BlockCipher" \ |
| 1742 | "$P_SRV" \ |
| 1743 | "$P_CLI request_size=1 force_version=ssl3 \ |
| 1744 | force_ciphersuite=TLS-RSA-WITH-AES-256-CBC-SHA" \ |
| 1745 | 0 \ |
| 1746 | -s "Read from client: 1 bytes read" |
| 1747 | |
| 1748 | run_test "Small packet SSLv3 StreamCipher" \ |
| 1749 | "$P_SRV" \ |
| 1750 | "$P_CLI request_size=1 force_version=ssl3 \ |
| 1751 | force_ciphersuite=TLS-RSA-WITH-RC4-128-SHA" \ |
| 1752 | 0 \ |
| 1753 | -s "Read from client: 1 bytes read" |
| 1754 | |
| 1755 | run_test "Small packet TLS 1.0 BlockCipher" \ |
| 1756 | "$P_SRV" \ |
| 1757 | "$P_CLI request_size=1 force_version=tls1 \ |
| 1758 | force_ciphersuite=TLS-RSA-WITH-AES-256-CBC-SHA" \ |
| 1759 | 0 \ |
| 1760 | -s "Read from client: 1 bytes read" |
| 1761 | |
| 1762 | run_test "Small packet TLS 1.0 BlockCipher truncated MAC" \ |
| 1763 | "$P_SRV" \ |
| 1764 | "$P_CLI request_size=1 force_version=tls1 \ |
| 1765 | force_ciphersuite=TLS-RSA-WITH-AES-256-CBC-SHA \ |
| 1766 | trunc_hmac=1" \ |
| 1767 | 0 \ |
| 1768 | -s "Read from client: 1 bytes read" |
| 1769 | |
| 1770 | run_test "Small packet TLS 1.0 StreamCipher truncated MAC" \ |
| 1771 | "$P_SRV" \ |
| 1772 | "$P_CLI request_size=1 force_version=tls1 \ |
| 1773 | force_ciphersuite=TLS-RSA-WITH-RC4-128-SHA \ |
| 1774 | trunc_hmac=1" \ |
| 1775 | 0 \ |
| 1776 | -s "Read from client: 1 bytes read" |
| 1777 | |
| 1778 | run_test "Small packet TLS 1.1 BlockCipher" \ |
| 1779 | "$P_SRV" \ |
| 1780 | "$P_CLI request_size=1 force_version=tls1_1 \ |
| 1781 | force_ciphersuite=TLS-RSA-WITH-AES-256-CBC-SHA" \ |
| 1782 | 0 \ |
| 1783 | -s "Read from client: 1 bytes read" |
| 1784 | |
| 1785 | run_test "Small packet TLS 1.1 StreamCipher" \ |
| 1786 | "$P_SRV" \ |
| 1787 | "$P_CLI request_size=1 force_version=tls1_1 \ |
| 1788 | force_ciphersuite=TLS-RSA-WITH-RC4-128-SHA" \ |
| 1789 | 0 \ |
| 1790 | -s "Read from client: 1 bytes read" |
| 1791 | |
| 1792 | run_test "Small packet TLS 1.1 BlockCipher truncated MAC" \ |
| 1793 | "$P_SRV" \ |
| 1794 | "$P_CLI request_size=1 force_version=tls1_1 \ |
| 1795 | force_ciphersuite=TLS-RSA-WITH-AES-256-CBC-SHA \ |
| 1796 | trunc_hmac=1" \ |
| 1797 | 0 \ |
| 1798 | -s "Read from client: 1 bytes read" |
| 1799 | |
| 1800 | run_test "Small packet TLS 1.1 StreamCipher truncated MAC" \ |
| 1801 | "$P_SRV" \ |
| 1802 | "$P_CLI request_size=1 force_version=tls1_1 \ |
| 1803 | force_ciphersuite=TLS-RSA-WITH-RC4-128-SHA \ |
| 1804 | trunc_hmac=1" \ |
| 1805 | 0 \ |
| 1806 | -s "Read from client: 1 bytes read" |
| 1807 | |
| 1808 | run_test "Small packet TLS 1.2 BlockCipher" \ |
| 1809 | "$P_SRV" \ |
| 1810 | "$P_CLI request_size=1 force_version=tls1_2 \ |
| 1811 | force_ciphersuite=TLS-RSA-WITH-AES-256-CBC-SHA" \ |
| 1812 | 0 \ |
| 1813 | -s "Read from client: 1 bytes read" |
| 1814 | |
| 1815 | run_test "Small packet TLS 1.2 BlockCipher larger MAC" \ |
| 1816 | "$P_SRV" \ |
| 1817 | "$P_CLI request_size=1 force_version=tls1_2 force_ciphersuite=TLS-ECDHE-RSA-WITH-AES-256-CBC-SHA384" \ |
| 1818 | 0 \ |
| 1819 | -s "Read from client: 1 bytes read" |
| 1820 | |
| 1821 | run_test "Small packet TLS 1.2 BlockCipher truncated MAC" \ |
| 1822 | "$P_SRV" \ |
| 1823 | "$P_CLI request_size=1 force_version=tls1_2 \ |
| 1824 | force_ciphersuite=TLS-RSA-WITH-AES-256-CBC-SHA \ |
| 1825 | trunc_hmac=1" \ |
| 1826 | 0 \ |
| 1827 | -s "Read from client: 1 bytes read" |
| 1828 | |
| 1829 | run_test "Small packet TLS 1.2 StreamCipher" \ |
| 1830 | "$P_SRV" \ |
| 1831 | "$P_CLI request_size=1 force_version=tls1_2 \ |
| 1832 | force_ciphersuite=TLS-RSA-WITH-RC4-128-SHA" \ |
| 1833 | 0 \ |
| 1834 | -s "Read from client: 1 bytes read" |
| 1835 | |
| 1836 | run_test "Small packet TLS 1.2 StreamCipher truncated MAC" \ |
| 1837 | "$P_SRV" \ |
| 1838 | "$P_CLI request_size=1 force_version=tls1_2 \ |
| 1839 | force_ciphersuite=TLS-RSA-WITH-RC4-128-SHA \ |
| 1840 | trunc_hmac=1" \ |
| 1841 | 0 \ |
| 1842 | -s "Read from client: 1 bytes read" |
| 1843 | |
| 1844 | run_test "Small packet TLS 1.2 AEAD" \ |
| 1845 | "$P_SRV" \ |
| 1846 | "$P_CLI request_size=1 force_version=tls1_2 \ |
| 1847 | force_ciphersuite=TLS-RSA-WITH-AES-256-CCM" \ |
| 1848 | 0 \ |
| 1849 | -s "Read from client: 1 bytes read" |
| 1850 | |
| 1851 | run_test "Small packet TLS 1.2 AEAD shorter tag" \ |
| 1852 | "$P_SRV" \ |
| 1853 | "$P_CLI request_size=1 force_version=tls1_2 \ |
| 1854 | force_ciphersuite=TLS-RSA-WITH-AES-256-CCM-8" \ |
| 1855 | 0 \ |
| 1856 | -s "Read from client: 1 bytes read" |
| 1857 | |
Manuel Pégourié-Gonnard | 8920f69 | 2014-06-18 22:05:08 +0200 | [diff] [blame] | 1858 | # Test for large packets |
| 1859 | |
| 1860 | run_test "Large packet SSLv3 BlockCipher" \ |
| 1861 | "$P_SRV" \ |
| 1862 | "$P_CLI request_size=16384 force_version=ssl3 \ |
| 1863 | force_ciphersuite=TLS-RSA-WITH-AES-256-CBC-SHA" \ |
| 1864 | 0 \ |
| 1865 | -s "Read from client: 16384 bytes read" |
| 1866 | |
| 1867 | run_test "Large packet SSLv3 StreamCipher" \ |
| 1868 | "$P_SRV" \ |
| 1869 | "$P_CLI request_size=16384 force_version=ssl3 \ |
| 1870 | force_ciphersuite=TLS-RSA-WITH-RC4-128-SHA" \ |
| 1871 | 0 \ |
| 1872 | -s "Read from client: 16384 bytes read" |
| 1873 | |
| 1874 | run_test "Large packet TLS 1.0 BlockCipher" \ |
| 1875 | "$P_SRV" \ |
| 1876 | "$P_CLI request_size=16384 force_version=tls1 \ |
| 1877 | force_ciphersuite=TLS-RSA-WITH-AES-256-CBC-SHA" \ |
| 1878 | 0 \ |
| 1879 | -s "Read from client: 16384 bytes read" |
| 1880 | |
| 1881 | run_test "Large packet TLS 1.0 BlockCipher truncated MAC" \ |
| 1882 | "$P_SRV" \ |
| 1883 | "$P_CLI request_size=16384 force_version=tls1 \ |
| 1884 | force_ciphersuite=TLS-RSA-WITH-AES-256-CBC-SHA \ |
| 1885 | trunc_hmac=1" \ |
| 1886 | 0 \ |
| 1887 | -s "Read from client: 16384 bytes read" |
| 1888 | |
| 1889 | run_test "Large packet TLS 1.0 StreamCipher truncated MAC" \ |
| 1890 | "$P_SRV" \ |
| 1891 | "$P_CLI request_size=16384 force_version=tls1 \ |
| 1892 | force_ciphersuite=TLS-RSA-WITH-RC4-128-SHA \ |
| 1893 | trunc_hmac=1" \ |
| 1894 | 0 \ |
| 1895 | -s "Read from client: 16384 bytes read" |
| 1896 | |
| 1897 | run_test "Large packet TLS 1.1 BlockCipher" \ |
| 1898 | "$P_SRV" \ |
| 1899 | "$P_CLI request_size=16384 force_version=tls1_1 \ |
| 1900 | force_ciphersuite=TLS-RSA-WITH-AES-256-CBC-SHA" \ |
| 1901 | 0 \ |
| 1902 | -s "Read from client: 16384 bytes read" |
| 1903 | |
| 1904 | run_test "Large packet TLS 1.1 StreamCipher" \ |
| 1905 | "$P_SRV" \ |
| 1906 | "$P_CLI request_size=16384 force_version=tls1_1 \ |
| 1907 | force_ciphersuite=TLS-RSA-WITH-RC4-128-SHA" \ |
| 1908 | 0 \ |
| 1909 | -s "Read from client: 16384 bytes read" |
| 1910 | |
| 1911 | run_test "Large packet TLS 1.1 BlockCipher truncated MAC" \ |
| 1912 | "$P_SRV" \ |
| 1913 | "$P_CLI request_size=16384 force_version=tls1_1 \ |
| 1914 | force_ciphersuite=TLS-RSA-WITH-AES-256-CBC-SHA \ |
| 1915 | trunc_hmac=1" \ |
| 1916 | 0 \ |
| 1917 | -s "Read from client: 16384 bytes read" |
| 1918 | |
| 1919 | run_test "Large packet TLS 1.1 StreamCipher truncated MAC" \ |
| 1920 | "$P_SRV" \ |
| 1921 | "$P_CLI request_size=16384 force_version=tls1_1 \ |
| 1922 | force_ciphersuite=TLS-RSA-WITH-RC4-128-SHA \ |
| 1923 | trunc_hmac=1" \ |
| 1924 | 0 \ |
| 1925 | -s "Read from client: 16384 bytes read" |
| 1926 | |
| 1927 | run_test "Large packet TLS 1.2 BlockCipher" \ |
| 1928 | "$P_SRV" \ |
| 1929 | "$P_CLI request_size=16384 force_version=tls1_2 \ |
| 1930 | force_ciphersuite=TLS-RSA-WITH-AES-256-CBC-SHA" \ |
| 1931 | 0 \ |
| 1932 | -s "Read from client: 16384 bytes read" |
| 1933 | |
| 1934 | run_test "Large packet TLS 1.2 BlockCipher larger MAC" \ |
| 1935 | "$P_SRV" \ |
| 1936 | "$P_CLI request_size=16384 force_version=tls1_2 force_ciphersuite=TLS-ECDHE-RSA-WITH-AES-256-CBC-SHA384" \ |
| 1937 | 0 \ |
| 1938 | -s "Read from client: 16384 bytes read" |
| 1939 | |
| 1940 | run_test "Large packet TLS 1.2 BlockCipher truncated MAC" \ |
| 1941 | "$P_SRV" \ |
| 1942 | "$P_CLI request_size=16384 force_version=tls1_2 \ |
| 1943 | force_ciphersuite=TLS-RSA-WITH-AES-256-CBC-SHA \ |
| 1944 | trunc_hmac=1" \ |
| 1945 | 0 \ |
| 1946 | -s "Read from client: 16384 bytes read" |
| 1947 | |
| 1948 | run_test "Large packet TLS 1.2 StreamCipher" \ |
| 1949 | "$P_SRV" \ |
| 1950 | "$P_CLI request_size=16384 force_version=tls1_2 \ |
| 1951 | force_ciphersuite=TLS-RSA-WITH-RC4-128-SHA" \ |
| 1952 | 0 \ |
| 1953 | -s "Read from client: 16384 bytes read" |
| 1954 | |
| 1955 | run_test "Large packet TLS 1.2 StreamCipher truncated MAC" \ |
| 1956 | "$P_SRV" \ |
| 1957 | "$P_CLI request_size=16384 force_version=tls1_2 \ |
| 1958 | force_ciphersuite=TLS-RSA-WITH-RC4-128-SHA \ |
| 1959 | trunc_hmac=1" \ |
| 1960 | 0 \ |
| 1961 | -s "Read from client: 16384 bytes read" |
| 1962 | |
| 1963 | run_test "Large packet TLS 1.2 AEAD" \ |
| 1964 | "$P_SRV" \ |
| 1965 | "$P_CLI request_size=16384 force_version=tls1_2 \ |
| 1966 | force_ciphersuite=TLS-RSA-WITH-AES-256-CCM" \ |
| 1967 | 0 \ |
| 1968 | -s "Read from client: 16384 bytes read" |
| 1969 | |
| 1970 | run_test "Large packet TLS 1.2 AEAD shorter tag" \ |
| 1971 | "$P_SRV" \ |
| 1972 | "$P_CLI request_size=16384 force_version=tls1_2 \ |
| 1973 | force_ciphersuite=TLS-RSA-WITH-AES-256-CCM-8" \ |
| 1974 | 0 \ |
| 1975 | -s "Read from client: 16384 bytes read" |
| 1976 | |
Manuel Pégourié-Gonnard | 0eb6cab | 2014-07-23 20:17:47 +0200 | [diff] [blame] | 1977 | # Tests for DTLS HelloVerifyRequest |
| 1978 | |
| 1979 | run_test "DTLS cookie: enabled" \ |
| 1980 | "$P_SRV dtls=1 debug_level=2" \ |
| 1981 | "$P_CLI dtls=1 debug_level=2" \ |
| 1982 | 0 \ |
| 1983 | -s "cookie verification failed" \ |
| 1984 | -s "cookie verification passed" \ |
| 1985 | -S "cookie verification skipped" \ |
| 1986 | -c "received hello verify request" \ |
| 1987 | -S "SSL - The requested feature is not available" |
| 1988 | |
| 1989 | run_test "DTLS cookie: disabled" \ |
| 1990 | "$P_SRV dtls=1 debug_level=2 cookies=0" \ |
| 1991 | "$P_CLI dtls=1 debug_level=2" \ |
| 1992 | 0 \ |
| 1993 | -S "cookie verification failed" \ |
| 1994 | -S "cookie verification passed" \ |
| 1995 | -s "cookie verification skipped" \ |
| 1996 | -C "received hello verify request" \ |
| 1997 | -S "SSL - The requested feature is not available" |
| 1998 | |
| 1999 | # wait for client having a timeout, or server sending an alert |
| 2000 | #run_test "DTLS cookie: default (failing)" \ |
| 2001 | # "$P_SRV dtls=1 debug_level=2 cookies=-1" \ |
| 2002 | # "$P_CLI dtls=1 debug_level=2" \ |
| 2003 | # 0 \ |
| 2004 | # -S "cookie verification failed" \ |
| 2005 | # -S "cookie verification passed" \ |
| 2006 | # -S "cookie verification skipped" \ |
| 2007 | # -C "received hello verify request" \ |
| 2008 | # -s "SSL - The requested feature is not available" |
| 2009 | |
| 2010 | requires_ipv6 |
| 2011 | run_test "DTLS cookie: enabled, IPv6" \ |
| 2012 | "$P_SRV dtls=1 debug_level=2 server_addr=::1" \ |
| 2013 | "$P_CLI dtls=1 debug_level=2 server_addr=::1" \ |
| 2014 | 0 \ |
| 2015 | -s "cookie verification failed" \ |
| 2016 | -s "cookie verification passed" \ |
| 2017 | -S "cookie verification skipped" \ |
| 2018 | -c "received hello verify request" \ |
| 2019 | -S "SSL - The requested feature is not available" |
| 2020 | |
Manuel Pégourié-Gonnard | 502bf30 | 2014-08-20 13:12:58 +0200 | [diff] [blame] | 2021 | # Tests for receiving fragmented handshake messages with DTLS |
| 2022 | |
| 2023 | requires_gnutls |
| 2024 | run_test "DTLS reassembly: no fragmentation (gnutls server)" \ |
| 2025 | "$G_SRV -u --mtu 2048 -a" \ |
| 2026 | "$P_CLI dtls=1 debug_level=2" \ |
| 2027 | 0 \ |
| 2028 | -C "found fragmented DTLS handshake message" \ |
| 2029 | -C "error" |
| 2030 | |
| 2031 | requires_gnutls |
| 2032 | run_test "DTLS reassembly: some fragmentation (gnutls server)" \ |
| 2033 | "$G_SRV -u --mtu 512" \ |
| 2034 | "$P_CLI dtls=1 debug_level=2" \ |
| 2035 | 0 \ |
| 2036 | -c "found fragmented DTLS handshake message" \ |
| 2037 | -C "error" |
| 2038 | |
| 2039 | requires_gnutls |
| 2040 | run_test "DTLS reassembly: more fragmentation (gnutls server)" \ |
| 2041 | "$G_SRV -u --mtu 128" \ |
| 2042 | "$P_CLI dtls=1 debug_level=2" \ |
| 2043 | 0 \ |
| 2044 | -c "found fragmented DTLS handshake message" \ |
| 2045 | -C "error" |
| 2046 | |
| 2047 | requires_gnutls |
| 2048 | run_test "DTLS reassembly: more fragmentation, nbio (gnutls server)" \ |
| 2049 | "$G_SRV -u --mtu 128" \ |
| 2050 | "$P_CLI dtls=1 nbio=2 debug_level=2" \ |
| 2051 | 0 \ |
| 2052 | -c "found fragmented DTLS handshake message" \ |
| 2053 | -C "error" |
| 2054 | |
Manuel Pégourié-Gonnard | 0c4cbc7 | 2014-09-02 14:47:31 +0200 | [diff] [blame] | 2055 | requires_gnutls |
Manuel Pégourié-Gonnard | 0c4cbc7 | 2014-09-02 14:47:31 +0200 | [diff] [blame] | 2056 | run_test "DTLS reassembly: fragmentation, renego (gnutls server)" \ |
| 2057 | "$G_SRV -u --mtu 256" \ |
| 2058 | "$P_CLI debug_level=3 dtls=1 renegotiation=1 renegotiate=1" \ |
| 2059 | 0 \ |
| 2060 | -c "found fragmented DTLS handshake message" \ |
| 2061 | -c "client hello, adding renegotiation extension" \ |
| 2062 | -c "found renegotiation extension" \ |
| 2063 | -c "=> renegotiate" \ |
| 2064 | -C "ssl_handshake returned" \ |
| 2065 | -C "error" \ |
| 2066 | -s "Extra-header:" |
| 2067 | |
| 2068 | requires_gnutls |
Manuel Pégourié-Gonnard | 0c4cbc7 | 2014-09-02 14:47:31 +0200 | [diff] [blame] | 2069 | run_test "DTLS reassembly: fragmentation, nbio, renego (gnutls server)" \ |
| 2070 | "$G_SRV -u --mtu 256" \ |
| 2071 | "$P_CLI debug_level=3 nbio=2 dtls=1 renegotiation=1 renegotiate=1" \ |
| 2072 | 0 \ |
| 2073 | -c "found fragmented DTLS handshake message" \ |
| 2074 | -c "client hello, adding renegotiation extension" \ |
| 2075 | -c "found renegotiation extension" \ |
| 2076 | -c "=> renegotiate" \ |
| 2077 | -C "ssl_handshake returned" \ |
| 2078 | -C "error" \ |
| 2079 | -s "Extra-header:" |
| 2080 | |
Manuel Pégourié-Gonnard | a775617 | 2014-08-31 18:37:01 +0200 | [diff] [blame] | 2081 | run_test "DTLS reassembly: no fragmentation (openssl server)" \ |
| 2082 | "$O_SRV -dtls1 -mtu 2048" \ |
| 2083 | "$P_CLI dtls=1 debug_level=2" \ |
| 2084 | 0 \ |
| 2085 | -C "found fragmented DTLS handshake message" \ |
| 2086 | -C "error" |
| 2087 | |
Manuel Pégourié-Gonnard | 64dffc5 | 2014-09-02 13:39:16 +0200 | [diff] [blame] | 2088 | run_test "DTLS reassembly: fragmentation (openssl server)" \ |
| 2089 | "$O_SRV -dtls1 -mtu 256" \ |
| 2090 | "$P_CLI dtls=1 debug_level=2" \ |
| 2091 | 0 \ |
| 2092 | -c "found fragmented DTLS handshake message" \ |
| 2093 | -C "error" |
| 2094 | |
| 2095 | run_test "DTLS reassembly: fragmentation (openssl server)" \ |
| 2096 | "$O_SRV -dtls1 -mtu 256" \ |
| 2097 | "$P_CLI dtls=1 debug_level=2" \ |
| 2098 | 0 \ |
| 2099 | -c "found fragmented DTLS handshake message" \ |
| 2100 | -C "error" |
| 2101 | |
| 2102 | run_test "DTLS reassembly: fragmentation, nbio (openssl server)" \ |
| 2103 | "$O_SRV -dtls1 -mtu 256" \ |
| 2104 | "$P_CLI dtls=1 nbio=2 debug_level=2" \ |
| 2105 | 0 \ |
| 2106 | -c "found fragmented DTLS handshake message" \ |
| 2107 | -C "error" |
Manuel Pégourié-Gonnard | a775617 | 2014-08-31 18:37:01 +0200 | [diff] [blame] | 2108 | |
Manuel Pégourié-Gonnard | 990f9e4 | 2014-09-06 12:27:02 +0200 | [diff] [blame] | 2109 | # Tests with UDP proxy emulating unreliable transport |
Manuel Pégourié-Gonnard | be9eb87 | 2014-09-05 17:45:19 +0200 | [diff] [blame] | 2110 | |
Manuel Pégourié-Gonnard | 990f9e4 | 2014-09-06 12:27:02 +0200 | [diff] [blame] | 2111 | run_test "DTLS proxy: reference" \ |
Manuel Pégourié-Gonnard | be9eb87 | 2014-09-05 17:45:19 +0200 | [diff] [blame] | 2112 | -p "$P_PXY" \ |
| 2113 | "$P_SRV dtls=1" \ |
| 2114 | "$P_CLI dtls=1" \ |
Manuel Pégourié-Gonnard | 990f9e4 | 2014-09-06 12:27:02 +0200 | [diff] [blame] | 2115 | 0 \ |
Manuel Pégourié-Gonnard | 63eca93 | 2014-09-08 16:39:08 +0200 | [diff] [blame] | 2116 | -s "Extra-header:" \ |
Manuel Pégourié-Gonnard | 990f9e4 | 2014-09-06 12:27:02 +0200 | [diff] [blame] | 2117 | -c "HTTP/1.0 200 OK" |
| 2118 | |
| 2119 | run_test "DTLS proxy: some duplication" \ |
| 2120 | -p "$P_PXY duplicate=3" \ |
| 2121 | "$P_SRV dtls=1" \ |
| 2122 | "$P_CLI dtls=1" \ |
| 2123 | 0 \ |
Manuel Pégourié-Gonnard | 63eca93 | 2014-09-08 16:39:08 +0200 | [diff] [blame] | 2124 | -s "Extra-header:" \ |
Manuel Pégourié-Gonnard | 990f9e4 | 2014-09-06 12:27:02 +0200 | [diff] [blame] | 2125 | -c "HTTP/1.0 200 OK" |
| 2126 | |
| 2127 | run_test "DTLS proxy: lots of duplication" \ |
| 2128 | -p "$P_PXY duplicate=1" \ |
| 2129 | "$P_SRV dtls=1" \ |
| 2130 | "$P_CLI dtls=1" \ |
| 2131 | 0 \ |
Manuel Pégourié-Gonnard | 63eca93 | 2014-09-08 16:39:08 +0200 | [diff] [blame] | 2132 | -s "Extra-header:" \ |
| 2133 | -c "HTTP/1.0 200 OK" |
| 2134 | |
| 2135 | run_test "DTLS proxy: inject invalid AD record" \ |
| 2136 | -p "$P_PXY bad_ad=1" \ |
| 2137 | "$P_SRV dtls=1" \ |
| 2138 | "$P_CLI dtls=1" \ |
| 2139 | 0 \ |
| 2140 | -s "Extra-header:" \ |
Manuel Pégourié-Gonnard | 990f9e4 | 2014-09-06 12:27:02 +0200 | [diff] [blame] | 2141 | -c "HTTP/1.0 200 OK" |
Manuel Pégourié-Gonnard | be9eb87 | 2014-09-05 17:45:19 +0200 | [diff] [blame] | 2142 | |
Manuel Pégourié-Gonnard | a071972 | 2014-09-20 12:46:27 +0200 | [diff] [blame^] | 2143 | run_test "DTLS proxy: drop a few packets" \ |
| 2144 | -p "$P_PXY drop=10" \ |
| 2145 | "$P_SRV dtls=1" \ |
| 2146 | "$P_CLI dtls=1" \ |
| 2147 | 0 \ |
| 2148 | -s "Extra-header:" \ |
| 2149 | -c "HTTP/1.0 200 OK" |
| 2150 | |
| 2151 | needs_more_time 2 |
| 2152 | run_test "DTLS proxy: drop a bit more packets" \ |
| 2153 | -p "$P_PXY drop=6" \ |
| 2154 | "$P_SRV dtls=1" \ |
| 2155 | "$P_CLI dtls=1" \ |
| 2156 | 0 \ |
| 2157 | -s "Extra-header:" \ |
| 2158 | -c "HTTP/1.0 200 OK" |
| 2159 | |
| 2160 | needs_more_time 3 |
| 2161 | run_test "DTLS proxy: drop more packets" \ |
| 2162 | -p "$P_PXY drop=3" \ |
| 2163 | "$P_SRV dtls=1" \ |
| 2164 | "$P_CLI dtls=1" \ |
| 2165 | 0 \ |
| 2166 | -s "Extra-header:" \ |
| 2167 | -c "HTTP/1.0 200 OK" |
| 2168 | |
Manuel Pégourié-Gonnard | 8520dac | 2014-02-21 12:12:23 +0100 | [diff] [blame] | 2169 | # Final report |
| 2170 | |
Manuel Pégourié-Gonnard | 33a752e | 2014-02-21 09:47:37 +0100 | [diff] [blame] | 2171 | echo "------------------------------------------------------------------------" |
| 2172 | |
| 2173 | if [ $FAILS = 0 ]; then |
| 2174 | echo -n "PASSED" |
| 2175 | else |
| 2176 | echo -n "FAILED" |
| 2177 | fi |
Manuel Pégourié-Gonnard | 72e51ee | 2014-08-31 10:22:11 +0200 | [diff] [blame] | 2178 | PASSES=$(( $TESTS - $FAILS )) |
Manuel Pégourié-Gonnard | 6f4fbbb | 2014-08-14 14:31:29 +0200 | [diff] [blame] | 2179 | echo " ($PASSES / $TESTS tests ($SKIPS skipped))" |
Manuel Pégourié-Gonnard | 33a752e | 2014-02-21 09:47:37 +0100 | [diff] [blame] | 2180 | |
| 2181 | exit $FAILS |