ech_tests.sh 53 KB

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