2
0

ech_tests.sh 53 KB

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