Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/pkg
Path: blob/main/external/curl/tests/ech_tests.sh
2649 views
1
#!/usr/bin/env bash
2
#***************************************************************************
3
# _ _ ____ _
4
# Project ___| | | | _ \| |
5
# / __| | | | |_) | |
6
# | (__| |_| | _ <| |___
7
# \___|\___/|_| \_\_____|
8
#
9
# Copyright (C) Daniel Stenberg, <[email protected]>, et al.
10
#
11
# This software is licensed as described in the file COPYING, which
12
# you should have received as part of this distribution. The terms
13
# are also available at https://curl.se/docs/copyright.html.
14
#
15
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
16
# copies of the Software, and permit persons to whom the Software is
17
# furnished to do so, under the terms of the COPYING file.
18
#
19
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
20
# KIND, either express or implied.
21
#
22
# SPDX-License-Identifier: curl
23
#
24
###########################################################################
25
#
26
27
# Run some tests against servers we know to support ECH (CF, defo.ie, etc.).
28
# as well as some we know don't do ECH but have an HTTPS RR, and finally some
29
# for which neither is the case.
30
31
# TODO: Translate this into something that approximates a valid curl test:-)
32
# Should be useful though even before such translation and a pile less work
33
# to do this than that. The pile of work required would include making an
34
# ECH-enabled server and a DoH server. For now, this is just run manually.
35
#
36
37
# set -x
38
39
# Exit with an error if there's an active ech stanza in ~/.curlrc
40
# as that'd likely skew some results (e.g. turning a fail into a
41
# success or vice versa)
42
: "${CURL_CFG_FILE=$HOME/.curlrc}"
43
active_ech=$(grep ech "$CURL_CFG_FILE" | grep -v "#.*ech")
44
if [[ "$active_ech" != "" ]]; then
45
echo "You seem to have an active ECH setting in $CURL_CFG_FILE"
46
echo "That might affect results so please remove that or comment"
47
echo "it out - exiting."
48
exit 1
49
fi
50
51
# Targets we expect to be ECH-enabled servers
52
# for which an HTTPS RR is published.
53
# structure is host:port mapped to pathname
54
# TODO: add negative tests for these
55
declare -A ech_targets=(
56
[my-own.net]="ech-check.php"
57
[my-own.net:8443]="ech-check.php"
58
[defo.ie]="ech-check.php"
59
[cover.defo.ie]=""
60
[draft-13.esni.defo.ie:8413]="stats"
61
[draft-13.esni.defo.ie:8414]="stats"
62
[draft-13.esni.defo.ie:9413]=""
63
[draft-13.esni.defo.ie:10413]=""
64
[draft-13.esni.defo.ie:11413]=""
65
[draft-13.esni.defo.ie:12413]=""
66
[draft-13.esni.defo.ie:12414]=""
67
[cloudflare-ech.com]="cdn-cgi/trace"
68
[tls-ech.dev]=""
69
# this one's gone away for now (possibly temporarily)
70
# [epochbelt.com]=""
71
)
72
73
# Targets we expect not to be ECH-enabled servers
74
# but for which an HTTPS RR is published.
75
declare -A httpsrr_targets=(
76
[ietf.org]=""
77
[rte.ie]=""
78
)
79
80
# Targets we expect not to be ECH-enabled servers
81
# and for which no HTTPS RR is published.
82
declare -A neither_targets=(
83
[www.tcd.ie]=""
84
[jell.ie]=""
85
)
86
87
#
88
# Variables that can be over-ridden from environment
89
#
90
91
# Top of curl test tree, assume we're there
92
: "${CTOP:=.}"
93
94
# Place to put test log output
95
: "${LTOP:=$CTOP/tests/ech-log/}"
96
97
# Place to stash outputs when things go wrong
98
: "${BTOP:=$LTOP}"
99
100
# Time to wait for a remote access to work, 10 seconds
101
: "${tout:=10s}"
102
103
# Where we find OpenSSL .so's
104
: "${OSSL:=$HOME/code/openssl-local-inst}"
105
106
# Where we find wolfSSL .so's
107
: "${WSSL:=$HOME/code/wolfssl/inst/lib}"
108
109
# Where we find BoringSSL .so's
110
: "${BSSL:=$HOME/code/boringssl/inst/lib}"
111
112
# Where we send DoH queries when using kdig or curl
113
: "${DOHSERVER:=one.one.one.one}"
114
: "${DOHPATH:=dns-query}"
115
116
# Whether to send mail when bad things happen (mostly for cronjob)
117
: "${DOMAIL:=no}"
118
119
# Misc vars and functions
120
121
DEFPORT=443
122
123
function whenisitagain() {
124
/bin/date -u +%Y%m%d-%H%M%S
125
}
126
127
function fileage() {
128
echo $(($(date +%s) - $(date +%s -r "$1")))
129
}
130
131
function hostport2host() {
132
case $1 in
133
*:*) host=${1%:*} port=${1##*:};;
134
*) host=$1 port=$DEFPORT;;
135
esac
136
echo "$host"
137
}
138
139
function hostport2port() {
140
case $1 in
141
*:*) host=${1%:*} port=${1##*:};;
142
*) host=$1 port=$DEFPORT;;
143
esac
144
echo "$port"
145
}
146
147
function cli_test() {
148
# 1st param is target URL
149
turl=$1
150
# 2nd param is 0 if we expect curl to not work or 1 if we expect it
151
# to have worked
152
curl_winorlose=$2
153
# 3rd param is 0 if we expect ECH to not work or 1 if we expect it
154
# to have worked
155
ech_winorlose=$3
156
# remaining params are passed to command line
157
# echparms=(${@:4})
158
IFS=" " read -r -a echparms <<< "${@:4}"
159
160
TMPF=$(mktemp)
161
cmd="timeout $tout $CURL ${CURL_PARAMS[*]} ${echparms[*]} $turl > $TMPF 2>&1"
162
echo "cli_test: $cmd " >> "$logfile"
163
timeout "$tout" "$CURL" "${CURL_PARAMS[@]}" "${echparms[@]}" "$turl" > "$TMPF" 2>&1
164
eres=$?
165
if [[ "$eres" == "124" ]]; then
166
allgood="no"
167
echo "cli_test: Timeout running $cmd"
168
cat "$TMPF" >> "$logfile"
169
echo "cli_test: Timeout running $cmd" >> "$logfile"
170
fi
171
if [[ "$eres" != "0" && "$curl_winorlose" == "1" ]]; then
172
allgood="no"
173
echo "cli_test: curl failure running $cmd"
174
cat "$TMPF" >> "$logfile"
175
echo "cli_test: curl failure running $cmd" >> "$logfile"
176
fi
177
ech_success=$(grep -c "ECH: result: status is succeeded" "$TMPF")
178
if [[ "$ech_success" == "$ech_winorlose" ]]; then
179
echo "cli_test ok for ${echparms[*]}"
180
else
181
allgood="no"
182
echo "cli_test: ECH failure running $cmd"
183
cat "$TMPF" >> "$logfile"
184
echo "cli_test: ECH failure running $cmd" >> "$logfile"
185
fi
186
rm -f "$TMPF"
187
}
188
189
function get_ech_configlist() {
190
domain=$1
191
ecl=$(dig +short https "$domain" | grep "ech=" | sed -e 's/^.*ech=//' | sed -e 's/ .*//')
192
echo "$ecl"
193
}
194
195
# start of main script
196
197
# start by assuming we have nothing we need...
198
have_ossl="no"
199
have_wolf="no"
200
have_bssl="no"
201
using_ossl="no"
202
using_wolf="no"
203
using_bssl="no"
204
have_curl="no"
205
have_dig="no"
206
have_kdig="no"
207
have_presout="no"
208
have_portsblocked="no"
209
210
# setup logging
211
NOW=$(whenisitagain)
212
BINNAME=$(basename "$0" .sh)
213
if [ ! -d "$LTOP" ]; then
214
mkdir -p "$LTOP"
215
fi
216
if [ ! -d "$LTOP" ]; then
217
echo "Can't see $LTOP for logs - exiting"
218
exit 1
219
fi
220
logfile=$LTOP/${BINNAME}_$NOW.log
221
222
echo "-----" > "$logfile"
223
echo "Running $0 at $NOW" >> "$logfile"
224
echo "Running $0 at $NOW"
225
226
# check we have the binaries needed and which TLS library we'll be using
227
if [ -f "$OSSL"/libssl.so ]; then
228
have_ossl="yes"
229
fi
230
if [ -f "$WSSL"/libwolfssl.so ]; then
231
have_wolf="yes"
232
fi
233
if [ -f "$BSSL"/libssl.so ]; then
234
have_bssl="yes"
235
fi
236
CURL="$CTOP/src/curl"
237
CURL_PARAMS=(-vvv --doh-url https://one.one.one.one/dns-query)
238
if [ -f "$CTOP"/src/curl ]; then
239
have_curl="yes"
240
fi
241
ossl_cnt=$(LD_LIBRARY_PATH=$OSSL $CURL "${CURL_PARAMS[@]}" -V 2> /dev/null | grep -c OpenSSL)
242
if ((ossl_cnt == 1)); then
243
using_ossl="yes"
244
# setup access to our .so
245
export LD_LIBRARY_PATH=$OSSL
246
fi
247
bssl_cnt=$(LD_LIBRARY_PATH=$BSSL $CURL "${CURL_PARAMS[@]}" -V 2> /dev/null | grep -c BoringSSL)
248
if ((bssl_cnt == 1)); then
249
using_bssl="yes"
250
# setup access to our .so
251
export LD_LIBRARY_PATH=$BSSL
252
fi
253
wolf_cnt=$($CURL "${CURL_PARAMS[@]}" -V 2> /dev/null | grep -c wolfSSL)
254
if ((wolf_cnt == 1)); then
255
using_wolf="yes"
256
# for some reason curl+wolfSSL dislikes certs that are ok
257
# for browsers, so we'll test using "insecure" mode (-k)
258
# but that's ok here as we're only interested in ECH testing
259
CURL_PARAMS+=(-k)
260
fi
261
# check if we have dig and it knows https or not
262
digcmd="dig +short"
263
wdig=$(type -p dig)
264
if [[ "$wdig" != "" ]]; then
265
have_dig="yes"
266
fi
267
wkdig=$(type -p kdig)
268
if [[ "$wkdig" != "" ]]; then
269
have_kdig="yes"
270
digcmd="kdig @$DOHSERVER +https +short"
271
fi
272
# see if our dig version knows HTTPS
273
digout=$($digcmd https defo.ie)
274
if [[ $digout != "1 . "* ]]; then
275
digout=$($digcmd -t TYPE65 defo.ie)
276
if [[ $digout == "1 . "* ]]; then
277
# we're good
278
have_presout="yes"
279
fi
280
else
281
have_presout="yes"
282
fi
283
284
# Check if ports other than 443 are blocked from this
285
# vantage point (I run tests in a n/w where that's
286
# sadly true sometimes;-)
287
# echo "Checking if ports other than 443 are maybe blocked"
288
not443testurl="https://draft-13.esni.defo.ie:9413/"
289
timeout "$tout" "$CURL" "${CURL_PARAMS[@]}" "$not443testurl" >/dev/null 2>&1
290
eres=$?
291
if [[ "$eres" == "124" ]]; then
292
echo "Timeout running curl for $not443testurl" >> "$logfile"
293
echo "Timeout running curl for $not443testurl"
294
have_portsblocked="yes"
295
fi
296
297
{
298
echo "have_ossl: $have_ossl"
299
echo "have_wolf: $have_wolf"
300
echo "have_bssl: $have_bssl"
301
echo "using_ossl: $using_ossl"
302
echo "using_wolf: $using_wolf"
303
echo "using_bssl: $using_bssl"
304
echo "have_curl: $have_curl"
305
echo "have_dig: $have_dig"
306
echo "have_kdig: $have_kdig"
307
echo "have_presout: $have_presout"
308
echo "have_portsblocked: $have_portsblocked"
309
} >> "$logfile"
310
311
echo "curl: have $have_curl, cURL command: |$CURL ${CURL_PARAMS[*]}|"
312
echo "ossl: have: $have_ossl, using: $using_ossl"
313
echo "wolf: have: $have_wolf, using: $using_wolf"
314
echo "bssl: have: $have_bssl, using: $using_bssl"
315
echo "dig: $have_dig, kdig: $have_kdig, HTTPS presentation format: $have_presout"
316
echo "dig command: |$digcmd|"
317
echo "ports != 443 blocked: $have_portsblocked"
318
319
if [[ "$have_curl" == "no" ]]; then
320
echo "Can't proceed without curl - exiting"
321
exit 32
322
fi
323
324
allgood="yes"
325
326
skip="false"
327
328
if [[ "$skip" != "true" ]]; then
329
330
# basic ECH good/bad
331
for targ in "${!ech_targets[@]}"; do
332
if [[ "$using_wolf" == "yes" ]]; then
333
case $targ in
334
"draft-13.esni.defo.ie:8414" | "tls-ech.dev" | \
335
"cloudflare-ech.com" | "epochbelt.com")
336
echo "Skipping $targ 'cause wolf"; continue;;
337
*)
338
;;
339
esac
340
fi
341
host=$(hostport2host "$targ")
342
port=$(hostport2port "$targ")
343
if [[ "$port" != "443" && "$have_portsblocked" == "yes" ]]; then
344
echo "Skipping $targ as ports != 443 seem blocked"
345
continue
346
fi
347
path=${ech_targets[$targ]}
348
turl="https://$host:$port/$path"
349
echo "ECH check for $turl"
350
{
351
echo ""
352
echo "ECH check for $turl"
353
} >> "$logfile"
354
timeout "$tout" "$CURL" "${CURL_PARAMS[@]}" --ech hard "$turl" >> "$logfile" 2>&1
355
eres=$?
356
if [[ "$eres" == "124" ]]; then
357
allgood="no"
358
{
359
echo "Timeout for $turl"
360
echo -e "\tTimeout for $turl"
361
echo "Timeout running curl for $host:$port/$path"
362
} >> "$logfile"
363
fi
364
if [[ "$eres" != "0" ]]; then
365
allgood="no"
366
echo "Error ($eres) for $turl" >> "$logfile"
367
echo -e "\tError ($eres) for $turl"
368
fi
369
echo "" >> "$logfile"
370
done
371
372
# check if public_name override works (OpenSSL only)
373
if [[ "$using_ossl" == "yes" ]]; then
374
for targ in "${!ech_targets[@]}"; do
375
host=$(hostport2host "$targ")
376
port=$(hostport2port "$targ")
377
if [[ "$port" != "443" && "$have_portsblocked" == "yes" ]]; then
378
echo "Skipping $targ as ports != 443 seem blocked"
379
continue
380
fi
381
if [[ "$host" == "cloudflare-ech.com" ]]; then
382
echo "Skipping $host as they've blocked PN override"
383
continue
384
fi
385
path=${ech_targets[$targ]}
386
turl="https://$host:$port/$path"
387
echo "PN override check for $turl"
388
{
389
echo ""
390
echo "PN override check for $turl"
391
} >> "$logfile"
392
timeout "$tout" "$CURL" "${CURL_PARAMS[@]}" --ech pn:override --ech hard "$turl" >> "$logfile" 2>&1
393
eres=$?
394
if [[ "$eres" == "124" ]]; then
395
allgood="no"
396
{
397
echo "Timeout for $turl"
398
echo -e "\tTimeout for $turl"
399
echo "Timeout running curl for $host:$port/$path"
400
} >> "$logfile"
401
fi
402
if [[ "$eres" != "0" ]]; then
403
allgood="no"
404
echo "PN override Error ($eres) for $turl" >> "$logfile"
405
echo -e "\tPN override Error ($eres) for $turl"
406
fi
407
echo "" >> "$logfile"
408
done
409
fi
410
411
for targ in "${!httpsrr_targets[@]}"; do
412
host=$(hostport2host "$targ")
413
port=$(hostport2port "$targ")
414
if [[ "$port" != "443" && "$have_portsblocked" == "yes" ]]; then
415
echo "Skipping $targ as ports != 443 seem blocked"
416
continue
417
fi
418
path=${httpsrr_targets[$targ]}
419
turl="https://$host:$port/$path"
420
echo "HTTPS RR but no ECHConfig check for $turl"
421
{
422
echo ""
423
echo "HTTPS RR but no ECHConfig check for $turl"
424
} >> "$logfile"
425
timeout "$tout" "$CURL" "${CURL_PARAMS[@]}" --ech true "$turl" >> "$logfile" 2>&1
426
eres=$?
427
if [[ "$eres" == "124" ]]; then
428
allgood="no"
429
{
430
echo "Timeout for $turl"
431
echo -e "\tTimeout for $turl"
432
echo "Timeout running curl for $host:$port/$path"
433
} >> "$logfile"
434
fi
435
if [[ "$eres" != "0" ]]; then
436
allgood="no"
437
echo "Error ($eres) for $turl" >> "$logfile"
438
echo -e "\tError ($eres) for $turl"
439
fi
440
echo "" >> "$logfile"
441
done
442
443
for targ in "${!neither_targets[@]}"; do
444
host=$(hostport2host "$targ")
445
port=$(hostport2port "$targ")
446
if [[ "$port" != "443" && "$have_portsblocked" == "yes" ]]; then
447
echo "Skipping $targ as ports != 443 seem blocked"
448
continue
449
fi
450
path=${neither_targets[$targ]}
451
turl="https://$host:$port/$path"
452
echo "Neither HTTPS nor ECHConfig check for $turl"
453
{
454
echo ""
455
echo "Neither HTTPS nor ECHConfig check for $turl"
456
} >> "$logfile"
457
timeout "$tout" "$CURL" "${CURL_PARAMS[@]}" --ech true "$turl" >> "$logfile" 2>&1
458
eres=$?
459
if [[ "$eres" == "124" ]]; then
460
allgood="no"
461
{
462
echo "Timeout for $turl"
463
echo -e "\tTimeout for $turl"
464
echo "Timeout running curl for $host:$port/$path"
465
} >> "$logfile"
466
fi
467
if [[ "$eres" != "0" ]]; then
468
allgood="no"
469
echo "Error ($eres) for $turl" >> "$logfile"
470
echo -e "\tError ($eres) for $turl"
471
fi
472
echo "" >> "$logfile"
473
done
474
475
# Check various command line options, if we're good so far
476
if [[ "$using_ossl" == "yes" && "$allgood" == "yes" ]]; then
477
# use this test URL as it'll tell us if things worked
478
turl="https://defo.ie/ech-check.php"
479
echo "cli_test with $turl"
480
echo "cli_test with $turl" >> "$logfile"
481
cli_test "$turl" 1 1 --ech true
482
cli_test "$turl" 1 0 --ech false
483
cli_test "$turl" 1 1 --ech false --ech true
484
cli_test "$turl" 1 1 --ech false --ech true --ech pn:foobar
485
cli_test "$turl" 1 1 --ech false --ech pn:foobar --ech true
486
echconfiglist=$(get_ech_configlist defo.ie)
487
cli_test "$turl" 1 1 --ech ecl:"$echconfiglist"
488
cli_test "$turl" 1 0 --ech ecl:
489
fi
490
491
fi # skip
492
493
# Check combinations of command line options, if we're good so far
494
# Most of this only works for OpenSSL, which is ok, as we're checking
495
# the argument handling here, not the ECH protocol
496
if [[ "$using_ossl" == "yes" && "$allgood" == "yes" ]]; then
497
# ech can be hard, true, grease or false
498
# ecl:ecl can be correct, incorrect or missing
499
# ech:pn can be correct, incorrect or missing
500
# in all cases the "last" argument provided should "win"
501
# but only one of hard, true, grease or false will apply
502
turl="https://defo.ie/ech-check.php"
503
echconfiglist=$(get_ech_configlist defo.ie)
504
goodecl=$echconfiglist
505
echconfiglist=$(get_ech_configlist hidden.hoba.ie)
506
badecl=$echconfiglist
507
goodpn="cover.defo.ie"
508
badpn="hoba.ie"
509
echo "more cli_test with $turl"
510
echo "more cli_test with $turl" >> "$logfile"
511
512
# The combinatorics here are handled via the tests/ech_combos.py script
513
# which produces all the relevant combinations or inputs and orders
514
# thereof. We have to manually assess whether or not ECH is expected to
515
# work for each case.
516
cli_test "$turl" 0 0
517
[ "$allgood" != "yes" ] && echo "$LINENO"
518
cli_test "$turl" 0 0 --ech ecl:"$badecl"
519
[ "$allgood" != "yes" ] && echo "$LINENO"
520
cli_test "$turl" 1 1 --ech ecl:"$badecl" --ech ecl:"$goodecl"
521
[ "$allgood" != "yes" ] && echo "$LINENO"
522
cli_test "$turl" 1 1 --ech ecl:"$badecl" --ech ecl:"$goodecl" --ech pn:"$goodpn"
523
[ "$allgood" != "yes" ] && echo "$LINENO"
524
cli_test "$turl" 0 0 --ech ecl:"$badecl" --ech hard
525
[ "$allgood" != "yes" ] && echo "$LINENO"
526
cli_test "$turl" 1 1 --ech ecl:"$badecl" --ech hard --ech ecl:"$goodecl"
527
[ "$allgood" != "yes" ] && echo "$LINENO"
528
cli_test "$turl" 1 1 --ech ecl:"$badecl" --ech hard --ech ecl:"$goodecl" --ech pn:"$goodpn"
529
[ "$allgood" != "yes" ] && echo "$LINENO"
530
cli_test "$turl" 0 0 --ech ecl:"$badecl" --ech hard --ech pn:"$goodpn"
531
[ "$allgood" != "yes" ] && echo "$LINENO"
532
cli_test "$turl" 0 0 --ech ecl:"$badecl" --ech hard --ech true
533
[ "$allgood" != "yes" ] && echo "$LINENO"
534
cli_test "$turl" 1 1 --ech ecl:"$badecl" --ech hard --ech true --ech ecl:"$goodecl"
535
[ "$allgood" != "yes" ] && echo "$LINENO"
536
cli_test "$turl" 1 1 --ech ecl:"$badecl" --ech hard --ech true --ech ecl:"$goodecl" --ech pn:"$goodpn"
537
[ "$allgood" != "yes" ] && echo "$LINENO"
538
cli_test "$turl" 0 0 --ech ecl:"$badecl" --ech hard --ech true --ech pn:"$goodpn"
539
[ "$allgood" != "yes" ] && echo "$LINENO"
540
cli_test "$turl" 0 0 --ech ecl:"$badecl" --ech pn:"$badpn"
541
[ "$allgood" != "yes" ] && echo "$LINENO"
542
cli_test "$turl" 1 1 --ech ecl:"$badecl" --ech pn:"$badpn" --ech ecl:"$goodecl"
543
[ "$allgood" != "yes" ] && echo "$LINENO"
544
cli_test "$turl" 1 1 --ech ecl:"$badecl" --ech pn:"$badpn" --ech ecl:"$goodecl" --ech pn:"$goodpn"
545
[ "$allgood" != "yes" ] && echo "$LINENO"
546
cli_test "$turl" 0 0 --ech ecl:"$badecl" --ech pn:"$badpn" --ech hard
547
[ "$allgood" != "yes" ] && echo "$LINENO"
548
cli_test "$turl" 1 1 --ech ecl:"$badecl" --ech pn:"$badpn" --ech hard --ech ecl:"$goodecl"
549
[ "$allgood" != "yes" ] && echo "$LINENO"
550
cli_test "$turl" 1 1 --ech ecl:"$badecl" --ech pn:"$badpn" --ech hard --ech ecl:"$goodecl" --ech pn:"$goodpn"
551
[ "$allgood" != "yes" ] && echo "$LINENO"
552
cli_test "$turl" 0 0 --ech ecl:"$badecl" --ech pn:"$badpn" --ech hard --ech pn:"$goodpn"
553
[ "$allgood" != "yes" ] && echo "$LINENO"
554
cli_test "$turl" 0 0 --ech ecl:"$badecl" --ech pn:"$badpn" --ech hard --ech true
555
[ "$allgood" != "yes" ] && echo "$LINENO"
556
cli_test "$turl" 1 1 --ech ecl:"$badecl" --ech pn:"$badpn" --ech hard --ech true --ech ecl:"$goodecl"
557
[ "$allgood" != "yes" ] && echo "$LINENO"
558
cli_test "$turl" 1 1 --ech ecl:"$badecl" --ech pn:"$badpn" --ech hard --ech true --ech ecl:"$goodecl" --ech pn:"$goodpn"
559
[ "$allgood" != "yes" ] && echo "$LINENO"
560
cli_test "$turl" 0 0 --ech ecl:"$badecl" --ech pn:"$badpn" --ech hard --ech true --ech pn:"$goodpn"
561
[ "$allgood" != "yes" ] && echo "$LINENO"
562
cli_test "$turl" 0 0 --ech ecl:"$badecl" --ech pn:"$badpn" --ech pn:"$goodpn"
563
[ "$allgood" != "yes" ] && echo "$LINENO"
564
cli_test "$turl" 0 0 --ech ecl:"$badecl" --ech pn:"$badpn" --ech true
565
[ "$allgood" != "yes" ] && echo "$LINENO"
566
cli_test "$turl" 1 1 --ech ecl:"$badecl" --ech pn:"$badpn" --ech true --ech ecl:"$goodecl"
567
[ "$allgood" != "yes" ] && echo "$LINENO"
568
cli_test "$turl" 1 1 --ech ecl:"$badecl" --ech pn:"$badpn" --ech true --ech ecl:"$goodecl" --ech pn:"$goodpn"
569
[ "$allgood" != "yes" ] && echo "$LINENO"
570
cli_test "$turl" - 0 --ech ecl:"$badecl" --ech pn:"$badpn" --ech true --ech pn:"$goodpn"
571
[ "$allgood" != "yes" ] && echo "$LINENO"
572
cli_test "$turl" 0 0 --ech ecl:"$badecl" --ech pn:"$goodpn"
573
[ "$allgood" != "yes" ] && echo "$LINENO"
574
cli_test "$turl" 0 0 --ech ecl:"$badecl" --ech true
575
[ "$allgood" != "yes" ] && echo "$LINENO"
576
cli_test "$turl" 1 1 --ech ecl:"$badecl" --ech true --ech ecl:"$goodecl"
577
[ "$allgood" != "yes" ] && echo "$LINENO"
578
cli_test "$turl" 1 1 --ech ecl:"$badecl" --ech true --ech ecl:"$goodecl" --ech pn:"$goodpn"
579
[ "$allgood" != "yes" ] && echo "$LINENO"
580
cli_test "$turl" 0 0 --ech ecl:"$badecl" --ech true --ech pn:"$goodpn"
581
[ "$allgood" != "yes" ] && echo "$LINENO"
582
cli_test "$turl" 1 1 --ech ecl:"$goodecl"
583
[ "$allgood" != "yes" ] && echo "$LINENO"
584
cli_test "$turl" 1 1 --ech ecl:"$goodecl" --ech pn:"$goodpn"
585
[ "$allgood" != "yes" ] && echo "$LINENO"
586
cli_test "$turl" 1 0 --ech false
587
[ "$allgood" != "yes" ] && echo "$LINENO"
588
cli_test "$turl" 1 0 --ech false --ech ecl:"$badecl"
589
[ "$allgood" != "yes" ] && echo "$LINENO"
590
cli_test "$turl" 1 0 --ech false --ech ecl:"$badecl" --ech ecl:"$goodecl"
591
[ "$allgood" != "yes" ] && echo "$LINENO"
592
cli_test "$turl" 1 0 --ech false --ech ecl:"$badecl" --ech ecl:"$goodecl" --ech pn:"$goodpn"
593
[ "$allgood" != "yes" ] && echo "$LINENO"
594
cli_test "$turl" 0 0 --ech false --ech ecl:"$badecl" --ech hard
595
[ "$allgood" != "yes" ] && echo "$LINENO"
596
cli_test "$turl" 1 1 --ech false --ech ecl:"$badecl" --ech hard --ech ecl:"$goodecl"
597
[ "$allgood" != "yes" ] && echo "$LINENO"
598
cli_test "$turl" 1 1 --ech false --ech ecl:"$badecl" --ech hard --ech ecl:"$goodecl" --ech pn:"$goodpn"
599
[ "$allgood" != "yes" ] && echo "$LINENO"
600
cli_test "$turl" 0 0 --ech false --ech ecl:"$badecl" --ech hard --ech pn:"$goodpn"
601
[ "$allgood" != "yes" ] && echo "$LINENO"
602
cli_test "$turl" 0 0 --ech false --ech ecl:"$badecl" --ech hard --ech true
603
[ "$allgood" != "yes" ] && echo "$LINENO"
604
cli_test "$turl" 1 1 --ech false --ech ecl:"$badecl" --ech hard --ech true --ech ecl:"$goodecl"
605
[ "$allgood" != "yes" ] && echo "$LINENO"
606
cli_test "$turl" 1 1 --ech false --ech ecl:"$badecl" --ech hard --ech true --ech ecl:"$goodecl" --ech pn:"$goodpn"
607
[ "$allgood" != "yes" ] && echo "$LINENO"
608
cli_test "$turl" 0 0 --ech false --ech ecl:"$badecl" --ech hard --ech true --ech pn:"$goodpn"
609
[ "$allgood" != "yes" ] && echo "$LINENO"
610
cli_test "$turl" 1 0 --ech false --ech ecl:"$badecl" --ech pn:"$badpn"
611
[ "$allgood" != "yes" ] && echo "$LINENO"
612
cli_test "$turl" 1 0 --ech false --ech ecl:"$badecl" --ech pn:"$badpn" --ech ecl:"$goodecl"
613
[ "$allgood" != "yes" ] && echo "$LINENO"
614
cli_test "$turl" 1 0 --ech false --ech ecl:"$badecl" --ech pn:"$badpn" --ech ecl:"$goodecl" --ech pn:"$goodpn"
615
[ "$allgood" != "yes" ] && echo "$LINENO"
616
cli_test "$turl" 0 0 --ech false --ech ecl:"$badecl" --ech pn:"$badpn" --ech hard
617
[ "$allgood" != "yes" ] && echo "$LINENO"
618
cli_test "$turl" 1 1 --ech false --ech ecl:"$badecl" --ech pn:"$badpn" --ech hard --ech ecl:"$goodecl"
619
[ "$allgood" != "yes" ] && echo "$LINENO"
620
cli_test "$turl" 1 1 --ech false --ech ecl:"$badecl" --ech pn:"$badpn" --ech hard --ech ecl:"$goodecl" --ech pn:"$goodpn"
621
[ "$allgood" != "yes" ] && echo "$LINENO"
622
cli_test "$turl" 0 0 --ech false --ech ecl:"$badecl" --ech pn:"$badpn" --ech hard --ech pn:"$goodpn"
623
[ "$allgood" != "yes" ] && echo "$LINENO"
624
cli_test "$turl" 0 0 --ech false --ech ecl:"$badecl" --ech pn:"$badpn" --ech hard --ech true
625
[ "$allgood" != "yes" ] && echo "$LINENO"
626
cli_test "$turl" 1 1 --ech false --ech ecl:"$badecl" --ech pn:"$badpn" --ech hard --ech true --ech ecl:"$goodecl"
627
[ "$allgood" != "yes" ] && echo "$LINENO"
628
cli_test "$turl" 1 1 --ech false --ech ecl:"$badecl" --ech pn:"$badpn" --ech hard --ech true --ech ecl:"$goodecl" --ech pn:"$goodpn"
629
[ "$allgood" != "yes" ] && echo "$LINENO"
630
cli_test "$turl" 0 0 --ech false --ech ecl:"$badecl" --ech pn:"$badpn" --ech hard --ech true --ech pn:"$goodpn"
631
[ "$allgood" != "yes" ] && echo "$LINENO"
632
cli_test "$turl" 1 0 --ech false --ech ecl:"$badecl" --ech pn:"$badpn" --ech pn:"$goodpn"
633
[ "$allgood" != "yes" ] && echo "$LINENO"
634
cli_test "$turl" 0 0 --ech false --ech ecl:"$badecl" --ech pn:"$badpn" --ech true
635
[ "$allgood" != "yes" ] && echo "$LINENO"
636
cli_test "$turl" 1 1 --ech false --ech ecl:"$badecl" --ech pn:"$badpn" --ech true --ech ecl:"$goodecl"
637
[ "$allgood" != "yes" ] && echo "$LINENO"
638
cli_test "$turl" 1 1 --ech false --ech ecl:"$badecl" --ech pn:"$badpn" --ech true --ech ecl:"$goodecl" --ech pn:"$goodpn"
639
[ "$allgood" != "yes" ] && echo "$LINENO"
640
cli_test "$turl" 0 0 --ech false --ech ecl:"$badecl" --ech pn:"$badpn" --ech true --ech pn:"$goodpn"
641
[ "$allgood" != "yes" ] && echo "$LINENO"
642
cli_test "$turl" 1 0 --ech false --ech ecl:"$badecl" --ech pn:"$goodpn"
643
[ "$allgood" != "yes" ] && echo "$LINENO"
644
cli_test "$turl" 0 0 --ech false --ech ecl:"$badecl" --ech true
645
[ "$allgood" != "yes" ] && echo "$LINENO"
646
cli_test "$turl" 1 1 --ech false --ech ecl:"$badecl" --ech true --ech ecl:"$goodecl"
647
[ "$allgood" != "yes" ] && echo "$LINENO"
648
cli_test "$turl" 1 1 --ech false --ech ecl:"$badecl" --ech true --ech ecl:"$goodecl" --ech pn:"$goodpn"
649
[ "$allgood" != "yes" ] && echo "$LINENO"
650
cli_test "$turl" 0 0 --ech false --ech ecl:"$badecl" --ech true --ech pn:"$goodpn"
651
[ "$allgood" != "yes" ] && echo "$LINENO"
652
cli_test "$turl" 1 0 --ech false --ech ecl:"$goodecl"
653
[ "$allgood" != "yes" ] && echo "$LINENO"
654
cli_test "$turl" 1 0 --ech false --ech ecl:"$goodecl" --ech pn:"$goodpn"
655
[ "$allgood" != "yes" ] && echo "$LINENO"
656
cli_test "$turl" 1 1 --ech false --ech hard
657
[ "$allgood" != "yes" ] && echo "$LINENO"
658
cli_test "$turl" 1 1 --ech false --ech hard --ech ecl:"$goodecl"
659
[ "$allgood" != "yes" ] && echo "$LINENO"
660
cli_test "$turl" 1 1 --ech false --ech hard --ech ecl:"$goodecl" --ech pn:"$goodpn"
661
[ "$allgood" != "yes" ] && echo "$LINENO"
662
cli_test "$turl" 1 1 --ech false --ech hard --ech pn:"$goodpn"
663
[ "$allgood" != "yes" ] && echo "$LINENO"
664
cli_test "$turl" 1 1 --ech false --ech hard --ech true
665
[ "$allgood" != "yes" ] && echo "$LINENO"
666
cli_test "$turl" 1 1 --ech false --ech hard --ech true --ech ecl:"$goodecl"
667
[ "$allgood" != "yes" ] && echo "$LINENO"
668
cli_test "$turl" 1 1 --ech false --ech hard --ech true --ech ecl:"$goodecl" --ech pn:"$goodpn"
669
[ "$allgood" != "yes" ] && echo "$LINENO"
670
cli_test "$turl" 1 1 --ech false --ech hard --ech true --ech pn:"$goodpn"
671
[ "$allgood" != "yes" ] && echo "$LINENO"
672
cli_test "$turl" 1 0 --ech false --ech pn:"$badpn"
673
[ "$allgood" != "yes" ] && echo "$LINENO"
674
cli_test "$turl" 1 0 --ech false --ech pn:"$badpn" --ech ecl:"$goodecl"
675
[ "$allgood" != "yes" ] && echo "$LINENO"
676
cli_test "$turl" 1 0 --ech false --ech pn:"$badpn" --ech ecl:"$goodecl" --ech pn:"$goodpn"
677
[ "$allgood" != "yes" ] && echo "$LINENO"
678
cli_test "$turl" 1 1 --ech false --ech pn:"$badpn" --ech hard
679
[ "$allgood" != "yes" ] && echo "$LINENO"
680
cli_test "$turl" 1 1 --ech false --ech pn:"$badpn" --ech hard --ech ecl:"$goodecl"
681
[ "$allgood" != "yes" ] && echo "$LINENO"
682
cli_test "$turl" 1 1 --ech false --ech pn:"$badpn" --ech hard --ech ecl:"$goodecl" --ech pn:"$goodpn"
683
[ "$allgood" != "yes" ] && echo "$LINENO"
684
cli_test "$turl" 1 1 --ech false --ech pn:"$badpn" --ech hard --ech pn:"$goodpn"
685
[ "$allgood" != "yes" ] && echo "$LINENO"
686
cli_test "$turl" 1 1 --ech false --ech pn:"$badpn" --ech hard --ech true
687
[ "$allgood" != "yes" ] && echo "$LINENO"
688
cli_test "$turl" 1 1 --ech false --ech pn:"$badpn" --ech hard --ech true --ech ecl:"$goodecl"
689
[ "$allgood" != "yes" ] && echo "$LINENO"
690
cli_test "$turl" 1 1 --ech false --ech pn:"$badpn" --ech hard --ech true --ech ecl:"$goodecl" --ech pn:"$goodpn"
691
[ "$allgood" != "yes" ] && echo "$LINENO"
692
cli_test "$turl" 1 1 --ech false --ech pn:"$badpn" --ech hard --ech true --ech pn:"$goodpn"
693
[ "$allgood" != "yes" ] && echo "$LINENO"
694
cli_test "$turl" 1 0 --ech false --ech pn:"$badpn" --ech pn:"$goodpn"
695
[ "$allgood" != "yes" ] && echo "$LINENO"
696
cli_test "$turl" 1 1 --ech false --ech pn:"$badpn" --ech true
697
[ "$allgood" != "yes" ] && echo "$LINENO"
698
cli_test "$turl" 1 1 --ech false --ech pn:"$badpn" --ech true --ech ecl:"$goodecl"
699
[ "$allgood" != "yes" ] && echo "$LINENO"
700
cli_test "$turl" 1 1 --ech false --ech pn:"$badpn" --ech true --ech ecl:"$goodecl" --ech pn:"$goodpn"
701
[ "$allgood" != "yes" ] && echo "$LINENO"
702
cli_test "$turl" 1 1 --ech false --ech pn:"$badpn" --ech true --ech pn:"$goodpn"
703
[ "$allgood" != "yes" ] && echo "$LINENO"
704
cli_test "$turl" 1 0 --ech false --ech pn:"$goodpn"
705
[ "$allgood" != "yes" ] && echo "$LINENO"
706
cli_test "$turl" 1 1 --ech false --ech true
707
[ "$allgood" != "yes" ] && echo "$LINENO"
708
cli_test "$turl" 1 1 --ech false --ech true --ech ecl:"$goodecl"
709
[ "$allgood" != "yes" ] && echo "$LINENO"
710
cli_test "$turl" 1 1 --ech false --ech true --ech ecl:"$goodecl" --ech pn:"$goodpn"
711
[ "$allgood" != "yes" ] && echo "$LINENO"
712
cli_test "$turl" 1 1 --ech false --ech true --ech pn:"$goodpn"
713
[ "$allgood" != "yes" ] && echo "$LINENO"
714
cli_test "$turl" 1 1 --ech hard
715
[ "$allgood" != "yes" ] && echo "$LINENO"
716
cli_test "$turl" 1 1 --ech hard --ech ecl:"$goodecl"
717
[ "$allgood" != "yes" ] && echo "$LINENO"
718
cli_test "$turl" 1 1 --ech hard --ech ecl:"$goodecl" --ech pn:"$goodpn"
719
[ "$allgood" != "yes" ] && echo "$LINENO"
720
cli_test "$turl" 1 1 --ech hard --ech pn:"$goodpn"
721
[ "$allgood" != "yes" ] && echo "$LINENO"
722
cli_test "$turl" 1 1 --ech hard --ech true
723
[ "$allgood" != "yes" ] && echo "$LINENO"
724
cli_test "$turl" 1 1 --ech hard --ech true --ech ecl:"$goodecl"
725
[ "$allgood" != "yes" ] && echo "$LINENO"
726
cli_test "$turl" 1 1 --ech hard --ech true --ech ecl:"$goodecl" --ech pn:"$goodpn"
727
[ "$allgood" != "yes" ] && echo "$LINENO"
728
cli_test "$turl" 1 1 --ech hard --ech true --ech pn:"$goodpn"
729
[ "$allgood" != "yes" ] && echo "$LINENO"
730
cli_test "$turl" 1 0 --ech pn:"$badpn"
731
[ "$allgood" != "yes" ] && echo "$LINENO"
732
cli_test "$turl" 1 1 --ech pn:"$badpn" --ech ecl:"$goodecl"
733
[ "$allgood" != "yes" ] && echo "$LINENO"
734
cli_test "$turl" 1 1 --ech pn:"$badpn" --ech ecl:"$goodecl" --ech pn:"$goodpn"
735
[ "$allgood" != "yes" ] && echo "$LINENO"
736
cli_test "$turl" 1 1 --ech pn:"$badpn" --ech hard
737
[ "$allgood" != "yes" ] && echo "$LINENO"
738
cli_test "$turl" 1 1 --ech pn:"$badpn" --ech hard --ech ecl:"$goodecl"
739
[ "$allgood" != "yes" ] && echo "$LINENO"
740
cli_test "$turl" 1 1 --ech pn:"$badpn" --ech hard --ech ecl:"$goodecl" --ech pn:"$goodpn"
741
[ "$allgood" != "yes" ] && echo "$LINENO"
742
cli_test "$turl" 1 1 --ech pn:"$badpn" --ech hard --ech pn:"$goodpn"
743
[ "$allgood" != "yes" ] && echo "$LINENO"
744
cli_test "$turl" 1 1 --ech pn:"$badpn" --ech hard --ech true
745
[ "$allgood" != "yes" ] && echo "$LINENO"
746
cli_test "$turl" 1 1 --ech pn:"$badpn" --ech hard --ech true --ech ecl:"$goodecl"
747
[ "$allgood" != "yes" ] && echo "$LINENO"
748
cli_test "$turl" 1 1 --ech pn:"$badpn" --ech hard --ech true --ech ecl:"$goodecl" --ech pn:"$goodpn"
749
[ "$allgood" != "yes" ] && echo "$LINENO"
750
cli_test "$turl" 1 1 --ech pn:"$badpn" --ech hard --ech true --ech pn:"$goodpn"
751
[ "$allgood" != "yes" ] && echo "$LINENO"
752
cli_test "$turl" 1 0 --ech pn:"$badpn" --ech pn:"$goodpn"
753
[ "$allgood" != "yes" ] && echo "$LINENO"
754
cli_test "$turl" 1 1 --ech pn:"$badpn" --ech true
755
[ "$allgood" != "yes" ] && echo "$LINENO"
756
cli_test "$turl" 1 1 --ech pn:"$badpn" --ech true --ech ecl:"$goodecl"
757
[ "$allgood" != "yes" ] && echo "$LINENO"
758
cli_test "$turl" 1 1 --ech pn:"$badpn" --ech true --ech ecl:"$goodecl" --ech pn:"$goodpn"
759
[ "$allgood" != "yes" ] && echo "$LINENO"
760
cli_test "$turl" 1 1 --ech pn:"$badpn" --ech true --ech pn:"$goodpn"
761
[ "$allgood" != "yes" ] && echo "$LINENO"
762
cli_test "$turl" 1 0 --ech pn:"$goodpn"
763
[ "$allgood" != "yes" ] && echo "$LINENO"
764
cli_test "$turl" 1 1 --ech true
765
[ "$allgood" != "yes" ] && echo "$LINENO"
766
cli_test "$turl" 1 1 --ech true --ech ecl:"$goodecl"
767
[ "$allgood" != "yes" ] && echo "$LINENO"
768
cli_test "$turl" 1 1 --ech true --ech ecl:"$goodecl" --ech pn:"$goodpn"
769
[ "$allgood" != "yes" ] && echo "$LINENO"
770
cli_test "$turl" 1 1 --ech true --ech pn:"$goodpn"
771
[ "$allgood" != "yes" ] && echo "$LINENO"
772
cli_test "$turl" 1 0
773
[ "$allgood" != "yes" ] && echo "$LINENO"
774
cli_test "$turl" 1 1 --ech ecl:"$goodecl"
775
[ "$allgood" != "yes" ] && echo "$LINENO"
776
cli_test "$turl" 1 1 --ech ecl:"$goodecl" --ech pn:"$goodpn"
777
[ "$allgood" != "yes" ] && echo "$LINENO"
778
cli_test "$turl" 1 0 --ech pn:"$goodpn"
779
[ "$allgood" != "yes" ] && echo "$LINENO"
780
cli_test "$turl" 1 1 --ech true
781
[ "$allgood" != "yes" ] && echo "$LINENO"
782
cli_test "$turl" 1 1 --ech true --ech ecl:"$goodecl"
783
[ "$allgood" != "yes" ] && echo "$LINENO"
784
cli_test "$turl" 1 1 --ech true --ech ecl:"$goodecl" --ech pn:"$goodpn"
785
[ "$allgood" != "yes" ] && echo "$LINENO"
786
cli_test "$turl" 1 1 --ech true --ech pn:"$goodpn"
787
[ "$allgood" != "yes" ] && echo "$LINENO"
788
789
# a target URL that doesn't support ECH
790
turl="https://tcd.ie"
791
echo "cli_test with $turl"
792
echo "cli_test with $turl" >> "$logfile"
793
# the params below don't matter much here as we'll fail anyway
794
echconfiglist=$(get_ech_configlist defo.ie)
795
goodecl=$echconfiglist
796
badecl="$goodecl"
797
goodpn="tcd.ie"
798
badpn="tcd.ie"
799
cli_test "$turl" 1 0
800
[ "$allgood" != "yes" ] && echo "$LINENO"
801
cli_test "$turl" 0 0 --ech ecl:"$badecl"
802
[ "$allgood" != "yes" ] && echo "$LINENO"
803
cli_test "$turl" 0 0 --ech ecl:"$badecl" --ech ecl:"$goodecl"
804
[ "$allgood" != "yes" ] && echo "$LINENO"
805
cli_test "$turl" 0 0 --ech ecl:"$badecl" --ech ecl:"$goodecl" --ech pn:"$goodpn"
806
[ "$allgood" != "yes" ] && echo "$LINENO"
807
cli_test "$turl" 0 0 --ech ecl:"$badecl" --ech hard
808
[ "$allgood" != "yes" ] && echo "$LINENO"
809
cli_test "$turl" 0 0 --ech ecl:"$badecl" --ech hard --ech ecl:"$goodecl"
810
[ "$allgood" != "yes" ] && echo "$LINENO"
811
cli_test "$turl" 0 0 --ech ecl:"$badecl" --ech hard --ech ecl:"$goodecl" --ech pn:"$goodpn"
812
[ "$allgood" != "yes" ] && echo "$LINENO"
813
cli_test "$turl" 0 0 --ech ecl:"$badecl" --ech hard --ech pn:"$goodpn"
814
[ "$allgood" != "yes" ] && echo "$LINENO"
815
cli_test "$turl" 0 0 --ech ecl:"$badecl" --ech hard --ech true
816
[ "$allgood" != "yes" ] && echo "$LINENO"
817
cli_test "$turl" 0 0 --ech ecl:"$badecl" --ech hard --ech true --ech ecl:"$goodecl"
818
[ "$allgood" != "yes" ] && echo "$LINENO"
819
cli_test "$turl" 0 0 --ech ecl:"$badecl" --ech hard --ech true --ech ecl:"$goodecl" --ech pn:"$goodpn"
820
[ "$allgood" != "yes" ] && echo "$LINENO"
821
cli_test "$turl" 0 0 --ech ecl:"$badecl" --ech hard --ech true --ech pn:"$goodpn"
822
[ "$allgood" != "yes" ] && echo "$LINENO"
823
cli_test "$turl" 0 0 --ech ecl:"$badecl" --ech pn:"$badpn"
824
[ "$allgood" != "yes" ] && echo "$LINENO"
825
cli_test "$turl" 0 0 --ech ecl:"$badecl" --ech pn:"$badpn" --ech ecl:"$goodecl"
826
[ "$allgood" != "yes" ] && echo "$LINENO"
827
cli_test "$turl" 0 0 --ech ecl:"$badecl" --ech pn:"$badpn" --ech ecl:"$goodecl" --ech pn:"$goodpn"
828
[ "$allgood" != "yes" ] && echo "$LINENO"
829
cli_test "$turl" 0 0 --ech ecl:"$badecl" --ech pn:"$badpn" --ech hard
830
[ "$allgood" != "yes" ] && echo "$LINENO"
831
cli_test "$turl" 0 0 --ech ecl:"$badecl" --ech pn:"$badpn" --ech hard --ech ecl:"$goodecl"
832
[ "$allgood" != "yes" ] && echo "$LINENO"
833
cli_test "$turl" 0 0 --ech ecl:"$badecl" --ech pn:"$badpn" --ech hard --ech ecl:"$goodecl" --ech pn:"$goodpn"
834
[ "$allgood" != "yes" ] && echo "$LINENO"
835
cli_test "$turl" 0 0 --ech ecl:"$badecl" --ech pn:"$badpn" --ech hard --ech pn:"$goodpn"
836
[ "$allgood" != "yes" ] && echo "$LINENO"
837
cli_test "$turl" 0 0 --ech ecl:"$badecl" --ech pn:"$badpn" --ech hard --ech true
838
[ "$allgood" != "yes" ] && echo "$LINENO"
839
cli_test "$turl" 0 0 --ech ecl:"$badecl" --ech pn:"$badpn" --ech hard --ech true --ech ecl:"$goodecl"
840
[ "$allgood" != "yes" ] && echo "$LINENO"
841
cli_test "$turl" 0 0 --ech ecl:"$badecl" --ech pn:"$badpn" --ech hard --ech true --ech ecl:"$goodecl" --ech pn:"$goodpn"
842
[ "$allgood" != "yes" ] && echo "$LINENO"
843
cli_test "$turl" 0 0 --ech ecl:"$badecl" --ech pn:"$badpn" --ech hard --ech true --ech pn:"$goodpn"
844
[ "$allgood" != "yes" ] && echo "$LINENO"
845
cli_test "$turl" 0 0 --ech ecl:"$badecl" --ech pn:"$badpn" --ech pn:"$goodpn"
846
[ "$allgood" != "yes" ] && echo "$LINENO"
847
cli_test "$turl" 0 0 --ech ecl:"$badecl" --ech pn:"$badpn" --ech true
848
[ "$allgood" != "yes" ] && echo "$LINENO"
849
cli_test "$turl" 0 0 --ech ecl:"$badecl" --ech pn:"$badpn" --ech true --ech ecl:"$goodecl"
850
[ "$allgood" != "yes" ] && echo "$LINENO"
851
cli_test "$turl" 0 0 --ech ecl:"$badecl" --ech pn:"$badpn" --ech true --ech ecl:"$goodecl" --ech pn:"$goodpn"
852
[ "$allgood" != "yes" ] && echo "$LINENO"
853
cli_test "$turl" 0 0 --ech ecl:"$badecl" --ech pn:"$badpn" --ech true --ech pn:"$goodpn"
854
[ "$allgood" != "yes" ] && echo "$LINENO"
855
cli_test "$turl" 0 0 --ech ecl:"$badecl" --ech pn:"$goodpn"
856
[ "$allgood" != "yes" ] && echo "$LINENO"
857
cli_test "$turl" 0 0 --ech ecl:"$badecl" --ech true
858
[ "$allgood" != "yes" ] && echo "$LINENO"
859
cli_test "$turl" 0 0 --ech ecl:"$badecl" --ech true --ech ecl:"$goodecl"
860
[ "$allgood" != "yes" ] && echo "$LINENO"
861
cli_test "$turl" 0 0 --ech ecl:"$badecl" --ech true --ech ecl:"$goodecl" --ech pn:"$goodpn"
862
[ "$allgood" != "yes" ] && echo "$LINENO"
863
cli_test "$turl" 0 0 --ech ecl:"$badecl" --ech true --ech pn:"$goodpn"
864
[ "$allgood" != "yes" ] && echo "$LINENO"
865
cli_test "$turl" 0 0 --ech ecl:"$goodecl"
866
[ "$allgood" != "yes" ] && echo "$LINENO"
867
cli_test "$turl" 0 0 --ech ecl:"$goodecl" --ech pn:"$goodpn"
868
[ "$allgood" != "yes" ] && echo "$LINENO"
869
cli_test "$turl" 0 0 --ech false
870
[ "$allgood" != "yes" ] && echo "$LINENO"
871
cli_test "$turl" 0 0 --ech false --ech ecl:"$badecl"
872
[ "$allgood" != "yes" ] && echo "$LINENO"
873
cli_test "$turl" 0 0 --ech false --ech ecl:"$badecl" --ech ecl:"$goodecl"
874
[ "$allgood" != "yes" ] && echo "$LINENO"
875
cli_test "$turl" 0 0 --ech false --ech ecl:"$badecl" --ech ecl:"$goodecl" --ech pn:"$goodpn"
876
[ "$allgood" != "yes" ] && echo "$LINENO"
877
cli_test "$turl" 0 0 --ech false --ech ecl:"$badecl" --ech hard
878
[ "$allgood" != "yes" ] && echo "$LINENO"
879
cli_test "$turl" 0 0 --ech false --ech ecl:"$badecl" --ech hard --ech ecl:"$goodecl"
880
[ "$allgood" != "yes" ] && echo "$LINENO"
881
cli_test "$turl" 0 0 --ech false --ech ecl:"$badecl" --ech hard --ech ecl:"$goodecl" --ech pn:"$goodpn"
882
[ "$allgood" != "yes" ] && echo "$LINENO"
883
cli_test "$turl" 0 0 --ech false --ech ecl:"$badecl" --ech hard --ech pn:"$goodpn"
884
[ "$allgood" != "yes" ] && echo "$LINENO"
885
cli_test "$turl" 0 0 --ech false --ech ecl:"$badecl" --ech hard --ech true
886
[ "$allgood" != "yes" ] && echo "$LINENO"
887
cli_test "$turl" 0 0 --ech false --ech ecl:"$badecl" --ech hard --ech true --ech ecl:"$goodecl"
888
[ "$allgood" != "yes" ] && echo "$LINENO"
889
cli_test "$turl" 0 0 --ech false --ech ecl:"$badecl" --ech hard --ech true --ech ecl:"$goodecl" --ech pn:"$goodpn"
890
[ "$allgood" != "yes" ] && echo "$LINENO"
891
cli_test "$turl" 0 0 --ech false --ech ecl:"$badecl" --ech hard --ech true --ech pn:"$goodpn"
892
[ "$allgood" != "yes" ] && echo "$LINENO"
893
cli_test "$turl" 0 0 --ech false --ech ecl:"$badecl" --ech pn:"$badpn"
894
[ "$allgood" != "yes" ] && echo "$LINENO"
895
cli_test "$turl" 0 0 --ech false --ech ecl:"$badecl" --ech pn:"$badpn" --ech ecl:"$goodecl"
896
[ "$allgood" != "yes" ] && echo "$LINENO"
897
cli_test "$turl" 0 0 --ech false --ech ecl:"$badecl" --ech pn:"$badpn" --ech ecl:"$goodecl" --ech pn:"$goodpn"
898
[ "$allgood" != "yes" ] && echo "$LINENO"
899
cli_test "$turl" 0 0 --ech false --ech ecl:"$badecl" --ech pn:"$badpn" --ech hard
900
[ "$allgood" != "yes" ] && echo "$LINENO"
901
cli_test "$turl" 0 0 --ech false --ech ecl:"$badecl" --ech pn:"$badpn" --ech hard --ech ecl:"$goodecl"
902
[ "$allgood" != "yes" ] && echo "$LINENO"
903
cli_test "$turl" 0 0 --ech false --ech ecl:"$badecl" --ech pn:"$badpn" --ech hard --ech ecl:"$goodecl" --ech pn:"$goodpn"
904
[ "$allgood" != "yes" ] && echo "$LINENO"
905
cli_test "$turl" 0 0 --ech false --ech ecl:"$badecl" --ech pn:"$badpn" --ech hard --ech pn:"$goodpn"
906
[ "$allgood" != "yes" ] && echo "$LINENO"
907
cli_test "$turl" 0 0 --ech false --ech ecl:"$badecl" --ech pn:"$badpn" --ech hard --ech true
908
[ "$allgood" != "yes" ] && echo "$LINENO"
909
cli_test "$turl" 0 0 --ech false --ech ecl:"$badecl" --ech pn:"$badpn" --ech hard --ech true --ech ecl:"$goodecl"
910
[ "$allgood" != "yes" ] && echo "$LINENO"
911
cli_test "$turl" 0 0 --ech false --ech ecl:"$badecl" --ech pn:"$badpn" --ech hard --ech true --ech ecl:"$goodecl" --ech pn:"$goodpn"
912
[ "$allgood" != "yes" ] && echo "$LINENO"
913
cli_test "$turl" 0 0 --ech false --ech ecl:"$badecl" --ech pn:"$badpn" --ech hard --ech true --ech pn:"$goodpn"
914
[ "$allgood" != "yes" ] && echo "$LINENO"
915
cli_test "$turl" 0 0 --ech false --ech ecl:"$badecl" --ech pn:"$badpn" --ech pn:"$goodpn"
916
[ "$allgood" != "yes" ] && echo "$LINENO"
917
cli_test "$turl" 0 0 --ech false --ech ecl:"$badecl" --ech pn:"$badpn" --ech true
918
[ "$allgood" != "yes" ] && echo "$LINENO"
919
cli_test "$turl" 0 0 --ech false --ech ecl:"$badecl" --ech pn:"$badpn" --ech true --ech ecl:"$goodecl"
920
[ "$allgood" != "yes" ] && echo "$LINENO"
921
cli_test "$turl" 0 0 --ech false --ech ecl:"$badecl" --ech pn:"$badpn" --ech true --ech ecl:"$goodecl" --ech pn:"$goodpn"
922
[ "$allgood" != "yes" ] && echo "$LINENO"
923
cli_test "$turl" 0 0 --ech false --ech ecl:"$badecl" --ech pn:"$badpn" --ech true --ech pn:"$goodpn"
924
[ "$allgood" != "yes" ] && echo "$LINENO"
925
cli_test "$turl" 0 0 --ech false --ech ecl:"$badecl" --ech pn:"$goodpn"
926
[ "$allgood" != "yes" ] && echo "$LINENO"
927
cli_test "$turl" 0 0 --ech false --ech ecl:"$badecl" --ech true
928
[ "$allgood" != "yes" ] && echo "$LINENO"
929
cli_test "$turl" 0 0 --ech false --ech ecl:"$badecl" --ech true --ech ecl:"$goodecl"
930
[ "$allgood" != "yes" ] && echo "$LINENO"
931
cli_test "$turl" 0 0 --ech false --ech ecl:"$badecl" --ech true --ech ecl:"$goodecl" --ech pn:"$goodpn"
932
[ "$allgood" != "yes" ] && echo "$LINENO"
933
cli_test "$turl" 0 0 --ech false --ech ecl:"$badecl" --ech true --ech pn:"$goodpn"
934
[ "$allgood" != "yes" ] && echo "$LINENO"
935
cli_test "$turl" 0 0 --ech false --ech ecl:"$goodecl"
936
[ "$allgood" != "yes" ] && echo "$LINENO"
937
cli_test "$turl" 0 0 --ech false --ech ecl:"$goodecl" --ech pn:"$goodpn"
938
[ "$allgood" != "yes" ] && echo "$LINENO"
939
cli_test "$turl" 0 0 --ech false --ech hard
940
[ "$allgood" != "yes" ] && echo "$LINENO"
941
cli_test "$turl" 0 0 --ech false --ech hard --ech ecl:"$goodecl"
942
[ "$allgood" != "yes" ] && echo "$LINENO"
943
cli_test "$turl" 0 0 --ech false --ech hard --ech ecl:"$goodecl" --ech pn:"$goodpn"
944
[ "$allgood" != "yes" ] && echo "$LINENO"
945
cli_test "$turl" 0 0 --ech false --ech hard --ech pn:"$goodpn"
946
[ "$allgood" != "yes" ] && echo "$LINENO"
947
cli_test "$turl" 0 0 --ech false --ech hard --ech true
948
[ "$allgood" != "yes" ] && echo "$LINENO"
949
cli_test "$turl" 0 0 --ech false --ech hard --ech true --ech ecl:"$goodecl"
950
[ "$allgood" != "yes" ] && echo "$LINENO"
951
cli_test "$turl" 0 0 --ech false --ech hard --ech true --ech ecl:"$goodecl" --ech pn:"$goodpn"
952
[ "$allgood" != "yes" ] && echo "$LINENO"
953
cli_test "$turl" 0 0 --ech false --ech hard --ech true --ech pn:"$goodpn"
954
[ "$allgood" != "yes" ] && echo "$LINENO"
955
cli_test "$turl" 0 0 --ech false --ech pn:"$badpn"
956
[ "$allgood" != "yes" ] && echo "$LINENO"
957
cli_test "$turl" 0 0 --ech false --ech pn:"$badpn" --ech ecl:"$goodecl"
958
[ "$allgood" != "yes" ] && echo "$LINENO"
959
cli_test "$turl" 0 0 --ech false --ech pn:"$badpn" --ech ecl:"$goodecl" --ech pn:"$goodpn"
960
[ "$allgood" != "yes" ] && echo "$LINENO"
961
cli_test "$turl" 0 0 --ech false --ech pn:"$badpn" --ech hard
962
[ "$allgood" != "yes" ] && echo "$LINENO"
963
cli_test "$turl" 0 0 --ech false --ech pn:"$badpn" --ech hard --ech ecl:"$goodecl"
964
[ "$allgood" != "yes" ] && echo "$LINENO"
965
cli_test "$turl" 0 0 --ech false --ech pn:"$badpn" --ech hard --ech ecl:"$goodecl" --ech pn:"$goodpn"
966
[ "$allgood" != "yes" ] && echo "$LINENO"
967
cli_test "$turl" 0 0 --ech false --ech pn:"$badpn" --ech hard --ech pn:"$goodpn"
968
[ "$allgood" != "yes" ] && echo "$LINENO"
969
cli_test "$turl" 0 0 --ech false --ech pn:"$badpn" --ech hard --ech true
970
[ "$allgood" != "yes" ] && echo "$LINENO"
971
cli_test "$turl" 0 0 --ech false --ech pn:"$badpn" --ech hard --ech true --ech ecl:"$goodecl"
972
[ "$allgood" != "yes" ] && echo "$LINENO"
973
cli_test "$turl" 0 0 --ech false --ech pn:"$badpn" --ech hard --ech true --ech ecl:"$goodecl" --ech pn:"$goodpn"
974
[ "$allgood" != "yes" ] && echo "$LINENO"
975
cli_test "$turl" 0 0 --ech false --ech pn:"$badpn" --ech hard --ech true --ech pn:"$goodpn"
976
[ "$allgood" != "yes" ] && echo "$LINENO"
977
cli_test "$turl" 0 0 --ech false --ech pn:"$badpn" --ech pn:"$goodpn"
978
[ "$allgood" != "yes" ] && echo "$LINENO"
979
cli_test "$turl" 0 0 --ech false --ech pn:"$badpn" --ech true
980
[ "$allgood" != "yes" ] && echo "$LINENO"
981
cli_test "$turl" 0 0 --ech false --ech pn:"$badpn" --ech true --ech ecl:"$goodecl"
982
[ "$allgood" != "yes" ] && echo "$LINENO"
983
cli_test "$turl" 0 0 --ech false --ech pn:"$badpn" --ech true --ech ecl:"$goodecl" --ech pn:"$goodpn"
984
[ "$allgood" != "yes" ] && echo "$LINENO"
985
cli_test "$turl" 0 0 --ech false --ech pn:"$badpn" --ech true --ech pn:"$goodpn"
986
[ "$allgood" != "yes" ] && echo "$LINENO"
987
cli_test "$turl" 0 0 --ech false --ech pn:"$goodpn"
988
[ "$allgood" != "yes" ] && echo "$LINENO"
989
cli_test "$turl" 0 0 --ech false --ech true
990
[ "$allgood" != "yes" ] && echo "$LINENO"
991
cli_test "$turl" 0 0 --ech false --ech true --ech ecl:"$goodecl"
992
[ "$allgood" != "yes" ] && echo "$LINENO"
993
cli_test "$turl" 0 0 --ech false --ech true --ech ecl:"$goodecl" --ech pn:"$goodpn"
994
[ "$allgood" != "yes" ] && echo "$LINENO"
995
cli_test "$turl" 0 0 --ech false --ech true --ech pn:"$goodpn"
996
[ "$allgood" != "yes" ] && echo "$LINENO"
997
cli_test "$turl" 0 0 --ech hard
998
[ "$allgood" != "yes" ] && echo "$LINENO"
999
cli_test "$turl" 0 0 --ech hard --ech ecl:"$goodecl"
1000
[ "$allgood" != "yes" ] && echo "$LINENO"
1001
cli_test "$turl" 0 0 --ech hard --ech ecl:"$goodecl" --ech pn:"$goodpn"
1002
[ "$allgood" != "yes" ] && echo "$LINENO"
1003
cli_test "$turl" 0 0 --ech hard --ech pn:"$goodpn"
1004
[ "$allgood" != "yes" ] && echo "$LINENO"
1005
cli_test "$turl" 0 0 --ech hard --ech true
1006
[ "$allgood" != "yes" ] && echo "$LINENO"
1007
cli_test "$turl" 0 0 --ech hard --ech true --ech ecl:"$goodecl"
1008
[ "$allgood" != "yes" ] && echo "$LINENO"
1009
cli_test "$turl" 0 0 --ech hard --ech true --ech ecl:"$goodecl" --ech pn:"$goodpn"
1010
[ "$allgood" != "yes" ] && echo "$LINENO"
1011
cli_test "$turl" 0 0 --ech hard --ech true --ech pn:"$goodpn"
1012
[ "$allgood" != "yes" ] && echo "$LINENO"
1013
cli_test "$turl" 0 0 --ech pn:"$badpn"
1014
[ "$allgood" != "yes" ] && echo "$LINENO"
1015
cli_test "$turl" 0 0 --ech pn:"$badpn" --ech ecl:"$goodecl"
1016
[ "$allgood" != "yes" ] && echo "$LINENO"
1017
cli_test "$turl" 0 0 --ech pn:"$badpn" --ech ecl:"$goodecl" --ech pn:"$goodpn"
1018
[ "$allgood" != "yes" ] && echo "$LINENO"
1019
cli_test "$turl" 0 0 --ech pn:"$badpn" --ech hard
1020
[ "$allgood" != "yes" ] && echo "$LINENO"
1021
cli_test "$turl" 0 0 --ech pn:"$badpn" --ech hard --ech ecl:"$goodecl"
1022
[ "$allgood" != "yes" ] && echo "$LINENO"
1023
cli_test "$turl" 0 0 --ech pn:"$badpn" --ech hard --ech ecl:"$goodecl" --ech pn:"$goodpn"
1024
[ "$allgood" != "yes" ] && echo "$LINENO"
1025
cli_test "$turl" 0 0 --ech pn:"$badpn" --ech hard --ech pn:"$goodpn"
1026
[ "$allgood" != "yes" ] && echo "$LINENO"
1027
cli_test "$turl" 0 0 --ech pn:"$badpn" --ech hard --ech true
1028
[ "$allgood" != "yes" ] && echo "$LINENO"
1029
cli_test "$turl" 0 0 --ech pn:"$badpn" --ech hard --ech true --ech ecl:"$goodecl"
1030
[ "$allgood" != "yes" ] && echo "$LINENO"
1031
cli_test "$turl" 0 0 --ech pn:"$badpn" --ech hard --ech true --ech ecl:"$goodecl" --ech pn:"$goodpn"
1032
[ "$allgood" != "yes" ] && echo "$LINENO"
1033
cli_test "$turl" 0 0 --ech pn:"$badpn" --ech hard --ech true --ech pn:"$goodpn"
1034
[ "$allgood" != "yes" ] && echo "$LINENO"
1035
cli_test "$turl" 0 0 --ech pn:"$badpn" --ech pn:"$goodpn"
1036
[ "$allgood" != "yes" ] && echo "$LINENO"
1037
cli_test "$turl" 0 0 --ech pn:"$badpn" --ech true
1038
[ "$allgood" != "yes" ] && echo "$LINENO"
1039
cli_test "$turl" 0 0 --ech pn:"$badpn" --ech true --ech ecl:"$goodecl"
1040
[ "$allgood" != "yes" ] && echo "$LINENO"
1041
cli_test "$turl" 0 0 --ech pn:"$badpn" --ech true --ech ecl:"$goodecl" --ech pn:"$goodpn"
1042
[ "$allgood" != "yes" ] && echo "$LINENO"
1043
cli_test "$turl" 0 0 --ech pn:"$badpn" --ech true --ech pn:"$goodpn"
1044
[ "$allgood" != "yes" ] && echo "$LINENO"
1045
cli_test "$turl" 0 0 --ech pn:"$goodpn"
1046
[ "$allgood" != "yes" ] && echo "$LINENO"
1047
cli_test "$turl" 0 0 --ech true
1048
[ "$allgood" != "yes" ] && echo "$LINENO"
1049
cli_test "$turl" 0 0 --ech true --ech ecl:"$goodecl"
1050
[ "$allgood" != "yes" ] && echo "$LINENO"
1051
cli_test "$turl" 0 0 --ech true --ech ecl:"$goodecl" --ech pn:"$goodpn"
1052
[ "$allgood" != "yes" ] && echo "$LINENO"
1053
cli_test "$turl" 0 0 --ech true --ech pn:"$goodpn"
1054
[ "$allgood" != "yes" ] && echo "$LINENO"
1055
cli_test "$turl" 0 0
1056
[ "$allgood" != "yes" ] && echo "$LINENO"
1057
cli_test "$turl" 0 0 --ech ecl:"$goodecl"
1058
[ "$allgood" != "yes" ] && echo "$LINENO"
1059
cli_test "$turl" 0 0 --ech ecl:"$goodecl" --ech pn:"$goodpn"
1060
[ "$allgood" != "yes" ] && echo "$LINENO"
1061
cli_test "$turl" 0 0 --ech pn:"$goodpn"
1062
[ "$allgood" != "yes" ] && echo "$LINENO"
1063
cli_test "$turl" 0 0 --ech true
1064
[ "$allgood" != "yes" ] && echo "$LINENO"
1065
cli_test "$turl" 0 0 --ech true --ech ecl:"$goodecl"
1066
[ "$allgood" != "yes" ] && echo "$LINENO"
1067
cli_test "$turl" 0 0 --ech true --ech ecl:"$goodecl" --ech pn:"$goodpn"
1068
[ "$allgood" != "yes" ] && echo "$LINENO"
1069
cli_test "$turl" 0 0 --ech true --ech pn:"$goodpn"
1070
[ "$allgood" != "yes" ] && echo "$LINENO"
1071
fi
1072
1073
END=$(whenisitagain)
1074
echo "Finished $0 at $END" >> "$logfile"
1075
echo "-----" >> "$logfile"
1076
1077
if [[ "$allgood" == "yes" ]]; then
1078
echo "Finished $0 at $END"
1079
echo "All good, log in $logfile"
1080
exit 0
1081
else
1082
echo "Finished $0 at $END"
1083
echo "NOT all good, log in $logfile"
1084
fi
1085
1086
# send a mail to root (will be fwd'd) but just once every 24 hours
1087
# 'cause we only really need "new" news
1088
itsnews="yes"
1089
age_of_news=0
1090
if [ -f "$LTOP"/bad_runs ]; then
1091
age_of_news=$(fileage "$LTOP"/bad_runs)
1092
# only consider news "new" if we haven't mailed today
1093
if ((age_of_news < 24*3600)); then
1094
itsnews="no"
1095
fi
1096
fi
1097
if [[ "$DOMAIL" == "yes" && "$itsnews" == "yes" ]]; then
1098
echo "ECH badness at $NOW" | mail -s "ECH badness at $NOW" root
1099
fi
1100
# add to list of bad runs (updating file age)
1101
echo "ECH badness at $NOW" >> "$LTOP"/bad_runs
1102
exit 2
1103
1104