bx509: Make test run with UBSAN

This commit is contained in:
Nicolas Williams
2022-11-01 16:08:48 -05:00
parent c87192e700
commit 3e1befe633

View File

@@ -640,10 +640,10 @@ ${kgetcred} -H HTTP/${server}@${R} ||
{ echo "Fetched TGT didn't work"; exit 2; } { echo "Fetched TGT didn't work"; exit 2; }
if which jq >/dev/null; then if which jq >/dev/null; then
if ! ${klistjson} | jq -e ' if ! ${klistjson} | jq -e '
(reduce (.tickets[0]|(.Issued,.Expires)| (.tickets[0].Issued | strptime("%b %e %H:%M:%S %Y")|mktime) as $iat
strptime("%b %e %H:%M:%S %Y")|mktime) as $t | (.tickets[0].Expires | strptime("%b %e %H:%M:%S %Y")|mktime) as $exp
(0; if .==0 then $t else $t - . end) / 86400) | floor | | (($exp - $iat) / 86400) as $life_days
. == 5'; then | ($life_days > 4 and $life_days < 5)'; then
echo "Incorrect lifetime" echo "Incorrect lifetime"
exit 2 exit 2
fi fi